break;
}
} else if (t.isPrimitiveType()) {
- if (t.getSignature() == "I") {
+ if (t.getSignature().equals("I")) {
try {
int value = Integer.parseInt(v);
replacementValues.put(k, Integer.toString(value));
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "F") {
+ } else if (t.getSignature().equals("F")) {
try {
float value = Float.parseFloat(v);
replacementValues.put(k, Float.toString(value));
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "Z") {
+ } else if (t.getSignature().equals("Z")) {
if (v.equalsIgnoreCase("true") || v.equalsIgnoreCase("false")) {
// is it ok !
} else {
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "S") {
+ } else if (t.getSignature().equals("S")) {
try {
short value = Short.parseShort(v);
replacementValues.put(k, Short.toString(value));
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "J") {
+ } else if (t.getSignature().equals("J")) {
try {
replacementValues.put(k, Long.toString(Long.parseLong(v)));
break;
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "D") {
+ } else if (t.getSignature().equals("D")) {
try {
replacementValues.put(k, Double.toString(Double.parseDouble(v)));
break;
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "B") {
+ } else if (t.getSignature().equals("B")) {
try {
replacementValues.put(k, Byte.toString(Byte.parseByte(v)));
break;
getSourceLocation());
scope.getWorld().getMessageHandler().handleMessage(m);
}
- } else if (t.getSignature() == "C") {
+ } else if (t.getSignature().equals("C")) {
if (v.length() != 3) { // '?'
IMessage m = MessageUtil.error(
WeaverMessages.format(WeaverMessages.INVALID_ANNOTATION_VALUE, v, "char"),