replace javaValues with values
This commit is contained in:
parent
a8ffd31c8a
commit
59eed39493
@ -139,7 +139,7 @@ public class RemoteJSExecutor {
|
||||
.put("cmd", "invokeMethod")
|
||||
.put("objectName", objectName)
|
||||
.put("functionName", functionName)
|
||||
.put("javaValues", jsonArray)
|
||||
.put("values", jsonArray)
|
||||
.put("hashKey", hashKey)
|
||||
.toString());
|
||||
|
||||
|
@ -3817,25 +3817,25 @@ debugServer.on('connection', function connection(ws) {
|
||||
console.log(messageObject.objectName);
|
||||
console.log(messageObject.functionName);
|
||||
let args = [];
|
||||
for (let i = 0; i < messageObject.javaValues.length; i++) {
|
||||
let javaValue = messageObject.javaValues[i];
|
||||
if (javaValue.type === 0) {
|
||||
for (let i = 0; i < messageObject.values.length; i++) {
|
||||
let value = messageObject.values[i];
|
||||
if (value.type === 0) {
|
||||
args.push(null);
|
||||
}
|
||||
else if (javaValue.type === 1) {
|
||||
args.push(parseFloat(javaValue.value));
|
||||
else if (value.type === 1) {
|
||||
args.push(parseFloat(value.value));
|
||||
}
|
||||
else if (javaValue.type === 2) {
|
||||
args.push((javaValue.value == 'true'));
|
||||
else if (value.type === 2) {
|
||||
args.push((value.value == 'true'));
|
||||
}
|
||||
else if (javaValue.type === 3) {
|
||||
args.push(javaValue.value.toString());
|
||||
else if (value.type === 3) {
|
||||
args.push(value.value.toString());
|
||||
}
|
||||
else if (javaValue.type === 4) {
|
||||
args.push(JSON.parse(javaValue.value));
|
||||
else if (value.type === 4) {
|
||||
args.push(JSON.parse(value.value));
|
||||
}
|
||||
else if (javaValue.type === 5) {
|
||||
args.push(JSON.parse(javaValue.value));
|
||||
else if (value.type === 5) {
|
||||
args.push(JSON.parse(value.value));
|
||||
}
|
||||
}
|
||||
console.log(args);
|
||||
|
@ -91,20 +91,20 @@ debugServer.on('connection', function connection(ws) {
|
||||
console.log(messageObject.functionName)
|
||||
|
||||
let args = []
|
||||
for (let i = 0; i < messageObject.javaValues.length; i++) {
|
||||
let javaValue = messageObject.javaValues[i]
|
||||
if (javaValue.type === 0) {
|
||||
for (let i = 0; i < messageObject.values.length; i++) {
|
||||
let value = messageObject.values[i]
|
||||
if (value.type === 0) {
|
||||
args.push(null)
|
||||
} else if (javaValue.type === 1) {
|
||||
args.push(parseFloat(javaValue.value))
|
||||
} else if (javaValue.type === 2) {
|
||||
args.push((javaValue.value == 'true'))
|
||||
} else if (javaValue.type === 3) {
|
||||
args.push(javaValue.value.toString())
|
||||
} else if (javaValue.type === 4) {
|
||||
args.push(JSON.parse(javaValue.value))
|
||||
} else if (javaValue.type === 5) {
|
||||
args.push(JSON.parse(javaValue.value))
|
||||
} else if (value.type === 1) {
|
||||
args.push(parseFloat(value.value))
|
||||
} else if (value.type === 2) {
|
||||
args.push((value.value == 'true'))
|
||||
} else if (value.type === 3) {
|
||||
args.push(value.value.toString())
|
||||
} else if (value.type === 4) {
|
||||
args.push(JSON.parse(value.value))
|
||||
} else if (value.type === 5) {
|
||||
args.push(JSON.parse(value.value))
|
||||
}
|
||||
}
|
||||
console.log(args)
|
||||
|
@ -89,25 +89,25 @@ debugServer.on('connection', function connection(ws) {
|
||||
console.log(messageObject.objectName);
|
||||
console.log(messageObject.functionName);
|
||||
let args = [];
|
||||
for (let i = 0; i < messageObject.javaValues.length; i++) {
|
||||
let javaValue = messageObject.javaValues[i];
|
||||
if (javaValue.type === 0) {
|
||||
for (let i = 0; i < messageObject.values.length; i++) {
|
||||
let value = messageObject.values[i];
|
||||
if (value.type === 0) {
|
||||
args.push(null);
|
||||
}
|
||||
else if (javaValue.type === 1) {
|
||||
args.push(parseFloat(javaValue.value));
|
||||
else if (value.type === 1) {
|
||||
args.push(parseFloat(value.value));
|
||||
}
|
||||
else if (javaValue.type === 2) {
|
||||
args.push((javaValue.value == 'true'));
|
||||
else if (value.type === 2) {
|
||||
args.push((value.value == 'true'));
|
||||
}
|
||||
else if (javaValue.type === 3) {
|
||||
args.push(javaValue.value.toString());
|
||||
else if (value.type === 3) {
|
||||
args.push(value.value.toString());
|
||||
}
|
||||
else if (javaValue.type === 4) {
|
||||
args.push(JSON.parse(javaValue.value));
|
||||
else if (value.type === 4) {
|
||||
args.push(JSON.parse(value.value));
|
||||
}
|
||||
else if (javaValue.type === 5) {
|
||||
args.push(JSON.parse(javaValue.value));
|
||||
else if (value.type === 5) {
|
||||
args.push(JSON.parse(value.value));
|
||||
}
|
||||
}
|
||||
console.log(args);
|
||||
|
Reference in New Issue
Block a user