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.
NB 5.0 dev build 051101 JDK 1.5.0_05 BadLocationException is thrown when trying to reformat jsp file containing just one line. Steps to reproduce: 1) create JSP file 2) remove all line except one (delete others or remove newline chars) 3) call Reformat code javax.swing.text.BadLocationException: Invalid offset=-1 not within <0, 6> at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1227) at org.netbeans.editor.Utilities.checkOffsetValid(Utilities.java:1222)
Created attachment 26567 [details] exception
Marku, could you look at this? It look's like a regrassion.
Petre, it is not about indentation but only about "reformatting". The exception is printed into console only when the user invokes "reformat code" action on one line JSP.
to reporoduce delete the entire document content, put a text on the first line and invoke reformat code.
fixed. IDE: [1/12/06 10:08 AM] Committing "HTMLFormatter.java" started Checking in HTMLFormatter.java; /cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLFormatter.java,v <-- HTMLFormatter.java new revision: 1.21; previous revision: 1.20
verified