jlahoda commented on issue #363: Work around an AssertionError
URL: 
https://github.com/apache/incubator-netbeans/pull/363#issuecomment-357060249
 
 
   I am sorry, but I am not a big fan of doing workarounds this way. I think 
that ideally, when doing a workaround, we would have:
   -a bug reported to the upstream/JDK (for which typically having a 
reproducible testcase would be highly desirable)
   -a testcase in our code reproducing/showing the problem 
   -the workaround annotated with the upstream bug, our bug, the location of 
the test, etc.
   -the workaround as universally as possible and in as "base" module as 
possible (i.e. in modules like lib.nbjavac, java.source.base, etc.) A 
workaround in the infrastructure seems to be better than a workaround in the 
features, as workarounds in infrastructure are probably less intrusive than 
workaround scattered across feature modules.
   
   All this is to ensure we can remove the workaround at some point - allowing 
the root bug to be fixed, ensuring we can detect what we should remove and 
validate that the workaround is no longer needed.
   
   I can understand that doing all those is sometimes complex, but before doing 
workarounds, we should at least investigate the above.
   
   In particular, for this workaround, there are hundreds/thousands of 
invocations of Trees.getElement. I am not sure if this place is special (I 
suspect not), so there seems to be a danger that a workaround like this would 
need to be duplicated on other places. I believe it should be possible to wrap 
the Trees from javac with our custom modules and handle the error there.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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