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.
Build: NetBeans IDE Dev (Build 20110719-8ca1f1e028ab) VM: OpenJDK 64-Bit Server VM, 19.0-b09, OpenJDK Runtime Environment, 1.6.0_20-b20 OS: Linux User Comments: jlahoda: Undoing a pretty big edit (the original edit was commenting-out ~200 lines of code, containg strings). I also have another part of the code seleced (also contains strings). Stacktrace: java.lang.NullPointerException at org.netbeans.lib.lexer.LexerUtilsConstants.innerLanguage(LexerUtilsConstants.java:178) at org.netbeans.api.lexer.TokenSequence.language(TokenSequence.java:161) at org.netbeans.modules.javadoc.highlighting.Highlighting.tokenHierarchyChanged(Highlighting.java:117) at sun.reflect.GeneratedMethodAccessor86.invoke(GeneratedMethodAccessor86.java:0) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616)
Created attachment 109552 [details] stacktrace
This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=179471
Created attachment 109614 [details] stacktrace Undoing changes after formatting code. I have just pasted code from http://download.oracle.com/javase/tutorial/java/nutsandbolts/switch.html page to simulate the Java 7 for formatted the code. After that, I tried to undo the format action and the exception showed up.
Created attachment 109649 [details] stacktrace editing java code
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=179471
Created attachment 109939 [details] stacktrace revert modifications
Created attachment 110036 [details] stacktrace It is possibly minor use case. To reproduce: - create a new java class - copy the following to class definition addTest(.class,.tests). addTest(.class,.tests). addTest(.class,.tests). addTest(.class,.tests). addTest(.class,.tests). addTest(.class,.tests). addTest(.class,.tests). - format the code (Alt+Shift+F) - undo changes (Ctrl+Z) and exception is thrown
Created attachment 110131 [details] stacktrace Did undo in java source file.
Created attachment 110195 [details] stacktrace I pressed Ctrl+Z for undo.
Created attachment 110307 [details] stacktrace
I noticed this while filling issue 201503 and it is always reproducible for me and results into damaging my source file. Hence P1. Here are the steps to reproduce: * create new Java Classes library project * using New File->Web-Servlet wizard create abc.NewServlet class. on lines 35 to 40 there is try { /* * TODO output your page here out.println("<html>"); * out.println("<head>"); out.println("<title>Servlet * NewServlet</title>"); out.println("</head>"); * out.println("<body>"); out.println("<h1>Servlet NewServlet at " + * request.getContextPath () + "</h1>"); out.println("</body>"); * out.println("</html>"); */ } finally { * remove all comments on lines 35 to 40 so that source code looks like (yes, I accidentally left some comment text in code): try { TODO output your page here out.println("<html>"); out.println("<head>"); out.println("<title>Servlet NewServlet</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet NewServlet at " + request.getContextPath () + "</h1>"); out.println("</body>"); out.println("</html>"); } finally { * press ALT-Shift-F * press CTRL-Z - this NPE exception is thrown * keep pressing CTRL-Z to revert all the changes you did. In my case the result is always: try { /* TODO output* your page here out .println("<html>"); *out.println("<head>"); out.println( "<tit*le>Servlet NewServlet< /title > ")*; out.println(" < / head > "); out.println("<body>");* out.println("<h1>Servlet NewServlet at " + *request.getContextPath() + "</h1>"); */ out.println("</body>"); out.println("</html>"); } finally {
Created attachment 110319 [details] stacktrace Tried undo (Ctrl-Z) after formatting a file.
http://hg.netbeans.org/jet-main/rev/b6c25aa74205
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/b6c25aa74205 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #200280 - NullPointerException at org.netbeans.lib.lexer.LexerUtilsConstants.innerLanguage.
Getting this though updating daily - probably sth. has been reverted, or spec version hasn't been upgraded.
I have increased spec version for you to get AU propagation. Next time please just write a note and do not reopen the issue when it was already fixed. http://hg.netbeans.org/jet-main/rev/036cc0deb669
(In reply to comment #16) > I have increased spec version for you to get AU propagation. Next time please > just write a note and do not reopen the issue when it was already fixed. > http://hg.netbeans.org/jet-main/rev/036cc0deb669 No problem. I've just been confused, if sth. has changed, or if it was spec version.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/036cc0deb669 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #200280 - NullPointerException at org.netbeans.lib.lexer.LexerUtilsConstants.innerLanguage - increased lexer module spec version for AU propagation.
*** Bug 200763 has been marked as a duplicate of this bug. ***
*** Bug 202214 has been marked as a duplicate of this bug. ***
(In reply to comment #15) > Getting this though updating daily Download fresh dev builds.