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 247421 - ClassCastException Type$ErrorType vs. Type$ArrayType
Summary: ClassCastException Type$ErrorType vs. Type$ArrayType
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.0.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-23 19:27 UTC by arittner
Modified: 2016-07-07 07:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Dump file (38.11 KB, application/octet-stream)
2014-09-23 19:27 UTC, arittner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description arittner 2014-09-23 19:27:07 UTC
Created attachment 149476 [details]
Dump file

I use a rare generic with arrays like: Type<Type[]<String>>

the exception

An error occurred during parsing of 'C:\Entw\Work\svn\4.2\suites\sXcustomers\sXcustdirectory\src\main\java\de\sepix\app\sxcustdirectory\ui\mapper\simple\SimpleConvertConfig.java'. Please report a bug against java/source and attach dump file 'C:\Users\arittner\AppData\Roaming\NetBeans\8.0\var\log\SimpleConvertConfig_2.dump'.
An error occurred during parsing of 'C:\Entw\Work\svn\4.2\suites\sXcustomers\sXcustdirectory\src\main\java\de\sepix\app\sxcustdirectory\ui\mapper\simple\SimpleConvertConfig.java'. Please report a bug against java/source and attach dump file 'C:\Users\arittner\AppData\Roaming\NetBeans\8.0\var\log\SimpleConvertConfig_2.dump'.
Caused: java.lang.ClassCastException: com.sun.tools.javac.code.Type$ErrorType cannot be cast to com.sun.tools.javac.code.Type$ArrayType
	at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.validateAnnotatedType(Attr.java:4780)
	at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.validateAnnotatedType(Attr.java:4731)
	at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitVarDef(Attr.java:4644)
	at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:852)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
	at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitMethodDef(Attr.java:4635)
	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
	at com.sun.tools.javac.comp.Attr$TypeAnnotationsValidator.visitClassDef(Attr.java:4695)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:692)
	at com.sun.tools.javac.comp.Attr.validateTypeAnnotations(Attr.java:4594)
	at com.sun.tools.javac.code.TypeAnnotations$2.run(TypeAnnotations.java:142)
	at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:155)
	at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:129)
	at com.sun.tools.javac.comp.Enter.complete(Enter.java:749)
	at com.sun.tools.javac.main.JavaCompiler.complete(JavaCompiler.java:1063)
	at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1025)
	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:370)
	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:310)
	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:653)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:519)
	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:174)
	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:620)
	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:256)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:733)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
ALL [null]: An error occurred during parsing of 'C:\Entw\Work\svn\4.2\suites\sXcustomers\sXcustdirectory\src\main\java\de\sepix\app\sxcustdirectory\ui\mapper\simple\SimpleConvertConfig.java'. Please report a bug against java/source and attach dump file 'C:\Users\arittner\AppData\Roaming\NetBeans\8.0\var\log\SimpleConvertConfig_2.dump'.


The bad news: If I save my files the NetBeans IDE stops working without any reaction.
Comment 1 arittner 2014-09-23 19:37:02 UTC
Tested it again, reproducible killing NetBeans with loosing my last changes.
Comment 2 arittner 2014-09-23 19:43:51 UTC
Ok, found the "problem"

The correct use is Type<Type<String>[]> NOT Type<Type[]<String>>. It was a typo. But it should not kill the NetBeans IDE.
Comment 3 Martin Balin 2016-07-07 07:18:38 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss