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 255343

Summary: NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.ModelElementFactory.create
Product: javascript Reporter: sirmaxelot
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 219967
Attachments: stacktrace

Description sirmaxelot 2015-09-16 21:56:24 UTC
This bug was originally marked as duplicate of bug 253074, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.1 Beta (Build 201508041349)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Java(TM) SE Runtime Environment, 1.8.0_51-b16
OS: Windows 8

User Comments:
sirmaxelot: Added the JSDoc annotation "@extends Array" to a constructor. After that every code change throws this exception.

This code reproduces the error:

/**
 * @constructor
 * @class SufuegenExtension
 * @extends Array
 */
function SufuegenExtension(connector) {

};

SufuegenExtension.prototype = [];




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.javascript2.editor.model.impl.ModelElementFactory.create(ModelElementFactory.java:256)
   at org.netbeans.modules.javascript2.editor.model.impl.ModelVisitor.enter(ModelVisitor.java:1139)
   at jdk.nashorn.internal.ir.LiteralNode$ArrayLiteralNode.accept(LiteralNode.java:881)
   at jdk.nashorn.internal.ir.BinaryNode.accept(BinaryNode.java:178)
   at jdk.nashorn.internal.ir.ExecuteNode.accept(ExecuteNode.java:89)
   at org.netbeans.modules.javascript2.editor.model.impl.ModelVisitor.enter(ModelVisitor.java:925)
Comment 1 sirmaxelot 2015-09-16 21:56:27 UTC
Created attachment 156221 [details]
stacktrace
Comment 2 Petr Pisl 2015-09-17 08:05:10 UTC
Fixed in web-main. Thanks for the test case.
Comment 3 Quality Engineering 2015-09-18 01:40:49 UTC
Integrated into 'main-silver', will be available in build *201509180002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a31fa911b17b
User: Petr Pisl <ppisl@netbeans.org>
Log: #255343 - NullPointerException at org.netbeans.modules.javascript2.editor.model.impl.ModelElementFactory.create