This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Create a web module 2. Create a JSP in this web module 3. Compile the JSP 4. Choose 'View Servlet' on this JSP 5. The servlet will be opened, but the exception in the attachment is thrown Worse, this exception keeps popping up when working with the IDE, which makes the IDE virtually unusable.
Created attachment 8718 [details] The exception stack trace
This was caused by Svata's fix of issue #30010. I am not sure how to solve it. Why does not JspServletCompilerSupport extend CompilerSupport?
Because it is implemented by delegating the compilation to another object. In such a case, it is more convenient to directly implement CompilerCookie, rather than subclassing CompilerSupport, which is unsuitable for this. Anyway, I believe JavaDataObject.getCookie(..) should behave as specified in the OpenAPIs documentation - the current implementation is against the OpenAPI javadoc. I am not familiar with issue #30010, but why does it has to be solved this hacky way ?
Apologies; I will try to find out a better test for this. e.g. iff someone asks for CompilerCookie and the CompilerSupport subclass will not be instanceof it, null will be returned. This particular CCE is caused by the fact that JavaNode asks for CompilerSupport, rather than for java module's own CS subclass -- that will be changed, too. Could that work ?
Sure. As long as the method does not return an instance that does not extend/implement the parameter class, I am fine.
/cvs/java/src/org/netbeans/modules/java/JavaDataObject.java,v <-- JavaDataObject.java new revision: 1.167; previous revision: 1.166 /cvs/java/src/org/netbeans/modules/java/JavaNode.java,v <-- JavaNode.java new revision: 1.94; previous revision: 1.93
*** Issue 30873 has been marked as a duplicate of this issue. ***
Verified in trunk