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.
Build: NetBeans IDE Dev (Build 090328) VM: Java HotSpot(TM) 64-Bit Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Linux, 2.6.26-1-amd64, amd64 User Comments: mpetras: Compiled module - and there were some errors. So I clicked on one of the compiler error message links in the Output window to open the location with error. The file was opened at the given location but I also got the AssertionError. Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79042 [details] stacktrace
Are you able to reproduce the issue on your sources?
I currently have no compilation errors in my sources - so I cannot reproduce this bug.
Build: NetBeans IDE Dev (Build 200903310200) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-56, Java(TM) SE Runtime Environment, 1.6.0_07-b06-146 OS: Mac OS X, 10.5.6, x86_64 User Comments: typed: dir = new File(); <return key> while editing a java file Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79162 [details] stacktrace
Build: NetBeans IDE Dev (Build 200903310200) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-56, Java(TM) SE Runtime Environment, 1.6.0_07-b06-146 OS: Mac OS X, 10.5.6, x86_64 User Comments: Was able to reproduce exception: 1) Start a new Java Class Lib project on a blank user directory 2) Create a new Java class and create any method (I used PSVM) 3) Type "File f" 4) Hit Meta+I to import java.io.file 5) On the same line, type "= new File()" The "File()" is not a typo, and there is no File constructor which takes no arguments. If I had to guess this is what triggered the exception. JSD Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79184 [details] stacktrace
Build: NetBeans IDE Dev (Build 200903310200) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-56, Java(TM) SE Runtime Environment, 1.6.0_07-b06-146 OS: Mac OS X, 10.5.6, x86_64 User Comments: "new InetAddress()" triggered the same exception Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79185 [details] stacktrace
Created attachment 79186 [details] threaddump
Build: NetBeans IDE Dev (Build 200903310200) VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33 OS: Linux, 2.6.27-11-generic, i386 User Comments: Opening a Java file in the editor. NetBeans seems to be very confused recently, it keeps claiming some of my classes are not there. I can't expand their name via Ctrl+Space, they get curly red lines everywhere and the open type dialog doesn't pick them up either. The Java file I tried to open belongs to one of those, so that might be related. Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79193 [details] stacktrace
Build: NetBeans IDE Dev (Build 200903310200) VM: Java HotSpot(TM) Server VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b03 OS: Linux, 2.6.28-11-generic, i386 User Comments: not sure... tried "fix imports"? Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79217 [details] stacktrace
Build: NetBeans IDE Dev (Build 200903310200) 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 User Comments: LineNumberReader reader = new LineNumberReader(new InputStreamReader(cmsServer.getInputStream(),"utf8")); List<String> lines = new ArrayList< String line = reader.readLine(); System.out.println("LINE: "+line); My cursor is after ArrayList< Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79220 [details] stacktrace
Reproducible. NONE type should not be passed as argument to TypeUtilities.isCastable(...) method. Reassigning to java.hints
Diky Dusane, fixed + added test. --- http://hg.netbeans.org/jet-main/rev/ed4bd9b13142
This issue has already 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=148534
Build: NetBeans IDE Dev (Build 090331) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-56, Java(TM) SE Runtime Environment, 1.6.0_07-b06-146 OS: Mac OS X, 10.5.6, x86_64 User Comments: Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79239 [details] stacktrace
Build: NetBeans IDE Dev (Build 090401) VM: Java HotSpot(TM) 64-Bit Server VM, 1.6.0_07-b06-56, Java(TM) SE Runtime Environment, 1.6.0_07-b06-146 OS: Mac OS X, 10.5.6, x86_64 User Comments: Stacktrace: java.lang.AssertionError at com.sun.tools.javac.code.Types$9.visitType(Types.java:938) at com.sun.tools.javac.code.Types$9.visitType(Types.java:1101) at com.sun.tools.javac.code.Type.accept(Type.java:96) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3561) at com.sun.tools.javac.code.Types.isCastable(Types.java:912) at com.sun.tools.javac.code.Types.isCastable(Types.java:894)
Created attachment 79251 [details] stacktrace
Integrated into 'main-golden', will be available in build *200904020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ed4bd9b13142 User: Max Sauer <msauer@netbeans.org> Log: #161450: AE at com.sun.tools.javac.code.Types$9.visitType
Verified no longer an issue on 200904011705 (i.e. M3). There is a warning however: WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.editor.java.JavaCompletionItem$ClassItem.substituteText(JavaCompletionItem.java:698)
Thanks for verification. The mentioned warning has nothing to do with this issue.
Just happened on the 7.0 development build 201012150001 - I just pasted some code into the Java editor from another Java source file.
This exception is becoming quite frequent and quite annoying on the current (7.0) dev builds, I just uploaded a bunch of stack traces. Caveat - it happens when you paste a code snippet with annotations, especially annotations containing list of values: @OneToOne(cascade={CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH}), and * IMPORTANT * proper import statements have not been created yet.
The latest reports (those against NB 7.0 dev builds) are duplicates of another already reported issue #193492. The original bug remains fixed.