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 245338 - A java.lang.IllegalArgumentException exception has occured
Summary: A java.lang.IllegalArgumentException exception has occured
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: FindBugs (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Cyhelsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-01 10:09 UTC by Damine
Modified: 2014-07-11 08:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Damine 2014-07-01 10:09:54 UTC
I just tried to use the following declaration: 
"Map<Integer, Object> example = new HashMap<>();"
and the problem occured.

java.lang.IllegalArgumentException: int
	at com.sun.tools.javac.model.JavacTypes.getWildcardType(JavacTypes.java:209)
	at org.netbeans.modules.java.hints.jdk.IteratorToFor.iterable(IteratorToFor.java:130)
	at org.netbeans.modules.java.hints.jdk.IteratorToFor.whileIdiom(IteratorToFor.java:74)
	at sun.reflect.GeneratedMethodAccessor142.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
[catch] at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:303)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:788)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.doComputeHints(HintsInvoker.java:565)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:294)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:239)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:209)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:182)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:149)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:113)
	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:83)
	at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:298)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:559)
	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:735)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
Comment 1 Petr Cyhelsky 2014-07-11 01:52:11 UTC
I can not reproduce this after updating to findbugs 3.0.0, presumed fixed, please try it in build which integrates 3.0.0. Please reopen if it appears again.