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 253000 - NullPointerException at org.netbeans.modules.java.hints.jdk.mapreduce.PreconditionsChecker.isIterbale
Summary: NullPointerException at org.netbeans.modules.java.hints.jdk.mapreduce.Precond...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-15 11:40 UTC by Jiri Prox
Modified: 2015-08-05 01:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 213750


Attachments
stacktrace (5.61 KB, text/plain)
2015-06-15 11:40 UTC, Jiri Prox
Details
stacktrace (5.68 KB, text/plain)
2015-07-21 08:37 UTC, Alexandr Scherbatiy
Details
stacktrace (9.75 KB, text/plain)
2015-07-21 08:55 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2015-06-15 11:40:38 UTC
Build: NetBeans Dev JDK9 branch (Build 201506120405)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.45-b02, Java(TM) SE Runtime Environment, 1.8.0_45-b14
OS: Windows 7

User Comments:
GUEST: in the middle of editing code for a maven web application.

jiriprox: NPE when clean & build project which depeneds on another project




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.java.hints.jdk.mapreduce.PreconditionsChecker.isIterbale(PreconditionsChecker.java:192)
   at org.netbeans.modules.java.hints.jdk.mapreduce.PreconditionsChecker.<init>(PreconditionsChecker.java:96)
   at org.netbeans.modules.java.hints.jdk.mapreduce.ForLoopToFunctionalHint.computeWarning(ForLoopToFunctionalHint.java:75)
   at sun.reflect.GeneratedMethodAccessor312.invoke(GeneratedMethodAccessor312.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
Comment 1 Jiri Prox 2015-06-15 11:40:41 UTC
Created attachment 154226 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2015-07-21 08:37:37 UTC
Created attachment 154755 [details]
stacktrace

edit code
Comment 3 Alexandr Scherbatiy 2015-07-21 08:55:37 UTC
Created attachment 154757 [details]
stacktrace

edit the code
Comment 4 Svata Dedic 2015-07-29 07:09:16 UTC
JDK9 branch specific, probably null TypeMirror is being returned instead of some error type. Should be fixed in trunk (checked for valid TypeMiror before processing), but also investigated if/why the return value from getTypeMirror() changed.
Comment 5 Exceptions Reporter 2015-08-04 01:06:21 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=213750
Comment 6 Svata Dedic 2015-08-04 07:50:41 UTC
Reported as well for mainline build, I am going to add the null check ... ignore the previous comment about JDK9/compiler.
Comment 7 Svata Dedic 2015-08-04 07:53:26 UTC
Fixed in jet-main#5ee1b6ff21ef
Comment 8 Quality Engineering 2015-08-05 01:19:37 UTC
Integrated into 'main-silver', will be available in build *201508050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/5ee1b6ff21ef
User: Svata Dedic <sdedic@netbeans.org>
Log: #253000: null check added; only valid types are inspected