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.

Bug 218805 - IllegalArgumentException: indent=-4 < 0
Summary: IllegalArgumentException: indent=-4 < 0
Status: RESOLVED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 222222 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-22 06:02 UTC by sreimers
Modified: 2012-11-16 11:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 192660


Attachments
stacktrace (5.35 KB, text/plain)
2012-09-22 06:02 UTC, sreimers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sreimers 2012-09-22 06:02:43 UTC
This bug was originally marked as duplicate of bug 217995, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201209210001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b03, Java(TM) SE Runtime Environment, 1.7.0_10-ea-b08
OS: Mac OS X

User Comments:
sreimers: Copying and pasting into xml file, then trying to format




Stacktrace: 
java.lang.IllegalArgumentException: indent=-4 < 0
   at org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString(IndentUtils.java:203)
   at org.netbeans.modules.xml.text.indent.XMLLexerFormatter.changePrettyText(XMLLexerFormatter.java:138)
   at org.netbeans.modules.xml.text.indent.XMLLexerFormatter.doReformat(XMLLexerFormatter.java:116)
   at org.netbeans.modules.xml.text.indent.XMLLexerFormatter$1.run(XMLLexerFormatter.java:102)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1353)
   at org.netbeans.modules.xml.text.indent.XMLLexerFormatter.reformat(XMLLexerFormatter.java:99)
Comment 1 sreimers 2012-09-22 06:02:47 UTC
Created attachment 124738 [details]
stacktrace
Comment 2 Svata Dedic 2012-09-24 10:49:47 UTC
Changeset: bd8f6716ebdd
Author:    Svata Dedic <sdedic@netbeans.org>
Date:      2012-09-24 12:49
Message:   Issue #218805 - IllegalArgumentException: indent=-4 < 0: fixed
Cleaned up code a bit, added guard against negative indents for unbalanced end tags and subsequent tokens
Comment 3 Quality Engineering 2012-09-26 02:11:00 UTC
Integrated into 'main-golden', will be available in build *201209260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bd8f6716ebdd
User: Svata Dedic <sdedic@netbeans.org>
Log: Issue #218805 - IllegalArgumentException: indent=-4 < 0: fixed
Cleaned up code a bit, added guard against negative indents for unbalanced end tags and subsequent tokens
Comment 4 Svata Dedic 2012-11-16 11:18:38 UTC
*** Bug 222222 has been marked as a duplicate of this bug. ***