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 214731 - NullPointerException: The element parameter cannot be null
Summary: NullPointerException: The element parameter cannot be null
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EJB (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-25 16:08 UTC by theshadow27
Modified: 2012-09-10 08:11 UTC (History)
9 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 189157


Attachments
stacktrace (2.45 KB, text/plain)
2012-06-25 16:08 UTC, theshadow27
Details
stacktrace (2.44 KB, text/plain)
2012-08-01 09:33 UTC, panason2008
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theshadow27 2012-06-25 16:08:40 UTC
Build: NetBeans IDE 7.2 Beta (Build 201205031832)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.8-b03-424, Java(TM) SE Runtime Environment, 1.6.0_33-b03-424-11M3720
OS: Mac OS X

User Comments:
theshadow27: Not sure what triggered, refactoring manually




Stacktrace: 
java.lang.NullPointerException: The element parameter cannot be null
   at org.openide.util.Parameters.notNull(Parameters.java:89)
   at org.netbeans.api.java.source.ElementHandle.createImpl(ElementHandle.java:429)
   at org.netbeans.api.java.source.ElementHandle.create(ElementHandle.java:388)
   at org.netbeans.modules.j2ee.ejbverification.rules.source.UseInjectionInsteadOfInstantionRule.useInjectionInsteadOfInstantion(UseInjectionInsteadOfInstantionRule.java:101)
   at sun.reflect.GeneratedMethodAccessor121.invoke(GeneratedMethodAccessor121.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Comment 1 theshadow27 2012-06-25 16:08:44 UTC
Created attachment 121309 [details]
stacktrace
Comment 2 Exceptions Reporter 2012-07-20 08:41:10 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=189157
Comment 3 panason2008 2012-08-01 09:33:44 UTC
Created attachment 122621 [details]
stacktrace
Comment 4 Exceptions Reporter 2012-08-28 06:40:57 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=189157
Comment 5 Martin Fousek 2012-08-28 07:36:54 UTC
10 duplicated in three months => P2

I know that we already passed patch1 nomination cut-off day, but do you think that would possible to nominate in addition this one? The fix is really safe - just the check for NPE.

If it wouldn't be possible I would like to put it at least to the patch2.

Fixed in web-main #a43e9fdb2453.
Comment 6 Petr Jiricka 2012-08-28 08:07:26 UTC
Cc'ing also Tomas Danek.
Comment 7 Tomas Danek 2012-08-28 08:38:34 UTC
I'm ok with putting this into patch1. Feel free to backport.
Comment 8 Martin Fousek 2012-08-28 11:45:45 UTC
(In reply to comment #7)
> I'm ok with putting this into patch1. Feel free to backport.

Thanks a lot Tomasi.

PetrH, could you review that change, please? It just prevents NPE when the element was not found (not resolved class).
Comment 9 Petr Hejl 2012-08-28 13:58:29 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > I'm ok with putting this into patch1. Feel free to backport.
> 
> Thanks a lot Tomasi.
> 
> PetrH, could you review that change, please? It just prevents NPE when the
> element was not found (not resolved class).

Seems to be safe.
Comment 10 Quality Engineering 2012-08-29 02:42:23 UTC
Integrated into 'main-golden', will be available in build *201208290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a43e9fdb2453
User: Martin Fousek <marfous@netbeans.org>
Log: #214731 - NullPointerException: The element parameter cannot be null
Comment 11 theshadow27 2012-08-29 18:55:48 UTC
Could not replicate on original build or patched build. Marking verified per Jiri
Comment 12 Martin Fousek 2012-08-30 16:51:38 UTC
(In reply to comment #11)
> Could not replicate on original build or patched build. Marking verified per
> Jiri

Thanks for verification. I'll transplant it tomorrow.
Comment 13 Jiri Kovalsky 2012-08-30 18:40:56 UTC
+1 Thanks for your verification!
Comment 14 Martin Fousek 2012-08-31 06:34:09 UTC
Transplanted into release72 branch of releases repository:

changeset:   237342:1bce136fcb94
branch:      release72
description:
#214731 - NullPointerException: The element parameter cannot be null
(transplanted from a43e9fdb2453ce8523f80299098bc98c388445fd)

changeset:   237343:8cc2f203d910
branch:      release72
description:
Spec. version and long description update for issue #214731
Comment 15 Quality Engineering 2012-09-01 11:04:54 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/1bce136fcb94
User: Martin Fousek <marfous@netbeans.org>
Log: #214731 - NullPointerException: The element parameter cannot be null
(transplanted from a43e9fdb2453ce8523f80299098bc98c388445fd)
Comment 16 Jiri Skrivanek 2012-09-10 08:11:58 UTC
No exact steps to reproduce but changeset looks OK.