Skip to content

Commit ea13a4d

Browse files
author
Mykola Morhun
committed
Merge pull request eclipse-che#622 from eclipse/CHE-653
CHE-653: Change value fails with NullPointerException
2 parents 17aa7bb + 8815ce4 commit ea13a4d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • plugins/plugin-java/che-plugin-java-ext-debugger-java-server/src/main/java/org/eclipse/che/ide/ext/java/jdi/server

plugins/plugin-java/che-plugin-java-ext-debugger-java-server/src/main/java/org/eclipse/che/ide/ext/java/jdi/server/Debugger.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,10 @@ public void setValue(VariablePath variablePath, String valueExpression) throws D
549549
if ("static".equals(s)) {
550550
continue;
551551
}
552-
if (expression.length() > 0) {
552+
// Here we need !s.startsWith("[") condition because
553+
// we shouldn't add '.' between arrayName and index of a element
554+
// For example we can receive ["arrayName", "[index]"]
555+
if (expression.length() > 0 && !s.startsWith("[")) {
553556
expression.append('.');
554557
}
555558
expression.append(s);

0 commit comments

Comments
 (0)