diff --git a/LICENSE.txt b/LICENSE.txt index f7cae5baae..0e71d679af 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -209,8 +209,8 @@ dependencies that have separate copyright notices and license terms. Your use of these libraries is subject to the terms and conditions of the following licenses. -For lib/flexjson-1.7.jar, lib/google-collect-1.0-rc1.jar, -lib/clhm-production.jar, and lib/json_simple-1.1.jar: +For lib/google-collect-1.0-rc1.jar, lib/clhm-production.jar, and +lib/json_simple-1.1.jar: While developed outside the ASF, these projects are also licensed under the Apache License 2.0. The full text of the Apache License 2.0 can be diff --git a/NOTICE.txt b/NOTICE.txt index b03750cb06..4ee478728a 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -18,10 +18,7 @@ Written by Cliff Click and released as Public Domain. This product makes use of JLine for console input (http://jline.sf.net). Copyright (c) 2002-2006, Marc Prud'hommeaux -JSON serialization provided by Flexjson (http://flexjson.sf.net). -Copyright 2007 Charlie Hubbard. - -JSON parsing provided by json-simple (http://code.google.com/p/json-simple/). +JSON support provided by json-simple (http://code.google.com/p/json-simple/). Copyright 2006-2009 Yidong Fang. This product makes use of the JUnit test framework (http://junit.org). diff --git a/lib/flexjson-1.7.jar b/lib/flexjson-1.7.jar deleted file mode 100644 index 5e07e12687..0000000000 Binary files a/lib/flexjson-1.7.jar and /dev/null differ diff --git a/src/java/org/apache/cassandra/client/RingCache.java b/src/java/org/apache/cassandra/client/RingCache.java index 2b1de8b1c8..7645bccbe9 100644 --- a/src/java/org/apache/cassandra/client/RingCache.java +++ b/src/java/org/apache/cassandra/client/RingCache.java @@ -34,8 +34,8 @@ import org.apache.log4j.Logger; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.transport.TSocket; +import org.json.simple.JSONValue; -import flexjson.JSONTokener; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; @@ -72,7 +72,7 @@ public class RingCache Cassandra.Client client = new Cassandra.Client(binaryProtocol); socket.open(); - Map tokenToHostMap = (Map) new JSONTokener(client.get_string_property(CassandraServer.TOKEN_MAP)).nextValue(); + Map tokenToHostMap = (Map) JSONValue.parse(client.get_string_property(CassandraServer.TOKEN_MAP)); BiMap tokenEndpointMap = HashBiMap.create(); for (Map.Entry entry : tokenToHostMap.entrySet()) diff --git a/src/java/org/apache/cassandra/service/CassandraServer.java b/src/java/org/apache/cassandra/service/CassandraServer.java index dc7d0c41ac..70f0222f3e 100644 --- a/src/java/org/apache/cassandra/service/CassandraServer.java +++ b/src/java/org/apache/cassandra/service/CassandraServer.java @@ -36,8 +36,7 @@ import org.apache.cassandra.db.filter.QueryPath; import org.apache.cassandra.service.StorageService; import org.apache.cassandra.utils.Pair; import org.apache.thrift.TException; - -import flexjson.JSONSerializer; +import org.json.simple.JSONValue; public class CassandraServer implements Cassandra.Iface { @@ -529,7 +528,7 @@ public class CassandraServer implements Cassandra.Iface } else if (propertyName.equals(TOKEN_MAP)) { - return new JSONSerializer().serialize(storageService.getStringEndpointMap()); + return JSONValue.toJSONString(storageService.getStringEndpointMap()); } else if (propertyName.equals("version")) {