From 27c06e7996a028d1e64ab247efa8fa0b55884535 Mon Sep 17 00:00:00 2001 From: chirayukong Date: Fri, 17 Mar 2017 11:53:52 -0400 Subject: [PATCH] Fixed a null walltime bug --- .../pitt/dbmi/ccd/rest/client/util/JsonUtils.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/edu/pitt/dbmi/ccd/rest/client/util/JsonUtils.java b/src/main/java/edu/pitt/dbmi/ccd/rest/client/util/JsonUtils.java index fb8e549..8ec3b50 100644 --- a/src/main/java/edu/pitt/dbmi/ccd/rest/client/util/JsonUtils.java +++ b/src/main/java/edu/pitt/dbmi/ccd/rest/client/util/JsonUtils.java @@ -7,6 +7,7 @@ import java.util.Set; import org.json.JSONArray; +import org.json.JSONException; import org.json.JSONObject; import edu.pitt.dbmi.ccd.rest.client.dto.algo.AlgorithmInfo; @@ -33,14 +34,16 @@ public static JsonWebToken parseJSONObjectToJsonWebToken(JSONObject jObj) { long issuedTime = jObj.getLong("issuedTime"); long lifetime = jObj.getLong("lifetime"); long expireTime = jObj.getLong("expireTime"); - JSONArray wallTimeArray = jObj.getJSONArray("wallTime"); String[] wallTime = null; - if(wallTimeArray.length() > 0){ - wallTime = new String[wallTimeArray.length()]; - for(int index=0;index 0){ + wallTime = new String[wallTimeArray.length()]; + for(int index=0;index