sid-srini commented on code in PR #8827:
URL: https://github.com/apache/netbeans/pull/8827#discussion_r2348293523
##########
java/java.source.base/src/org/netbeans/api/java/source/GeneratorUtilities.java:
##########
@@ -1355,13 +1412,32 @@ private CompilationUnitTree
addImports(CompilationUnitTree cut, List<? extends I
el = currentToImportElement.getEnclosingElement();
break;
}
- Integer cnt = el == null ? Integer.valueOf(0) : isStatic ?
typeCounts.get((TypeElement)el) : pkgCounts.get((PackageElement)el);
- if (explicitNamedImports.contains(currentToImportElement))
+ final int cnt;
+ if (explicitNamedImports.contains(currentToImportElement)) {
cnt = 0;
+ } else {
+ Integer enclosingStarCnt = el == null ? null : isStatic ?
typeCounts.get((TypeElement)el) : pkgCounts.get((PackageElement)el);
Review Comment:
Thank you. I have split the earlier ternary expression into these lines
before adding the module-import specific checks. I will take a re-look to
simplify if possible. Thanks.
--
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.
To unsubscribe, e-mail: [email protected]
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