Aufgrund einer Wartung wird GitLab am 18.01. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 18.01. between 8:00 and 9:00 am.

Unverified Commit 5a9c949e authored by Geertjan Wielenga's avatar Geertjan Wielenga Committed by GitHub
Browse files

Merge pull request #2570 from Mohan-Sarilla/netbeans-4447

[NETBEANS:4447]:Fixed NullPointerException while computing switch exp…
parents 2a1c235d e8e8fc5c
......@@ -3137,7 +3137,8 @@ public class Utilities {
}
break;
} else {
if (leftTreeName != null && leftTreeName.contentEquals(getLeftTreeName(statements.get(0)))) {
Name exprTree = getLeftTreeName(statements.get(0));
if (leftTreeName != null && exprTree != null && leftTreeName.contentEquals(exprTree)) {
break;
} else {
return false;
......@@ -3155,7 +3156,8 @@ public class Utilities {
}
firstCase = false;
}
if (leftTreeName != null && leftTreeName.contentEquals(getLeftTreeName(statements.get(0)))) {
Name exprTree = getLeftTreeName(statements.get(0));
if (leftTreeName != null && exprTree != null && leftTreeName.contentEquals(exprTree)) {
break;
} else {
return false;
......
......@@ -1905,6 +1905,13 @@ public class CasualDiff {
PositionEstimator est = EstimatorFactory.cases(oldT.getCases(), newT.getCases(), diffContext);
localPointer = diffList(oldT.cases, newT.cases, localPointer, est, Measure.MEMBER, printer);
List<JCCase> cases = newT.cases;
if (cases.size() != 0) {
String caseKind = String.valueOf(CasualDiff.getCaseKind(cases.get(0)));
if (caseKind.equals("RULE")) { // NOI18N
printer.newline();
}
}
copyTo(localPointer, bounds[1]);
return bounds[1];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment