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.
Summary: | [71cat] UnsupportedOperationException: Not supported element kind:RESOURCE_VARIABLE Tree = 'session' | ||
---|---|---|---|
Product: | debugger | Reporter: | _ gtzabari <gtzabari> |
Component: | Java | Assignee: | Martin Entlicher <mentlicher> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | Cheloveche, lhochet, mmirilovic |
Priority: | P3 | ||
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 183532 |
Attachments: | stacktrace |
Description
_ gtzabari
2011-12-07 16:45:25 UTC
Created attachment 113932 [details]
stacktrace
Reproduced with a small program: public static void main(String[] args) { System.out.println("Hello World."); try (DataOutputStream os = new DataOutputStream(new FileOutputStream("/tmp/xTestHello.hello"));) { os.writeChars("Hello World!\n"); } catch (EOFException e) { } catch (IOException ioex) { System.err.println(ioex); } } When trying to evaluate "os" in debugger, it throws this exception. It's fixed by changeset: 208605:d7a5471edf3f http://hg.netbeans.org/main/rev/d7a5471edf3f I'm making this a candidate for 7.1 patch. Oops, the last comment was intended for issue #206096, please ignore. This is fixed by changeset: 208606:e586a7ee25ad http://hg.netbeans.org/main/rev/e586a7ee25ad Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/e586a7ee25ad User: mentlicher@netbeans.org Log: #206100 Handle resource variables. If I get it right, this issue is erroneously marked as candidate for 7.1.1. Correct? Well, it was marked as candidate for 7.1.1 by a mistake, but I've decided to leave it there, since the patch is very simple and very unlikely to do any harm. And users trying to use the new language features can easily run into this bug. I see. The problem is that I was not able to reproduce this exception even in 7.1. I toggled line breakpoint as indicated below, started debugging and invoked "Debug > Evaluate Expression...". Typed "os" and pushed "Evaluate code fragment" button. New "os" variable was created in "Variables" tab and no exception was thrown. public static void main(String[] args) { System.out.println("Hello World."); try { DataOutputStream os = new DataOutputStream(new FileOutputStream("/tmp/xTestHello.hello")); os.writeChars("Hello World!\n"); // Toggle line breakpoint here } catch (EOFException e) { } catch (IOException ioex) { System.err.println(ioex); } } Any exact steps to reproduce? Oh, sorry. This is JDK 7 specific issue. Reproduced in NetBeans 7.1 with JDK 7 and the original code fragment and verified as fixed in development build #201201170601 of NetBeans 7.2. Fix transplanted to release71_fixes branch: changeset: 218584:7e87846ed376 http://hg.netbeans.org/releases/rev/7e87846ed376 Increased specification version by changeset: 218587:50816e61e6b9 http://hg.netbeans.org/releases/rev/50816e61e6b9 The bug is fixed in NetBeans IDE 7.1.1 build #201202262200. |