diff --git a/h2o-cookbook/src/test/java/cookbook/groupedaverage/GroupedAverage.java b/h2o-cookbook/src/test/java/cookbook/groupedaverage/GroupedAverage.java index b204e1bc9c..8338393d78 100644 --- a/h2o-cookbook/src/test/java/cookbook/groupedaverage/GroupedAverage.java +++ b/h2o-cookbook/src/test/java/cookbook/groupedaverage/GroupedAverage.java @@ -1,6 +1,6 @@ package cookbook.groupedaverage; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.Key; import water.Request2; import water.UKV; diff --git a/h2o-samples/src/main/java/samples/expert/WebAPI.java b/h2o-samples/src/main/java/samples/expert/WebAPI.java index c27edb0aa2..74bfa1ed6b 100644 --- a/h2o-samples/src/main/java/samples/expert/WebAPI.java +++ b/h2o-samples/src/main/java/samples/expert/WebAPI.java @@ -1,11 +1,11 @@ package samples.expert; -import com.google.gson.Gson; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; -import com.google.gson.internal.Streams; -import com.google.gson.stream.JsonWriter; +import dontweave.gson.Gson; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; +import dontweave.gson.JsonParser; +import dontweave.gson.internal.Streams; +import dontweave.gson.stream.JsonWriter; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PostMethod; diff --git a/lib/gson/README_H2O.txt b/lib/gson/README_H2O.txt new file mode 100644 index 0000000000..2acfbbf618 --- /dev/null +++ b/lib/gson/README_H2O.txt @@ -0,0 +1,24 @@ + +We embed gson 2.3 into h2o and change the package name to avoid colliding with other software. +In particular, MapR 3.x has an ancient version of gson it includes in the classpath. + + +Steps: + +Get gson sources into a fresh directory. +mkdir Gson23 +cd Gson23 +mkdir -p src/main/java +jar .../gson-2.3-sources.jar +mv com src/main/java +Import from sources into IDEA. +Use IDEA refactor 'move' step to move com.google.gson to dontweave.gson. +Project settings --> add Artifact jar file. +Build jar (make sure target is 1.6 language level). + +cp -p out/artifacts/main_jar/gson-2.3.jar ~/0xdata/ws/h2o/lib/gson +cd to h2o directory +sed -i.sedbak 's/com.google.gson/dontweave.gson/g' `cat list_of_files` +rm `find . -name '*sedbak'` +make + diff --git a/lib/gson/gson-2.3.jar b/lib/gson/gson-2.3.jar index a7f7ce5e99..4d21dcce40 100644 Binary files a/lib/gson/gson-2.3.jar and b/lib/gson/gson-2.3.jar differ diff --git a/src/main/java/hex/ConfusionMatrix.java b/src/main/java/hex/ConfusionMatrix.java index d2c7396d46..673d80a460 100644 --- a/src/main/java/hex/ConfusionMatrix.java +++ b/src/main/java/hex/ConfusionMatrix.java @@ -2,8 +2,8 @@ import static water.api.DocGen.FieldDoc; import static water.util.Utils.printConfusionMatrix; -import com.google.gson.JsonArray; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonPrimitive; import water.Iced; import water.api.Request.API; diff --git a/src/main/java/hex/glm/GLM2.java b/src/main/java/hex/glm/GLM2.java index b8f9bd8dc4..c8050822ca 100644 --- a/src/main/java/hex/glm/GLM2.java +++ b/src/main/java/hex/glm/GLM2.java @@ -1,6 +1,6 @@ package hex.glm; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import hex.FrameTask.DataInfo; import hex.GridSearch.GridSearchProgress; import hex.glm.GLMModel.GLMXValidationTask; diff --git a/src/main/java/hex/glm/LSMSolver.java b/src/main/java/hex/glm/LSMSolver.java index cb2fdd2da2..c5770d3b52 100644 --- a/src/main/java/hex/glm/LSMSolver.java +++ b/src/main/java/hex/glm/LSMSolver.java @@ -11,7 +11,7 @@ import water.Key; import water.MemoryManager; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; /** diff --git a/src/main/java/hex/singlenoderf/SpeeDRFModel.java b/src/main/java/hex/singlenoderf/SpeeDRFModel.java index f6f378a28c..52b6b21c86 100644 --- a/src/main/java/hex/singlenoderf/SpeeDRFModel.java +++ b/src/main/java/hex/singlenoderf/SpeeDRFModel.java @@ -1,9 +1,9 @@ package hex.singlenoderf; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; +import dontweave.gson.JsonPrimitive; import hex.ConfusionMatrix; import hex.VarImp; import hex.gbm.DTree; diff --git a/src/main/java/water/External.java b/src/main/java/water/External.java index 665bc078e2..bbf2c16a7f 100644 --- a/src/main/java/water/External.java +++ b/src/main/java/water/External.java @@ -4,7 +4,7 @@ import water.util.Log; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; /** * Expose internal H2O API calls to the External World diff --git a/src/main/java/water/ExternalInterface.java b/src/main/java/water/ExternalInterface.java index 53ce0e6ca9..f86e20dbdb 100644 --- a/src/main/java/water/ExternalInterface.java +++ b/src/main/java/water/ExternalInterface.java @@ -1,6 +1,6 @@ package water; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import java.io.InputStream; /** diff --git a/src/main/java/water/InternalInterface.java b/src/main/java/water/InternalInterface.java index 72c293ee58..661a591a5e 100644 --- a/src/main/java/water/InternalInterface.java +++ b/src/main/java/water/InternalInterface.java @@ -5,7 +5,7 @@ import water.api.Cloud; import water.util.Log; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class InternalInterface implements water.ExternalInterface { @Override public Key makeKey( String key_name ) { return Key.make(key_name); } diff --git a/src/main/java/water/Job.java b/src/main/java/water/Job.java index 4119afaa5b..851c2ad629 100644 --- a/src/main/java/water/Job.java +++ b/src/main/java/water/Job.java @@ -18,7 +18,7 @@ import water.util.*; import water.util.Utils.ExpectedExceptionForDebug; -import com.google.gson.*; +import dontweave.gson.*; public abstract class Job extends Func { static final int API_WEAVER = 1; // This file has auto-gen'd doc & json fields diff --git a/src/main/java/water/ModelMetrics.java b/src/main/java/water/ModelMetrics.java index b9db50bf6e..1bf77a6752 100644 --- a/src/main/java/water/ModelMetrics.java +++ b/src/main/java/water/ModelMetrics.java @@ -1,7 +1,7 @@ package water; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; +import dontweave.gson.JsonObject; +import dontweave.gson.JsonParser; import water.Model.ModelCategory; import water.api.AUCData; import water.api.ConfusionMatrix; diff --git a/src/main/java/water/Request2.java b/src/main/java/water/Request2.java index 40869f2658..202da4f778 100644 --- a/src/main/java/water/Request2.java +++ b/src/main/java/water/Request2.java @@ -1,8 +1,8 @@ package water; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; +import dontweave.gson.JsonParser; import hex.GridSearch; import water.api.DocGen; import water.api.Request; diff --git a/src/main/java/water/UniqueFrameId.java b/src/main/java/water/UniqueFrameId.java index 466c7655dd..adf9a96b85 100644 --- a/src/main/java/water/UniqueFrameId.java +++ b/src/main/java/water/UniqueFrameId.java @@ -1,7 +1,7 @@ package water; -import com.google.gson.JsonObject; -import com.google.gson.JsonParser; +import dontweave.gson.JsonObject; +import dontweave.gson.JsonParser; import org.apache.commons.codec.binary.Hex; import water.api.DocGen; diff --git a/src/main/java/water/UniqueId.java b/src/main/java/water/UniqueId.java index 604fc4e72d..088f72a8e7 100644 --- a/src/main/java/water/UniqueId.java +++ b/src/main/java/water/UniqueId.java @@ -1,6 +1,6 @@ package water; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.api.DocGen; import water.api.Request.API; import water.api.Request.Default; diff --git a/src/main/java/water/api/Cancel.java b/src/main/java/water/api/Cancel.java index 56c34d8ab2..ab49190c7a 100644 --- a/src/main/java/water/api/Cancel.java +++ b/src/main/java/water/api/Cancel.java @@ -4,7 +4,7 @@ import water.Key; import water.util.RString; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Cancel extends Request { // TODO use ExistingJobKey (check other places) diff --git a/src/main/java/water/api/Cloud.java b/src/main/java/water/api/Cloud.java index fa047571b2..641cfe22ac 100644 --- a/src/main/java/water/api/Cloud.java +++ b/src/main/java/water/api/Cloud.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.*; +import dontweave.gson.*; import water.*; import water.util.Log; diff --git a/src/main/java/water/api/ExportHdfs.java b/src/main/java/water/api/ExportHdfs.java index e5f10d3169..d904fb6654 100644 --- a/src/main/java/water/api/ExportHdfs.java +++ b/src/main/java/water/api/ExportHdfs.java @@ -6,7 +6,7 @@ import water.persist.PersistHdfs; import water.util.Log; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class ExportHdfs extends Request { protected final H2OExistingKey _source = new H2OExistingKey(SOURCE_KEY); diff --git a/src/main/java/water/api/Frames.java b/src/main/java/water/api/Frames.java index 7c799def4c..e1a7cc174c 100644 --- a/src/main/java/water/api/Frames.java +++ b/src/main/java/water/api/Frames.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.*; +import dontweave.gson.*; import org.apache.commons.math3.util.Pair; import water.*; import water.api.Models.ModelSummary; diff --git a/src/main/java/water/api/Get.java b/src/main/java/water/api/Get.java index b5be6e4e31..4fef4aaa52 100644 --- a/src/main/java/water/api/Get.java +++ b/src/main/java/water/api/Get.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import java.util.Properties; import water.*; import water.util.Log; diff --git a/src/main/java/water/api/HTMLOnlyRequest.java b/src/main/java/water/api/HTMLOnlyRequest.java index d458e61f87..b7db0e53bd 100644 --- a/src/main/java/water/api/HTMLOnlyRequest.java +++ b/src/main/java/water/api/HTMLOnlyRequest.java @@ -5,7 +5,7 @@ import water.NanoHTTPD; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; /** Request that only supports browser (html, query, help, wiki) request types. * diff --git a/src/main/java/water/api/IOStatus.java b/src/main/java/water/api/IOStatus.java index cfa6b6f6d3..d1209c1485 100644 --- a/src/main/java/water/api/IOStatus.java +++ b/src/main/java/water/api/IOStatus.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.*; +import dontweave.gson.*; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.TimeUnit; diff --git a/src/main/java/water/api/ImportHdfs.java b/src/main/java/water/api/ImportHdfs.java index a42373bf7b..98fd26286c 100644 --- a/src/main/java/water/api/ImportHdfs.java +++ b/src/main/java/water/api/ImportHdfs.java @@ -11,8 +11,8 @@ import water.persist.PersistHdfs; import water.util.Log; -import com.google.gson.*; -import com.google.gson.internal.Streams; +import dontweave.gson.*; +import dontweave.gson.internal.Streams; public class ImportHdfs extends Request { public class PathArg extends TypeaheadInputText { diff --git a/src/main/java/water/api/ImportS3.java b/src/main/java/water/api/ImportS3.java index ca5bfdf26b..b5a74beba1 100644 --- a/src/main/java/water/api/ImportS3.java +++ b/src/main/java/water/api/ImportS3.java @@ -11,7 +11,7 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.ObjectListing; import com.amazonaws.services.s3.model.S3ObjectSummary; -import com.google.gson.*; +import dontweave.gson.*; import water.util.Log; public class ImportS3 extends Request { diff --git a/src/main/java/water/api/JSONOnlyRequest.java b/src/main/java/water/api/JSONOnlyRequest.java index 02915cd3ad..1db7c3b5fa 100644 --- a/src/main/java/water/api/JSONOnlyRequest.java +++ b/src/main/java/water/api/JSONOnlyRequest.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import java.util.Properties; import water.NanoHTTPD; diff --git a/src/main/java/water/api/Jobs.java b/src/main/java/water/api/Jobs.java index 8d124a54fa..f473219518 100644 --- a/src/main/java/water/api/Jobs.java +++ b/src/main/java/water/api/Jobs.java @@ -1,8 +1,8 @@ package water.api; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; import water.DKV; import water.Job; import water.Job.JobState; diff --git a/src/main/java/water/api/LogAndEcho.java b/src/main/java/water/api/LogAndEcho.java index d85ce95f2b..85a567ef91 100644 --- a/src/main/java/water/api/LogAndEcho.java +++ b/src/main/java/water/api/LogAndEcho.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.util.Log; public class LogAndEcho extends Request { diff --git a/src/main/java/water/api/LogView.java b/src/main/java/water/api/LogView.java index e1ea85766c..479c47e722 100644 --- a/src/main/java/water/api/LogView.java +++ b/src/main/java/water/api/LogView.java @@ -11,8 +11,8 @@ import water.util.*; import water.util.Log.LogStr; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonObject; public class LogView extends Request { @Override protected Response serve() { diff --git a/src/main/java/water/api/ModelMetrics.java b/src/main/java/water/api/ModelMetrics.java index 46cace178b..a55b3b6a90 100644 --- a/src/main/java/water/api/ModelMetrics.java +++ b/src/main/java/water/api/ModelMetrics.java @@ -2,7 +2,7 @@ import java.util.*; -import com.google.gson.*; +import dontweave.gson.*; import water.DKV; import water.Key; diff --git a/src/main/java/water/api/Models.java b/src/main/java/water/api/Models.java index a9ea07d075..c6e4a89591 100644 --- a/src/main/java/water/api/Models.java +++ b/src/main/java/water/api/Models.java @@ -1,9 +1,9 @@ package water.api; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import dontweave.gson.Gson; +import dontweave.gson.GsonBuilder; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; import hex.VarImp; import hex.deeplearning.DeepLearning; import hex.drf.DRF; diff --git a/src/main/java/water/api/Parse.java b/src/main/java/water/api/Parse.java index 2f2547acaf..abae988fed 100644 --- a/src/main/java/water/api/Parse.java +++ b/src/main/java/water/api/Parse.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import java.io.File; import java.util.ArrayList; import java.util.Collections; diff --git a/src/main/java/water/api/PutValue.java b/src/main/java/water/api/PutValue.java index 15eef36e3c..7653cf10b6 100644 --- a/src/main/java/water/api/PutValue.java +++ b/src/main/java/water/api/PutValue.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.Key; import water.UKV; import water.Value; diff --git a/src/main/java/water/api/Remove.java b/src/main/java/water/api/Remove.java index f6db7d51d2..6bf61ca143 100644 --- a/src/main/java/water/api/Remove.java +++ b/src/main/java/water/api/Remove.java @@ -5,7 +5,7 @@ import water.UKV; import water.Value; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Remove extends Request { @Override public RequestServer.API_VERSION[] supportedVersions() { return SUPPORTS_V1_V2; } diff --git a/src/main/java/water/api/RemoveAck.java b/src/main/java/water/api/RemoveAck.java index 9bdb54ebbf..ca80c535d1 100644 --- a/src/main/java/water/api/RemoveAck.java +++ b/src/main/java/water/api/RemoveAck.java @@ -2,7 +2,7 @@ import water.Value; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class RemoveAck extends Request { protected final H2OExistingKey _key = new H2OExistingKey(KEY); diff --git a/src/main/java/water/api/RemoveAll.java b/src/main/java/water/api/RemoveAll.java index 4d27bef462..cf945e2683 100644 --- a/src/main/java/water/api/RemoveAll.java +++ b/src/main/java/water/api/RemoveAll.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.Job; import water.util.Log; import water.util.RemoveAllKeysTask; diff --git a/src/main/java/water/api/Request.java b/src/main/java/water/api/Request.java index a216da68d3..aee7f0dc0d 100644 --- a/src/main/java/water/api/Request.java +++ b/src/main/java/water/api/Request.java @@ -14,7 +14,7 @@ import water.util.*; import com.google.common.io.ByteStreams; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public abstract class Request extends RequestBuilders { @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/water/api/RequestArguments.java b/src/main/java/water/api/RequestArguments.java index 941a726739..a098aef93d 100644 --- a/src/main/java/water/api/RequestArguments.java +++ b/src/main/java/water/api/RequestArguments.java @@ -2,7 +2,7 @@ import com.google.common.collect.Lists; import com.google.common.primitives.Ints; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.*; import water.Request2.TypeaheadKey; import water.api.Request.Filter; diff --git a/src/main/java/water/api/RequestBuilders.java b/src/main/java/water/api/RequestBuilders.java index 063b41d6d6..a60093850d 100644 --- a/src/main/java/water/api/RequestBuilders.java +++ b/src/main/java/water/api/RequestBuilders.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.*; +import dontweave.gson.*; import water.AutoBuffer; import water.H2O; import water.Iced; diff --git a/src/main/java/water/api/RequestStatics.java b/src/main/java/water/api/RequestStatics.java index 50aaf35006..71416aaf49 100644 --- a/src/main/java/water/api/RequestStatics.java +++ b/src/main/java/water/api/RequestStatics.java @@ -7,8 +7,8 @@ import water.util.Log; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import dontweave.gson.JsonElement; +import dontweave.gson.JsonObject; /** All statics for the Request api. * diff --git a/src/main/java/water/api/Shutdown.java b/src/main/java/water/api/Shutdown.java index 5cd1619852..68bb8e6f7c 100644 --- a/src/main/java/water/api/Shutdown.java +++ b/src/main/java/water/api/Shutdown.java @@ -6,7 +6,7 @@ import water.H2O; import water.UDPRebooted; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Shutdown extends Request { diff --git a/src/main/java/water/api/StoreView.java b/src/main/java/water/api/StoreView.java index d663186aad..f553d7d9f7 100644 --- a/src/main/java/water/api/StoreView.java +++ b/src/main/java/water/api/StoreView.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.*; +import dontweave.gson.*; import java.util.*; import water.*; import water.fvec.Frame; diff --git a/src/main/java/water/api/TestPoll.java b/src/main/java/water/api/TestPoll.java index 329cda9983..0754cf7d32 100644 --- a/src/main/java/water/api/TestPoll.java +++ b/src/main/java/water/api/TestPoll.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class TestPoll extends Request { // not isolated to the context, don't care diff --git a/src/main/java/water/api/TestRedirect.java b/src/main/java/water/api/TestRedirect.java index 8d005dfc0a..262c342df0 100644 --- a/src/main/java/water/api/TestRedirect.java +++ b/src/main/java/water/api/TestRedirect.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class TestRedirect extends Request { @Override protected Response serve() { diff --git a/src/main/java/water/api/Timeline.java b/src/main/java/water/api/Timeline.java index 27ff8228b2..b817098fef 100644 --- a/src/main/java/water/api/Timeline.java +++ b/src/main/java/water/api/Timeline.java @@ -7,7 +7,7 @@ import water.*; import water.util.TimelineSnapshot; -import com.google.gson.*; +import dontweave.gson.*; public class Timeline extends Request { diff --git a/src/main/java/water/api/TypeaheadFileRequest.java b/src/main/java/water/api/TypeaheadFileRequest.java index 626ca6007c..e1b24e8251 100644 --- a/src/main/java/water/api/TypeaheadFileRequest.java +++ b/src/main/java/water/api/TypeaheadFileRequest.java @@ -12,8 +12,8 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.Bucket; import com.google.common.base.Strings; -import com.google.gson.JsonArray; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonPrimitive; public class TypeaheadFileRequest extends TypeaheadRequest { diff --git a/src/main/java/water/api/TypeaheadHdfsPathRequest.java b/src/main/java/water/api/TypeaheadHdfsPathRequest.java index 9bfd2e703b..a09fd3ff10 100644 --- a/src/main/java/water/api/TypeaheadHdfsPathRequest.java +++ b/src/main/java/water/api/TypeaheadHdfsPathRequest.java @@ -6,8 +6,8 @@ import water.persist.PersistHdfs; -import com.google.gson.JsonArray; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonPrimitive; public class TypeaheadHdfsPathRequest extends TypeaheadRequest { diff --git a/src/main/java/water/api/TypeaheadKeysRequest.java b/src/main/java/water/api/TypeaheadKeysRequest.java index 30d1eecdb7..d4dc31ae69 100644 --- a/src/main/java/water/api/TypeaheadKeysRequest.java +++ b/src/main/java/water/api/TypeaheadKeysRequest.java @@ -7,8 +7,8 @@ import water.*; import water.fvec.Frame; -import com.google.gson.JsonArray; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonPrimitive; public class TypeaheadKeysRequest extends TypeaheadRequest { final String _cname; diff --git a/src/main/java/water/api/TypeaheadRequest.java b/src/main/java/water/api/TypeaheadRequest.java index 69765045a2..29d3d950ba 100644 --- a/src/main/java/water/api/TypeaheadRequest.java +++ b/src/main/java/water/api/TypeaheadRequest.java @@ -2,8 +2,8 @@ import water.api.RequestServer.API_VERSION; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonObject; public abstract class TypeaheadRequest extends Request { protected final Str _filter; diff --git a/src/main/java/water/api/TypeaheadS3BucketRequest.java b/src/main/java/water/api/TypeaheadS3BucketRequest.java index a8581234b7..3ec08b1e27 100644 --- a/src/main/java/water/api/TypeaheadS3BucketRequest.java +++ b/src/main/java/water/api/TypeaheadS3BucketRequest.java @@ -6,8 +6,8 @@ import com.amazonaws.services.s3.AmazonS3; import com.amazonaws.services.s3.model.Bucket; import com.google.common.base.Strings; -import com.google.gson.JsonArray; -import com.google.gson.JsonPrimitive; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonPrimitive; public class TypeaheadS3BucketRequest extends TypeaheadRequest { diff --git a/src/main/java/water/api/Up.java b/src/main/java/water/api/Up.java index f996b385de..9546bf2158 100644 --- a/src/main/java/water/api/Up.java +++ b/src/main/java/water/api/Up.java @@ -1,6 +1,6 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.util.Log; public class Up extends Request { diff --git a/src/main/java/water/api/Upload.java b/src/main/java/water/api/Upload.java index 201634c8ee..5cf4e12409 100644 --- a/src/main/java/water/api/Upload.java +++ b/src/main/java/water/api/Upload.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Upload extends HTMLOnlyRequest { @Override diff --git a/src/main/java/water/api/Upload2.java b/src/main/java/water/api/Upload2.java index 84c877bf3c..1a8ab35c51 100644 --- a/src/main/java/water/api/Upload2.java +++ b/src/main/java/water/api/Upload2.java @@ -1,7 +1,7 @@ package water.api; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Upload2 extends HTMLOnlyRequest { @Override diff --git a/src/main/java/water/persist/PersistHdfs.java b/src/main/java/water/persist/PersistHdfs.java index 5b89933b1f..3d436c4546 100644 --- a/src/main/java/water/persist/PersistHdfs.java +++ b/src/main/java/water/persist/PersistHdfs.java @@ -21,7 +21,7 @@ import com.google.common.base.Strings; import com.google.common.io.ByteStreams; -import com.google.gson.*; +import dontweave.gson.*; public final class PersistHdfs extends Persist { diff --git a/src/main/java/water/util/Check.java b/src/main/java/water/util/Check.java index 4505c496c9..1e7aa42fc3 100644 --- a/src/main/java/water/util/Check.java +++ b/src/main/java/water/util/Check.java @@ -8,7 +8,7 @@ import java.util.regex.Pattern; import com.google.common.collect.Lists; -import com.google.gson.*; +import dontweave.gson.*; public class Check { private static final Pattern JSON_PATTERN = Pattern.compile("[_a-z0-9]*[/_a-z]*"); diff --git a/src/main/java/water/util/Counter.java b/src/main/java/water/util/Counter.java index 0692411e20..1b3999eb1b 100644 --- a/src/main/java/water/util/Counter.java +++ b/src/main/java/water/util/Counter.java @@ -2,7 +2,7 @@ import water.api.Constants; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; public class Counter { double _min = Double.MAX_VALUE, _max = Double.MIN_VALUE; @@ -25,4 +25,4 @@ public JsonObject toJson() { @Override public String toString() { return _count==0 ? " / / " : String.format("%4.1f / %4.1f / %4.1f", _min, mean(), _max); } -} \ No newline at end of file +} diff --git a/src/main/java/water/util/JsonUtil.java b/src/main/java/water/util/JsonUtil.java index 628a55e12e..4c64268be6 100644 --- a/src/main/java/water/util/JsonUtil.java +++ b/src/main/java/water/util/JsonUtil.java @@ -5,7 +5,7 @@ import com.google.common.base.Objects; import com.google.common.collect.Maps; -import com.google.gson.*; +import dontweave.gson.*; public class JsonUtil { private static final Map SPECIAL = Maps.newHashMap(); diff --git a/src/main/java/water/util/RString.java b/src/main/java/water/util/RString.java index d572e5ef19..f73cc633a0 100644 --- a/src/main/java/water/util/RString.java +++ b/src/main/java/water/util/RString.java @@ -1,7 +1,7 @@ package water.util; import com.google.common.collect.ArrayListMultimap; -import com.google.gson.*; +import dontweave.gson.*; import java.io.IOException; import java.net.URLEncoder; import java.util.List; diff --git a/src/test/java/hex/HttpTest.java b/src/test/java/hex/HttpTest.java index d3a586c09a..f8719edd16 100644 --- a/src/test/java/hex/HttpTest.java +++ b/src/test/java/hex/HttpTest.java @@ -10,7 +10,7 @@ import water.Key; import water.TestUtil; -import com.google.gson.Gson; +import dontweave.gson.Gson; public class HttpTest extends TestUtil { HttpClient _client = new HttpClient(); diff --git a/src/test/java/water/AutoBuffer2JSONTest.java b/src/test/java/water/AutoBuffer2JSONTest.java index ca0c854565..81d13faf08 100644 --- a/src/test/java/water/AutoBuffer2JSONTest.java +++ b/src/test/java/water/AutoBuffer2JSONTest.java @@ -2,7 +2,7 @@ import org.junit.*; -import com.google.gson.JsonObject; +import dontweave.gson.JsonObject; import water.api.DocGen; import water.api.Request.API; diff --git a/src/test/java/water/KVSpeedTest.java b/src/test/java/water/KVSpeedTest.java index 0292a86aef..55a106e23d 100644 --- a/src/test/java/water/KVSpeedTest.java +++ b/src/test/java/water/KVSpeedTest.java @@ -1,6 +1,6 @@ package water; -import com.google.gson.*; +import dontweave.gson.*; import org.junit.*; // Weeny speed-test harness. Not intended for use with any real testing. diff --git a/src/test/java/water/TypeAheadTest.java b/src/test/java/water/TypeAheadTest.java index 9fa728ba82..6304017473 100644 --- a/src/test/java/water/TypeAheadTest.java +++ b/src/test/java/water/TypeAheadTest.java @@ -1,8 +1,8 @@ package water; import com.amazonaws.util.json.JSONArray; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; +import dontweave.gson.JsonArray; +import dontweave.gson.JsonObject; import junit.framework.Assert; import org.junit.Test; import water.api.TypeaheadKeysRequest;