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.
Created attachment 152982 [details] Code to reproduce As mentioned in the summary, if you debug the attached class with an exception break point, it stops at the UnsupportedOperationException (as expected). If you pop to the main method and then go back into the method, the clearly String param is now the UnsupportedOperationException. The jvm handles this surprisingly well, but is annoying when debugging.
This is clearly an issue in the debugger backend and we can not do anything with it in NetBeans. The printing in the programs proves that. Another prove is given by jdb, under which the program behaves in the same way: $ jdb -attach localhost:37535 Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable Initializing jdb ... > VM Started: No frames on the current call stack main[1] cont > Exception occurred: java.lang.UnsupportedOperationException (uncaught)"thread=main", exceptionbug.ExceptionBug.criticalMethod(), line=26 bci=48 main[1] pop main[1] where [1] exceptionbug.ExceptionBug.main (ExceptionBug.java:16) main[1] cont > Exception occurred: java.lang.UnsupportedOperationException (uncaught)"thread=main", exceptionbug.ExceptionBug.criticalMethod(), line=26 bci=48 main[1] print importantString importantString = "java.lang.UnsupportedOperationException: Kaboom!" In the mean time, the program prints out: $ java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:37535 -classpath /tmp/NetBeansProjects/ExceptionBug/build/classes exceptionbug.ExceptionBug Listening for transport dt_socket at address: 37535 java.lang.String java.lang.String java.lang.UnsupportedOperationException java.lang.UnsupportedOperationException
So, should I report this to the Java bug tracker thing?
I've submitted: https://bugs.openjdk.java.net/browse/JDK-8076579
You can add a vote... :-) Thanks.