Mohan-Sarilla commented on a change in pull request #2570:
URL: https://github.com/apache/netbeans/pull/2570#discussion_r538587653
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
##########
@@ -1900,7 +1900,14 @@ protected int diffSwitch(JCSwitch oldT, JCSwitch newT,
int[] bounds) {
PositionEstimator est = EstimatorFactory.cases(oldT.getCases(),
newT.getCases(), diffContext);
localPointer = diffList(oldT.cases, newT.cases, localPointer, est,
Measure.MEMBER, printer);
- copyTo(localPointer, bounds[1]);
+ List<JCCase> cases = newT.cases;
+ if (cases.size() != 0) {
+ String caseKind =
String.valueOf(CasualDiff.getCaseKind(cases.get(0)));
+ if (caseKind.equals("RULE")) {
+ printer.newline();
Review comment:
@junichi11 , done with the changes requested
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
##########
@@ -1900,7 +1900,14 @@ protected int diffSwitch(JCSwitch oldT, JCSwitch newT,
int[] bounds) {
PositionEstimator est = EstimatorFactory.cases(oldT.getCases(),
newT.getCases(), diffContext);
localPointer = diffList(oldT.cases, newT.cases, localPointer, est,
Measure.MEMBER, printer);
- copyTo(localPointer, bounds[1]);
+ List<JCCase> cases = newT.cases;
+ if (cases.size() != 0) {
+ String caseKind =
String.valueOf(CasualDiff.getCaseKind(cases.get(0)));
+ if (caseKind.equals("RULE")) {
+ printer.newline();
+ }
+ }
+ copyTo(localPointer, bounds[1]);
Review comment:
@junichi11 , done with the changes requested
##########
File path:
java/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java
##########
@@ -3137,7 +3137,8 @@ public static boolean
isCompatibleWithSwitchExpression(SwitchTree st) {
}
break;
} else {
- if (leftTreeName != null &&
leftTreeName.contentEquals(getLeftTreeName(statements.get(0)))) {
+ Name exprTree = getLeftTreeName(statements.get(0));
Review comment:
@junichi11 , done with the changes requested
##########
File path:
java/java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java
##########
@@ -1900,7 +1900,14 @@ protected int diffSwitch(JCSwitch oldT, JCSwitch newT,
int[] bounds) {
PositionEstimator est = EstimatorFactory.cases(oldT.getCases(),
newT.getCases(), diffContext);
localPointer = diffList(oldT.cases, newT.cases, localPointer, est,
Measure.MEMBER, printer);
- copyTo(localPointer, bounds[1]);
+ List<JCCase> cases = newT.cases;
+ if (cases.size() != 0) {
+ String caseKind =
String.valueOf(CasualDiff.getCaseKind(cases.get(0)));
+ if (caseKind.equals("RULE")) {
Review comment:
@junichi11 , done with the changes requested
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists