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 201302070001) VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_11-b21 OS: Windows 7 User Comments: mienamoo: I searched in the module for a string that appears in a catch block. This exception occurred when I navigated to the code. jag: Editing catch clause with '|' jag: Editing catch jag: Attempted to "run" project Stacktrace: java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCCatch cannot be cast to com.sun.source.tree.TryTree at org.netbeans.modules.java.editor.semantic.MarkOccurrencesHighlighter.processImpl(MarkOccurrencesHighlighter.java:319) at org.netbeans.modules.java.editor.semantic.MarkOccurrencesHighlighter.run(MarkOccurrencesHighlighter.java:173) at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:737) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
Created attachment 131339 [details] stacktrace
Created attachment 131374 [details] stacktrace
Created attachment 131456 [details] stacktrace
In my case, it's catch( IOException | EJBTransactionRolledbackException ex ) {
Makes editing of some sources impossible, I dare setting P2. NetBeans IDE Build 201302020001
Created attachment 131484 [details] stacktrace Stepping over some code with the debugger, this is caused by an exception beeing thrown in the debugger when it accesses the data. Code below. TableColumn[] needResolving = new TableColumn[0]; boolean resolvLater = false; try { // Create an entity instance data = table.classFor.newInstance(); <-- Problem appears here when data is created } catch (InstantiationException | IllegalAccessException ex) { throw new RuntimeException(ex); } <-- This is thrown here! // A table.callPreLoad would have been here if it made any sense // Transform the data for (int col = 0; col < table.columns.length; col++) {
I stepped one line more after this had occured and then #658789 (report #198675) occured
Created attachment 131522 [details] stacktrace
This bug already has 10 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=198158
Created attachment 131688 [details] stacktrace I tried to use multicatch. Now this sring highlighted with red (as error) but source was changed to Java 7 after this error appeared.
reproducible my steps to reproduce: 1) have a code: try { FileReader fileReader = new FileReader(""); URL r = new URL("asadsadasdasda"); } catch (MalformedURLException ex) { Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex); } catch (FileNotFoundException ex) { Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex); } 2) apply 'change to multicatch' hint Product Version: NetBeans IDE Dev (Build 20130220-b02dbd2e0ef0) Java: 1.7.0_15; Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Created attachment 132746 [details] stacktrace CCE when calling code completion in following method: public void process (FooInnerClass callback) { System.out.println("callback"); String fieldName = ""; "".matches(""); Class clazz = callback.getClass(); try { final Field field = clazz.getField(fieldName); //marked as error } catch (IntrospectionException | SecurityException ex) { throw new RuntimeException(ex); } }
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/2afe7ca05491
Integrated into 'main-golden', will be available in build *201303232300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2afe7ca05491 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #226053 - Mishandled JDK 1.7 multi catch - fixed.
Verified with build 201305212300. Thanks to everybody involved!