lkishalmi commented on code in PR #5365:
URL: https://github.com/apache/netbeans/pull/5365#discussion_r1103674348
##########
platform/openide.util/src/org/netbeans/modules/openide/util/NbBundleProcessor.java:
##########
@@ -309,8 +311,12 @@ private String findCompilationUnitName(Element e) {
case INTERFACE:
case ENUM:
case ANNOTATION_TYPE:
- switch (e.getEnclosingElement().getKind()) {
- case PACKAGE:
+ if (e.getEnclosingElement().getKind() == PACKAGE) {
+ return e.getSimpleName().toString();
+ }
+ }
+ if ("RECORD".equals(e.getKind().name())) {
Review Comment:
I guess the string matching is due to future compatibility, is it?
The indentation of the switch case block is bad, but I guess that how it was
before this change, might fix that for the readability.
--
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