You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/09/17 18:30:30 UTC

[GitHub] [netbeans] eirikbakke edited a comment on issue #1496: [NETBEANS-3095] avoid null pointer exception in SplashPainter

eirikbakke edited a comment on issue #1496: [NETBEANS-3095] avoid null pointer exception in SplashPainter
URL: https://github.com/apache/netbeans/pull/1496#issuecomment-532344920
 
 
   I wouldn't worry about trying to reproduce the bug--it is, I think, a race condition involving the maxSteps variable. If my suggestion doesn't immediately cause any obvious problems, I'd just commit it and open another issue if there are further problems.
   
   With the proposed change, as long as init() is called before accessing statusBox, there will be no NPE on statusBox.
   
   Looking at all the accesses to statusBox (via Find Usages), they are always preceded by a call to init().
   
   In the case of SplashPainter.paint(), if init had not been called first, there would already have been an NPE on "image.paintIcon". You can throw in a call to init() at the top of SplashPainter.paint() to protect against the latter possibility as well.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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