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 150319

Summary: IllegalArgumentException: indent=-7 < 0
Product: contrib Reporter: misterm <misterm>
Component: ScalaAssignee: _ dcaoyuan <dcaoyuan>
Status: STARTED ---    
Severity: blocker CC: buzzword, mcamou
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=120997
Issue Type: DEFECT Exception Reporter: 120997
Attachments: stacktrace
stacktrace

Description misterm 2008-10-16 06:32:42 UTC
Build: NetBeans IDE Dev (Build 200809300201)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Windows Vista, 6.0, x86
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalArgumentException: indent=-7 < 0
        at org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString(IndentUtils.java:200)
        at org.netbeans.modules.editor.indent.spi.Context.modifyIndent(Context.java:177)
        at org.netbeans.modules.scala.editing.ScalaFormatter$1.run(ScalaFormatter.java:310)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:294)
        at org.netbeans.modules.scala.editing.ScalaFormatter.reindent(ScalaFormatter.java:267)
        at org.netbeans.modules.scala.editing.ScalaFormatter.reindent(ScalaFormatter.java:140)
        at org.netbeans.modules.gsf.GsfIndentTask.reindent(GsfIndentTask.java:69)
        at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:502)
        at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:271)
        at org.netbeans.modules.editor.indent.IndentImpl.reindent(IndentImpl.java:232)
Comment 1 misterm 2008-10-16 20:12:31 UTC
Created attachment 72033 [details]
stacktrace
Comment 2 buzzword 2008-12-07 19:27:50 UTC
Build: NetBeans IDE Dev (Build 200811260201)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 
Writing scala code. Pressing enter to define a new lazy val in an object.

Stacktrace: 
java.lang.IllegalArgumentException: indent=-8 < 0
        at org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString(IndentUtils.java:200)
        at org.netbeans.modules.editor.indent.spi.Context.modifyIndent(Context.java:177)
        at org.netbeans.modules.scala.editing.ScalaFormatter$1.run(ScalaFormatter.java:310)
        at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:294)
        at org.netbeans.modules.scala.editing.ScalaFormatter.reindent(ScalaFormatter.java:267)
        at org.netbeans.modules.scala.editing.ScalaFormatter.reindent(ScalaFormatter.java:140)
Comment 3 buzzword 2008-12-07 19:28:00 UTC
Created attachment 74663 [details]
stacktrace
Comment 4 Exceptions Reporter 2009-04-23 21:06:57 UTC
This issue already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=120997
Comment 5 _ dcaoyuan 2009-05-19 11:57:57 UTC
Quick fix: rev/48024b4d0178