mbien commented on code in PR #5365:
URL: https://github.com/apache/netbeans/pull/5365#discussion_r1103722162


##########
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:
   The build fails without it since platform builds against 8 without nb-javac 
in the classpath.
   
   Java modules can "cheat" and use the RECORD enum directly since nb-javac 
adds it to the classpath due to the fact that it is currently based on javac of 
JDK 19.
   
   So its technically about backwards compatibility with JDK 8.



-- 
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

Reply via email to