You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "mbien (via GitHub)" <gi...@apache.org> on 2025/09/07 01:18:11 UTC

[PR] Simplify JavaCodeTemplateFilter#accept [netbeans]

mbien opened a new pull request, #8794:
URL: https://github.com/apache/netbeans/pull/8794

   Calling contains on the list should be more efficient compared to copying the list into `EnumSet` + `HashSet` first just to call contains on them.
   
   Simpler code which doesn't catch IAEs during regular execution which would show up in JFR logs during auto completion.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Simplify JavaCodeTemplateFilter#accept [netbeans]

Posted by "lkishalmi (via GitHub)" <gi...@apache.org>.
lkishalmi commented on PR #8794:
URL: https://github.com/apache/netbeans/pull/8794#issuecomment-3358481804

   Just a question. Were the copy made to avoid some concurrent modification exceptions?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Simplify JavaCodeTemplateFilter#accept [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien merged PR #8794:
URL: https://github.com/apache/netbeans/pull/8794


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: [PR] Simplify JavaCodeTemplateFilter#accept [netbeans]

Posted by "mbien (via GitHub)" <gi...@apache.org>.
mbien commented on PR #8794:
URL: https://github.com/apache/netbeans/pull/8794#issuecomment-3358538094

   > Just a question. Were the copy made to avoid some concurrent modification exceptions?
   
   I don't think so. Before we had `for(String context : contexts)` which created the two Sets. Now we have `contexts.contains()`. 
   
   The for-loop would be able to throw CMEs too if the list is modified while iterating. I am also pretty sure that the context list is immutable. (it lists all the places where a abbreviation like "psvm" can be used, e.g CLASS level)


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists