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 21766

Summary: Custom property editors are not initialized properly.
Product: guibuilder Reporter: Pavel Flaska <pflaska>
Component: CodeAssignee: Tomas Pavek <tpavek>
Status: CLOSED FIXED    
Severity: blocker CC: jchalupa
Priority: P2    
Version: -FFJ-   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Pavel Flaska 2002-03-21 09:43:35 UTC
Steps to reproduce:
1. Go through the JDBC Wizard,
2. select a Rowset component,
3. on "Other properties" tab, try to open "Default Column Values" property editor.

You will get NullPointerException.
Comment 1 Tomas Pavek 2002-03-21 09:53:03 UTC
Proposed fix (quite simple, only one file affected):

diff -r1.40 FormCustomEditor.java
24a25,26
> import org.openide.explorer.propertysheet.PropertyEnv;
> import 
org.openide.explorer.propertysheet.ExPropertyEditor;
105a108
> PropertyEnv env = editor.getPropertyEnv();
110a114,115
> if (env != null && prEd instanceof ExPropertyEditor)
> ((ExPropertyEditor)prEd).attachEnv(env);


All property editors are initialized with PropertyEnv 
explicitly each time before their custom editors are used. 
This initialization can be redundant in some cases, but is 
quite safe. Similar fix have been already integrated
in dev trunk. Tested by QA.
Comment 2 Tomas Pavek 2002-03-25 13:01:10 UTC
Fix applied.
Comment 3 Richard Malaschitz 2002-04-02 12:29:06 UTC
Build 020401
Verified
Comment 4 Quality Engineering 2003-06-30 18:30:18 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.