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 - Custom property editors are not initialized properly.
Summary: Custom property editors are not initialized properly.
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: -FFJ-
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-21 09:43 UTC by Pavel Flaska
Modified: 2003-06-30 18:30 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.