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 161573 - IllegalArgumentException: Incorrect number of type arguments
Summary: IllegalArgumentException: Incorrect number of type arguments
Status: REOPENED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Max Sauer
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-31 12:28 UTC by tionline
Modified: 2017-12-14 19:07 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 144724


Attachments
stacktrace (1.48 KB, text/plain)
2009-03-31 12:29 UTC, tionline
Details
stacktrace (2.00 KB, text/plain)
2017-12-14 19:07 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tionline 2009-03-31 12:28:57 UTC
Build: NetBeans IDE 6.5.1 (Build 200903060201)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.IllegalArgumentException: Incorrect number of type arguments
        at com.sun.tools.javac.model.JavacTypes.getDeclaredType0(JavacTypes.java:247)
        at com.sun.tools.javac.model.JavacTypes.getDeclaredType(JavacTypes.java:223)
        at org.netbeans.modules.java.hints.errors.Utilities.resolveCapturedTypeInt(Utilities.java:360)
        at org.netbeans.modules.java.hints.errors.Utilities.resolveCapturedType(Utilities.java:330)
        at org.netbeans.modules.java.hints.errors.AddCast.computeType(AddCast.java:161)
        at org.netbeans.modules.java.hints.errors.AddCast.run(AddCast.java:175)
Comment 1 tionline 2009-03-31 12:29:04 UTC
Created attachment 79129 [details]
stacktrace
Comment 2 Max Sauer 2009-04-16 14:49:45 UTC
Please provide a reproducible usecase or sample source, thanks.
Comment 3 Peter Pis 2009-09-03 08:34:51 UTC
Without requested information for long time - INVALID. We can't do anything in this case. Reporter, please add requested
information and reopen issue. Thanks in advance.
Comment 4 Jesse Glick 2017-10-19 18:36:36 UTC
Just happened to me. 44 duplicates over the past 8½ years.

> We can't do anything in this case.

is certainly not true: javac could be patched to specify which type arguments were passed to `getDeclaredType` and which type was requested and what its expected type arguments would be, and `Utilities.resolveCapturedTypeInt` could be improved to be more defensive (if the actual bug is not obvious from inspection at that point). None of these changes require a reproduction case.

(A similar-seeming #166466 was fixed without an apparent test case BTW.)
Comment 5 Jesse Glick 2017-12-14 19:07:09 UTC
Created attachment 165568 [details]
stacktrace

Updated dependencies in POM; download of artifacts not yet complete.