Skip to content

Commit 10826a3

Browse files
Migrate labkey-client-api to use a modern JSON library: JSON-java (#179)
Co-authored-by: Adam Rauch <adam@labkey.com>
1 parent a28eb23 commit 10826a3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

SequenceAnalysis/test/src/org/labkey/test/tests/external/labModules/SequenceTest.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
import org.apache.commons.io.FileUtils;
1919
import org.apache.commons.lang3.StringUtils;
2020
import org.apache.commons.lang3.tuple.Pair;
21-
import org.json.simple.JSONObject;
22-
import org.json.simple.parser.JSONParser;
23-
import org.json.simple.parser.ParseException;
21+
import org.json.JSONException;
22+
import org.json.JSONObject;
2423
import org.junit.Assert;
2524
import org.junit.Test;
2625
import org.junit.experimental.categories.Category;
@@ -104,10 +103,10 @@ private boolean isExternalPipelineEnabled()
104103
Boolean sequencePipelineEnabled;
105104
try
106105
{
107-
JSONObject json = (JSONObject) new JSONParser().parse(httpResponse.getResponseBody());
106+
JSONObject json = new JSONObject(httpResponse.getResponseBody());
108107
sequencePipelineEnabled = (Boolean) json.get("isPipelineEnabled");
109108
}
110-
catch (ParseException | ClassCastException e)
109+
catch (JSONException | ClassCastException e)
111110
{
112111
sequencePipelineEnabled = false;
113112
}

0 commit comments

Comments
 (0)