Skip to content

Commit 3662716

Browse files
committed
Fixing primitives to String conversion
1 parent 82ea77e commit 3662716

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/JavaDetailFormattersManager.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,28 +546,28 @@ private Expression getCompiledExpression(IJavaPrimitiveValue javaPM, IJavaDebugT
546546
private String primitiveSnippets(String snippet, String typeName, IJavaPrimitiveValue primitiveValue) {
547547
String modified = null;
548548
if (typeName.equals("float")) {
549-
String thisValue = Float.valueOf(primitiveValue.getFloatValue()).toString();
549+
String thisValue = Float.toString(primitiveValue.getFloatValue());
550550
modified = snippet.replace("this", thisValue);
551551
} else if (typeName.equals("int")) {
552-
String thisValue = Integer.valueOf(primitiveValue.getIntValue()).toString();
552+
String thisValue = Integer.toString(primitiveValue.getIntValue());
553553
modified = snippet.replace("this", thisValue);
554554
} else if (typeName.equals("byte")) {
555-
String thisValue = Byte.valueOf(primitiveValue.getByteValue()).toString();
555+
String thisValue = Byte.toString(primitiveValue.getByteValue());
556556
modified = snippet.replace("this", thisValue);
557557
} else if (typeName.equals("long")) {
558-
String thisValue = Long.valueOf(primitiveValue.getLongValue()).toString();
558+
String thisValue = Long.toString(primitiveValue.getLongValue());
559559
modified = snippet.replace("this", thisValue);
560560
} else if (typeName.equals("short")) {
561-
String thisValue = Short.valueOf(primitiveValue.getShortValue()).toString();
561+
String thisValue = Short.toString(primitiveValue.getShortValue());
562562
modified = snippet.replace("this", thisValue);
563563
} else if (typeName.equals("double")) {
564-
String thisValue = Double.valueOf(primitiveValue.getDoubleValue()).toString();
564+
String thisValue = Double.toString(primitiveValue.getDoubleValue());
565565
modified = snippet.replace("this", thisValue);
566566
} else if (typeName.equals("boolean")) {
567-
String thisValue = Boolean.valueOf(primitiveValue.getBooleanValue()).toString();
567+
String thisValue = Boolean.toString(primitiveValue.getBooleanValue());
568568
modified = snippet.replace("this", thisValue);
569569
} else if (typeName.equals("char")) {
570-
String thisValue = Character.valueOf(primitiveValue.getCharValue()).toString();
570+
String thisValue = Character.toString(primitiveValue.getCharValue());
571571
modified = snippet.replace("this", thisValue);
572572
} else {
573573
modified = snippet;

0 commit comments

Comments
 (0)