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 254642 - AssertionError: FormatToken{kind=TEXT, offset=4099, text=(, id=BRACKET_LEFT_PAREN}
Summary: AssertionError: FormatToken{kind=TEXT, offset=4099, text=(, id=BRACKET_LEFT_P...
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-24 09:35 UTC by Martin Fousek
Modified: 2016-04-21 14:15 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 219381


Attachments
stacktrace (7.34 KB, text/plain)
2015-08-24 09:35 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fousek 2015-08-24 09:35:45 UTC
This bug was originally marked as duplicate of bug 245896, 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 20150816-1eb2682dcaed)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13
OS: Linux

User Comments:
marfous: This piece of code introduced the AE:
LayoutManager.prototype.loadTemplate = function(callback) {
        if (!this._loadedLayoutSetup
                || this._loadedLayoutSetup !== this.getLayoutSetup()
        this._loadTemplateAsync.getResult(callback);
    };




Stacktrace: 
java.lang.AssertionError: FormatToken{kind=TEXT, offset=4099, text=(, id=BRACKET_LEFT_PAREN}
   at org.netbeans.modules.javascript2.editor.formatter.FormatVisitor.markSpacesWithinParentheses(FormatVisitor.java:1023)
   at org.netbeans.modules.javascript2.editor.formatter.FormatVisitor.enter(FormatVisitor.java:267)
   at jdk.nashorn.internal.ir.IfNode.accept(IfNode.java:78)
   at org.netbeans.modules.javascript2.editor.formatter.FormatVisitor.handleBlockContent(FormatVisitor.java:924)
   at org.netbeans.modules.javascript2.editor.formatter.FormatVisitor.handleStandardBlock(FormatVisitor.java:797)
   at org.netbeans.modules.javascript2.editor.formatter.FormatVisitor.enter(FormatVisitor.java:126)
Comment 1 Martin Fousek 2015-08-24 09:35:49 UTC
Created attachment 155572 [details]
stacktrace
Comment 2 Petr Hejl 2016-04-21 14:15:47 UTC
Keeping assertions there. It should format good enough with assertions disabled.
web-main b6047fd83b76