Merge pull request #622 from eclipse/CHE-653

CHE-653: Change value fails with NullPointerException
6.19.x
Mykola Morhun 2016-03-03 13:03:20 +02:00
commit ea13a4dc30
1 changed files with 4 additions and 1 deletions

View File

@ -549,7 +549,10 @@ public class Debugger implements EventsHandler {
if ("static".equals(s)) {
continue;
}
if (expression.length() > 0) {
// Here we need !s.startsWith("[") condition because
// we shouldn't add '.' between arrayName and index of a element
// For example we can receive ["arrayName", "[index]"]
if (expression.length() > 0 && !s.startsWith("[")) {
expression.append('.');
}
expression.append(s);