mbien commented on issue #4402:
URL: https://github.com/apache/netbeans/issues/4402#issuecomment-1192312559

   > > i can probably fix this for final fields. Non-final would be harder to 
fix.
   > 
   > Good point. In my opinion, fixing it for final fields would be enough, 
because it would cover most common situations.
   > 
   > For non-final fields, I think it might be even impossible to achieve in 
some situations. Because the detection would depend on the order in which the 
re-assignations occurred.
   
   exactly. The way it works is that it records read/write operations in the 
first pass, the second pass looks at the declaration and prints the hint if its 
"unbalanced".
   
   an assignment "collection = foo" is marked as read+write and the hint is not 
shown. However, if we know that the field is final we can simply ignore 
assignments since we know that its the initial declaration and can't be 
anything else. The hint doesn't really know in which order things happen as you 
correctly said.
   
   
   


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