summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Geiger2011-08-16 14:57:47 +0200
committerBjörn Geiger2011-08-16 14:57:47 +0200
commit128f8c422b04aea5046f8a755c91be333d471fe2 (patch)
treefc0019435ce69f297596d3dc171b636d1b13cf7b
parentFehler korrigiert (diff)
downloadpoolctrl-128f8c422b04aea5046f8a755c91be333d471fe2.tar.gz
poolctrl-128f8c422b04aea5046f8a755c91be333d471fe2.tar.xz
poolctrl-128f8c422b04aea5046f8a755c91be333d471fe2.zip
weiteren Fehler
-rw-r--r--gearman/controllerWorker/ControllerWorker/Boot.java14
-rw-r--r--gearman/controllerWorker/ControllerWorker/Shutdown.java10
2 files changed, 12 insertions, 12 deletions
diff --git a/gearman/controllerWorker/ControllerWorker/Boot.java b/gearman/controllerWorker/ControllerWorker/Boot.java
index 067aa99..01cf911 100644
--- a/gearman/controllerWorker/ControllerWorker/Boot.java
+++ b/gearman/controllerWorker/ControllerWorker/Boot.java
@@ -159,7 +159,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String alive = resultObj.get("alive")
.toString();
if (alive.equals("true")) {
@@ -260,7 +260,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String alive = resultObj.get("alive")
.toString();
if (alive.equals("true")) {
@@ -318,7 +318,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
/*
* String release =
* resultObj.get("Release").toString(); String
@@ -373,7 +373,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String rawoutput = resultObj.get("rawoutput")
.toString();
StringTokenizer str = new StringTokenizer(
@@ -434,7 +434,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String rawoutput = resultObj.get("rawoutput")
.toString();
System.out.println(rawoutput);
@@ -484,7 +484,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
System.out.println(ipAddress
+ " Restart command send");
status.put(clientID, 15); // restart command
@@ -540,7 +540,7 @@ public class Boot extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String alive = resultObj.get("alive")
.toString();
if (alive.equals("true")) {
diff --git a/gearman/controllerWorker/ControllerWorker/Shutdown.java b/gearman/controllerWorker/ControllerWorker/Shutdown.java
index ab30b54..35779ea 100644
--- a/gearman/controllerWorker/ControllerWorker/Shutdown.java
+++ b/gearman/controllerWorker/ControllerWorker/Shutdown.java
@@ -128,7 +128,7 @@ public class Shutdown extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String alive = resultObj.get("alive")
.toString();
@@ -180,7 +180,7 @@ public class Shutdown extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String rawoutput = resultObj.get("rawoutput")
.toString();
StringTokenizer str = new StringTokenizer(
@@ -239,7 +239,7 @@ public class Shutdown extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
System.out.println(ipAddress
+ " Shutdown command send");
status.put(clientID, 6); // shutdown command
@@ -294,7 +294,7 @@ public class Shutdown extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String alive = resultObj.get("alive")
.toString();
if (alive.equals("false")) {
@@ -358,7 +358,7 @@ public class Shutdown extends Thread {
if (result != "") {
JSONObject resultObj = (JSONObject) JSONValue
.parse(result);
- if (resultObj.get("err").toString().isEmpty()) {
+ if (!resultObj.containsKey("err")) {
String rawoutput = resultObj.get("rawoutput")
.toString();
System.out.println(rawoutput);