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 20120920-47773ac111ae) VM: Java HotSpot(TM) 64-Bit Server VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05 OS: Linux User Comments: marfous: 1, have this source in .html file <script> alert(arguments); </script> 2, in the empty line write "fun" 3, press TAB to apply code template -> NPE bingalls: Tried to auto-format inline javascript rozwell: autoformatting html file with some issues Stacktrace: java.lang.NullPointerException at org.netbeans.modules.javascript2.editor.formatter.FormatTokenStream.getCoveringToken(FormatTokenStream.java:250) at org.netbeans.modules.javascript2.editor.formatter.FormatContext.getEmbeddingIndent(FormatContext.java:278) at org.netbeans.modules.javascript2.editor.formatter.JsFormatter$1.run(JsFormatter.java:224) at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:317) at org.netbeans.modules.javascript2.editor.formatter.JsFormatter.reformat(JsFormatter.java:118) at org.netbeans.modules.csl.core.GsfReformatTask$1.run(GsfReformatTask.java:105)
Created attachment 124613 [details] stacktrace
Reassign to phejl.
Fixed in web-main 6fb17a2b7902.
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/6fb17a2b7902 User: Petr Hejl <phejl@netbeans.org> Log: #218651 - NullPointerException at org.netbeans.modules.javascript2.editor.formatter.FormatTokenStream.getCoveringToken
Created attachment 124734 [details] stacktrace formatting js at the bottom of html
Created attachment 125074 [details] stacktrace I was formatting a segment of a html page with <Shift>+<Alt>+F. First I had a javascript error and thougth it was the reason, but then fixed the error and saved the file and it kept on happening.
*** Bug 219420 has been marked as a duplicate of this bug. ***
*** Bug 219591 has been marked as a duplicate of this bug. ***
*** Bug 219631 has been marked as a duplicate of this bug. ***
*** Bug 219902 has been marked as a duplicate of this bug. ***
*** Bug 220067 has been marked as a duplicate of this bug. ***
*** Bug 220651 has been marked as a duplicate of this bug. ***
This happened at my workstations on formatting HTML Source. After LONG investigation I found out, that there were non closing tags who caused the crashes. Which are: <input .... > and <br> chaning that to: <input .... /> and <br /> makes the source formatter happy.
*** Bug 222007 has been marked as a duplicate of this bug. ***
*** Bug 222266 has been marked as a duplicate of this bug. ***
*** Bug 223211 has been marked as a duplicate of this bug. ***
*** Bug 224167 has been marked as a duplicate of this bug. ***
*** Bug 227927 has been marked as a duplicate of this bug. ***
*** Bug 229941 has been marked as a duplicate of this bug. ***
*** Bug 234798 has been marked as a duplicate of this bug. ***
*** Bug 248027 has been marked as a duplicate of this bug. ***