javaclass

Changeset

165:36fc18633fec
2005-02-13 Paul Boddie raw files shortlog changelog graph Fixed superclass retrieval so that undefined superclasses denote the standard inheritance from java.lang.Object.
javaclass/classfile.py (file)
     1.1 --- a/javaclass/classfile.py	Thu Jan 27 23:31:52 2005 +0100
     1.2 +++ b/javaclass/classfile.py	Sun Feb 13 01:33:26 2005 +0100
     1.3 @@ -613,7 +613,12 @@
     1.4          index = u2(s[0:2])
     1.5          return self.constants[index - 1], s[2:]
     1.6  
     1.7 -    _get_super_class = _get_this_class
     1.8 +    def _get_super_class(self, s):
     1.9 +        index = u2(s[0:2])
    1.10 +        if index != 0:
    1.11 +            return self.constants[index - 1], s[2:]
    1.12 +        else:
    1.13 +            return None, s[2:]
    1.14  
    1.15      def _get_interfaces(self, s):
    1.16          interfaces = []