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.

Bug 152074

Summary: Find Subtypes on class name throws NPE
Product: python Reporter: Peter Lam <petersl>
Component: EditorAssignee: Torbjorn Norbye <tor>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: ide log file

Description Peter Lam 2008-11-01 08:38:06 UTC
build 126 (20081031)

From the following codes, 
- right click on the class name (Fruits, Apple, or Orange) 
- select Find Usages
- check 'Find All Subtypes' or 'Find Direct Subtypes Only'
- click Find button
result: Find Usages dialog indicates the following warning message. See attached ide log file for exception.
Module Python Editor threw java.lang.NullPointerException. Please report a bug against Python Editor module and attach
your var/log/messages.log.

class Fruits:
    def __init__ (self, name, info):
        self.name = name
        self.info = info

    def getname(self):
        return self.name

class Apple(Fruits):
    def getinfo(self):
        return self.info

class Orange(Fruits):
    def getinfo(self):
        return self.info
Comment 1 Peter Lam 2008-11-01 08:39:02 UTC
Created attachment 73037 [details]
ide log file
Comment 2 Torbjorn Norbye 2008-11-01 17:07:27 UTC
Find Subtypes was broken when there were no results (e.g. doing find usages on the 2nd and 3rd cases - it worked for the first).  Fixed in f7e02f8c4688.
Comment 3 Peter Lam 2008-11-05 07:26:48 UTC
verified in build 146 (20081104041628)