[hg] main-silver: #225704: Type.name() and Type.signature() can ...

  • From:
  • To:
  • Subject: [hg] main-silver: #225704: Type.name() and Type.signature() can ...
  • Date: Tue, 12 Feb 2013 04:40:42 -0800

changeset 9d59047433b3 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/9d59047433b3
description:
        #225704: Type.name() and Type.signature() can throw 
ObjectCollectedException.

diffstat:

 debugger.jpda/gensrc/org/netbeans/modules/debugger/jpda/jdi/Generate.java    
           |   3 +++
 debugger.jpda/src/org/netbeans/modules/debugger/jpda/jdi/TypeWrapper.java    
           |  10 ++++++++--
 
debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java
 |   1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diffs (65 lines):

diff --git 
a/debugger.jpda/gensrc/org/netbeans/modules/debugger/jpda/jdi/Generate.java 
b/debugger.jpda/gensrc/org/netbeans/modules/debugger/jpda/jdi/Generate.java
--- 
a/debugger.jpda/gensrc/org/netbeans/modules/debugger/jpda/jdi/Generate.java
+++ 
b/debugger.jpda/gensrc/org/netbeans/modules/debugger/jpda/jdi/Generate.java
@@ -148,6 +148,9 @@
         Map<String, Set<Class>> InterfaceTypeExceptions = new 
LinkedHashMap<String, Set<Class>>();
         InterfaceTypeExceptions.put("superinterfaces", 
Collections.singleton((Class) com.sun.jdi.ClassNotPreparedException.class));
         EXCEPTIONS_BY_METHODS.put(com.sun.jdi.InterfaceType.class.getName(), 
InterfaceTypeExceptions);
+        Map<String, Set<Class>> TypeExceptions = new LinkedHashMap<String, 
Set<Class>>();
+        TypeExceptions.put("*", Collections.singleton((Class) 
com.sun.jdi.ObjectCollectedException.class));
+        EXCEPTIONS_BY_METHODS.put(com.sun.jdi.Type.class.getName(), 
TypeExceptions);
 
         Map<String, Set<Class>> ObjectReferenceExceptions = new 
LinkedHashMap<String, Set<Class>>();
         ObjectReferenceExceptions.put("setValue", 
Collections.singleton((Class) java.lang.IllegalArgumentException.class));
diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/jdi/TypeWrapper.java 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/jdi/TypeWrapper.java
--- 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/jdi/TypeWrapper.java
+++ 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/jdi/TypeWrapper.java
@@ -60,7 +60,7 @@
     private TypeWrapper() {}
 
     // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY
-    public static java.lang.String name(com.sun.jdi.Type a) throws 
org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {
+    public static java.lang.String name(com.sun.jdi.Type a) throws 
org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.ObjectCollectedExceptionWrapper {
         if 
(org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {
             
org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart(
                     "com.sun.jdi.Type",
@@ -81,6 +81,9 @@
         } catch (com.sun.jdi.VMDisconnectedException ex) {
             retValue = ex;
             throw new 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);
+        } catch (com.sun.jdi.ObjectCollectedException ex) {
+            retValue = ex;
+            throw new 
org.netbeans.modules.debugger.jpda.jdi.ObjectCollectedExceptionWrapper(ex);
         } catch (Error err) {
             retValue = err;
             throw err;
@@ -98,7 +101,7 @@
     }
 
     // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY
-    public static java.lang.String signature(com.sun.jdi.Type a) throws 
org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {
+    public static java.lang.String signature(com.sun.jdi.Type a) throws 
org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper, 
org.netbeans.modules.debugger.jpda.jdi.ObjectCollectedExceptionWrapper {
         if 
(org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {
             
org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart(
                     "com.sun.jdi.Type",
@@ -119,6 +122,9 @@
         } catch (com.sun.jdi.VMDisconnectedException ex) {
             retValue = ex;
             throw new 
org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper(ex);
+        } catch (com.sun.jdi.ObjectCollectedException ex) {
+            retValue = ex;
+            throw new 
org.netbeans.modules.debugger.jpda.jdi.ObjectCollectedExceptionWrapper(ex);
         } catch (Error err) {
             retValue = err;
             throw err;
diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java
 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java
--- 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java
+++ 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/AbstractObjectVariable.java
@@ -153,6 +153,7 @@
                 this.valueTypeName = TypeWrapper.name(valueType);
             } catch (InternalExceptionWrapper ex) {
                 Exceptions.printStackTrace(ex);
+            } catch (ObjectCollectedExceptionWrapper ex) {
             } catch (VMDisconnectedExceptionWrapper ex) {
             }
             this.valueTypeLoaded[0] = true;

[hg] main-silver: #225704: Type.name() and Type.signature() can ...

mentlicher 02/12/2013

Project Features

About this Project

Debugger was started in November 2009, is owned by tpavek, and has 29 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close