From 52712e1b2e038a517356981fd4b4b090aa3b9450 Mon Sep 17 00:00:00 2001 From: buddhi nipun mihara Date: Thu, 9 Jun 2016 13:00:27 +0530 Subject: [PATCH 1/2] Update JavaApp.java --- .../src/main/java/org/wso2/agent/main/JavaApp.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/main/JavaApp.java b/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/main/JavaApp.java index 4b650e92..57cfd650 100644 --- a/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/main/JavaApp.java +++ b/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/main/JavaApp.java @@ -100,12 +100,12 @@ public class JavaApp { devicetoken = outputJson.getString("accessToken"); devicerefreshtoken = outputJson.getString("refreshToken"); if (response.getStatus() != 200) { - throw new RuntimeException("Failed : HTTP error code : " + response.getStatus()); + // throw new RuntimeException("Failed : HTTP error code : " + response.getStatus()); } config.SaveRegistration(spec, devicetoken, devicerefreshtoken); } catch (Exception e) { //e.printStackTrace(); - throw e; + //throw e; } } From 7407298ca4fabb14a592a891f816aea0f07dd85c Mon Sep 17 00:00:00 2001 From: buddhi nipun mihara Date: Thu, 9 Jun 2016 13:03:48 +0530 Subject: [PATCH 2/2] Update PushSystemUsage.java --- .../main/java/org/wso2/agent/datasense/PushSystemUsage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/datasense/PushSystemUsage.java b/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/datasense/PushSystemUsage.java index 1409bed3..1f135b81 100644 --- a/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/datasense/PushSystemUsage.java +++ b/modules/samples/connectedlap/component/laptopagent/src/main/java/org/wso2/agent/datasense/PushSystemUsage.java @@ -59,11 +59,11 @@ public class PushSystemUsage { System.out.println(output); JSONObject outputjson= new JSONObject(output); if (response.getStatus() != 200 || outputjson ==null || !outputjson.getBoolean("success")) { - throw new RuntimeException("Failed : HTTP error code : " + response.getStatus()); + // throw new RuntimeException("Failed : HTTP error code : " + response.getStatus()); } } catch (Exception e) { - throw e; + // throw e; } } }