jlahoda commented on pull request #2294:
URL: https://github.com/apache/netbeans/pull/2294#issuecomment-670343105


   @vieiro 
   
   > Just a quick question (don't have to do a thorough review, I'm afraid). Do 
you think this static final is going to cause threading/memory problems?
   > 
   > ` private static final TextDocumentSyncServerCapabilityHandler h = new 
TextDocumentSyncServerCapabilityHandler();`
   > `
   
   I hope not. The instance was no free-able anyway (it was added as a listener 
to EditorRegistry and never removed). And final fields should be safe to access 
from any thread (static fields are initialized under a classloading lock 
(non-static final fields are also accessible from anywhere after the 
constructor finishes, AFAIK)).


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

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