[hg] main-silver: Return null Super if there is no super class. ...

  • From:
  • To:
  • Subject: [hg] main-silver: Return null Super if there is no super class. ...
  • Date: Wed, 13 Feb 2013 11:12:52 -0800

changeset 0ec2b99ac6b7 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/0ec2b99ac6b7
description:
        Return null Super if there is no super class. This prevents from 
returning a null class from Super.

diffstat:

 
debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/JPDAClassTypeImpl.java
 |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (17 lines):

diff --git 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/JPDAClassTypeImpl.java
 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/JPDAClassTypeImpl.java
--- 
a/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/JPDAClassTypeImpl.java
+++ 
b/debugger.jpda/src/org/netbeans/modules/debugger/jpda/models/JPDAClassTypeImpl.java
@@ -145,7 +145,12 @@
     public Super getSuperClass() {
         if (classType instanceof ClassType) {
             try {
-                return new SuperVariable(debugger, null, 
ClassTypeWrapper.superclass((ClassType) classType), getName());
+                ClassType superClass = 
ClassTypeWrapper.superclass((ClassType) classType);
+                if (superClass == null) {
+                    return null;
+                } else {
+                    return new SuperVariable(debugger, null, superClass, 
getName());
+                }
             } catch (InternalExceptionWrapper ex) {
                 return null;
             } catch (VMDisconnectedExceptionWrapper ex) {

[hg] main-silver: Return null Super if there is no super class. ...

mentlicher 02/13/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 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close