mbien commented on a change in pull request #3764:
URL: https://github.com/apache/netbeans/pull/3764#discussion_r824828348



##########
File path: 
ide/schema2beans/src/org/netbeans/modules/schema2beansdev/gen/JavaUtil.java
##########
@@ -874,10 +874,16 @@ public static int getOptimialHashMapSize(Object[] keys, 
int maxSize) {
                 }
                 return table.length;
             }
-        } catch (java.lang.IllegalAccessException e) {
-            return defaultAnswer;
-        } catch (java.lang.NoSuchFieldException e) {
+        } catch (IllegalAccessException | NoSuchFieldException e) {
             return defaultAnswer;
+        } catch (RuntimeException ex) {
+            // todo: remove this workaround post JDK 9+ migration
+            // modules on modern JDKs should prefere immutable collections 
anyway, e.g Map.of();

Review comment:
       please no - things are complex enough already lets try to remove 
workarounds instead of adding more :)




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