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

Summary: IllegalArgumentException: Incorrect number of type arguments
Product: java Reporter: tionline <tionline>
Component: HintsAssignee: Max Sauer <msauer>
Status: REOPENED ---    
Severity: blocker CC: jglick
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=144724
Issue Type: DEFECT Exception Reporter: 144724
Attachments: stacktrace
stacktrace

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.