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 200270 - NullPointerException at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.indentRegions
Summary: NullPointerException at org.netbeans.modules.editor.indent.TaskHandler$MimeIt...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Lexer (show other bugs)
Version: 7.0
Hardware: All All
: P1 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 203645 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-20 19:41 UTC by Tomas Mysik
Modified: 2011-10-24 14:08 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 170175


Attachments
stacktrace (1.18 KB, text/plain)
2011-07-20 19:41 UTC, Tomas Mysik
Details
stacktrace (5.91 KB, text/plain)
2011-10-13 09:59 UTC, Stepan Zebra
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-07-20 19:41:13 UTC
Build: NetBeans IDE Dev (Build 20110720-b38145cec97a)
VM: Java HotSpot(TM) 64-Bit Server VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Linux

User Comments:
gtzabari: Invoked code-format.

tmysik: format java file

GUEST: undo/redo and formatting java source




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.indentRegions(TaskHandler.java:435)
   at org.netbeans.modules.editor.indent.spi.Context.indentRegions(Context.java:258)
   at org.netbeans.modules.java.source.save.Reformatter.reformat(Reformatter.java:140)
   at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:548)
   at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:316)
   at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:357)
Comment 1 Tomas Mysik 2011-07-20 19:41:17 UTC
Created attachment 109542 [details]
stacktrace
Comment 2 Exceptions Reporter 2011-09-14 14:57:21 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=170175
Comment 3 Stepan Zebra 2011-10-13 09:59:34 UTC
Created attachment 111987 [details]
stacktrace

Product Version: NetBeans IDE Dev (Build 201110120600)
Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

Invoked Go To Source on newly created dataSet in J2ME project.
Comment 4 Dusan Balek 2011-10-13 13:02:33 UTC
NPE is thrown due to inactive TokenHierarchy
Comment 5 Dusan Balek 2011-10-20 07:00:15 UTC
*** Bug 203645 has been marked as a duplicate of this bug. ***
Comment 6 Miloslav Metelka 2011-10-20 09:17:01 UTC
This is regression due to fixing issue 150197. I have reverted it to eliminate this problem. I work out a more elaborate solution.
http://hg.netbeans.org/jet-main/rev/7a0d31a75b0a
Comment 7 Quality Engineering 2011-10-24 14:08:05 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/7a0d31a75b0a
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #200270 - NullPointerException at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.indentRegions