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.
Summary: | [70cat] NullPointerException at org.netbeans.modules.properties.PropertiesOpen.messageOpening | ||
---|---|---|---|
Product: | utilities | Reporter: | narve <narve> |
Component: | Properties | Assignee: | Jiri Rechtacek <jrechtacek> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, asenk, choces, host, jbsabmello, jonycus, mmirilovic, MrIncrdbl, pjiricka, rgw21, sunbiz |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 176235 |
Attachments: |
stacktrace
stacktrace |
Description
narve
2011-01-28 12:18:43 UTC
Created attachment 105431 [details]
stacktrace
Created attachment 106749 [details]
stacktrace
This bug already has 20 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=176235 Reproduced when Bundle.properties and Bundle_en_EN.properties exist and Open is invoked from the popup on Bundle_en_EN.properties. MultiBundleStructure.findEntries() method fills "files" field with null because the interation through files in the folder does not find any matching fileobject and listFileObjects variable stays empty. The matching conditions need to be fixed. Caused by file which uses any non-existing locale or country code. Properties support suppose all name comes from Locale.getISOLanguages() and Locale.getISOCountries(). That's reason why y_no_NO works but x_en_EN doesn't. The support behaves magically once using non-existing codes. The possible patch can fix this NPE but still needed to review the assumption above. A hotfix applied by core-main/rev/a2254758bd9a Still needed a better handling of cases of <file-name>_<existing-locale>_<non-existing-country-which-is-existing-locale>.properties Integrated into 'main-golden', will be available in build *201103120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/a2254758bd9a User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #194805: a hotfix of NPE at org.netbeans.modules.properties.PropertiesOpen.messageOpening If this is planned to be fixed in 7.0, this bug should have the 70_HR_FIX_CANDIDATE keyword. If not, a waiver for 7.0 should be requested. Marian, could someone from your team verify the fix? If so, I'm going to backport it into release70 quickly. Thanks I tried to verify this bug: *Create new j2se project 'MyProject' with main class in package 'a' *Create new JFrame 'Frame' in MyProject in a *Insert some JLabel and JButton into Frame *In inspector on Form Frame node in properties (context menu on Form Frame node) check Automatic Internationalization -> Bundle.properties was created in package a *Context menu on Bundle.properties. Add-> Locale. Create two new Locale:Bundle_en_EN.properties,Bundle_no_NO.properties in package a *Invoke Open from context menu on all three *.properties files . EVERYTHING OK, NO EXCEPTION IS THROWN. *Delete Bundle.properties *Invoke Open from context menu on two rest *.properties files . EVERYTHING OK, NO EXCEPTION IS THROWN. Jirka, please, does this usecase cover this bug completely??? Adam, thanks for your scenario. Could you try in with recent RC build? If this NPE is thrown in RC build but is not in recent dev build, we can rate it as verified. Make it verified in that case. Thank you My scenario is OK. I tested it on: Product Version: NetBeans IDE 7.0 RC1 (Build 201103120000) Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02 System: Linux version 2.6.32-29-generic running on i386; UTF-8; cs_CZ (nb) the NullPointerException was thrown. So verified. backport to NB70 - http://hg.netbeans.org/releases/rev/6ca4e053e271 |