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 242497 - NullPointerException at org.netbeans.modules.j2ee.jpa.verification.fixes.AbstractCreateRelationshipHint.modifyTargetClass
Summary: NullPointerException at org.netbeans.modules.j2ee.jpa.verification.fixes.Abst...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 8.0
Hardware: All All
: P2 normal with 2 votes (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-02 23:18 UTC by dao
Modified: 2014-07-09 15:05 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 208098


Attachments
stacktrace (2.45 KB, text/plain)
2014-03-02 23:18 UTC, dao
Details
stacktrace (2.45 KB, text/plain)
2014-04-26 22:20 UTC, vanob
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dao 2014-03-02 23:18:48 UTC
Build: NetBeans IDE Dev (Build 201402280001)
VM: Java HotSpot(TM) Client VM, 24.51-b03, Java(TM) SE Runtime Environment, 1.7.0_51-b13
OS: Windows 7

User Comments:
dao: Using fix hint "Create One-to-one" relationship on JPA entities




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.j2ee.jpa.verification.fixes.AbstractCreateRelationshipHint.modifyTargetClass(AbstractCreateRelationshipHint.java:425)
   at org.netbeans.modules.j2ee.jpa.verification.fixes.AbstractCreateRelationshipHint.access$1100(AbstractCreateRelationshipHint.java:103)
   at org.netbeans.modules.j2ee.jpa.verification.fixes.AbstractCreateRelationshipHint$3.run(AbstractCreateRelationshipHint.java:325)
   at org.netbeans.modules.j2ee.jpa.verification.fixes.AbstractCreateRelationshipHint$3.run(AbstractCreateRelationshipHint.java:312)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:649)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:639)
Comment 1 dao 2014-03-02 23:18:50 UTC
Created attachment 145705 [details]
stacktrace
Comment 2 vanob 2014-04-26 22:20:54 UTC
Created attachment 146961 [details]
stacktrace

Tried to create bidirectional ManyToOne relation inside an Entitiy class
Comment 3 Sergey Petrov 2014-06-09 10:22:55 UTC
can someone provide sample project where I can invoke this action?
Comment 4 Sergey Petrov 2014-07-07 20:07:30 UTC
http://hg.netbeans.org/web-main/rev/8665266f7b63
Comment 5 Quality Engineering 2014-07-09 02:46:46 UTC
Integrated into 'main-silver', will be available in build *201407090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8665266f7b63
User: Sergey B. Petrov <sj-nb@netbeans.org>
Log: #242497 it's safe to add simple null check to code introduced in 8.0