Skip to content

Commit 968e1ae

Browse files
committed
revert(Natural Language Understanding): Fix change that was supposed to be temporary
1 parent b94602c commit 968e1ae

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
package com.ibm.watson.natural_language_understanding.v1;
1414

15-
import com.google.gson.GsonBuilder;
1615
import com.google.gson.JsonObject;
1716
import com.ibm.cloud.sdk.core.http.RequestBuilder;
1817
import com.ibm.cloud.sdk.core.http.ServiceCall;
@@ -126,7 +125,7 @@ public ServiceCall<AnalysisResults> analyze(AnalyzeOptions analyzeOptions) {
126125
if (analyzeOptions.url() != null) {
127126
contentJson.addProperty("url", analyzeOptions.url());
128127
}
129-
contentJson.add("features", new GsonBuilder().create().toJsonTree(analyzeOptions.features()));
128+
contentJson.add("features", GsonSingleton.getGson().toJsonTree(analyzeOptions.features()));
130129
if (analyzeOptions.clean() != null) {
131130
contentJson.addProperty("clean", analyzeOptions.clean());
132131
}

0 commit comments

Comments
 (0)