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 19137 - Assigning strings to a component from a resource bundle corrupts resource bundle!
Summary: Assigning strings to a component from a resource bundle corrupts resource bun...
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 3.x
Hardware: All Linux
: P1 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-08 13:58 UTC by rost
Modified: 2003-07-01 09:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (912 bytes, patch)
2002-01-08 16:18 UTC, _ pkuzel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rost 2002-01-08 13:58:23 UTC
I have a resource bundle with english and german strings.

If I use the form editor to assign a string to a component (e.g. a button) and
choose the "Resource Bundle" method and the corresponding resource file is open,
the german string in the resource bundle is replaced with the english one.

This destroyed some hours of work for me... :-(

Greetings

Ronny Standtke
Comment 1 Tomas Pavek 2002-01-08 14:38:51 UTC
The "Resource Bundle" property editor is from i18n module, 
reassigning. The issue is simply reproducible...

I guess (but am not sure) the problem lies in
org.netbeans.modules.i18n.form.FormI18nStringEditor.CustomEditor.getPr
opertyValue() method...
Comment 2 _ pkuzel 2002-01-08 16:18:24 UTC
Created attachment 4010 [details]
Proposed patch
Comment 3 _ pkuzel 2002-01-08 16:21:00 UTC
Thanks Tomas it looks like you find the problem origin.

Peter could you comment on proposed patch (it seems to work)?
Comment 4 Peter Zavadsky 2002-01-08 17:31:33 UTC
I think the patch should be the solution.
The true flag means to replace/add the value for the key in all locales.
If is false, the key-value pair is just added to locales where the key
was missing, thus not replacing in those ones it exist already.
Comment 5 _ pkuzel 2002-01-08 17:43:01 UTC
FormI18nStringEditor.java
new revision: 1.12.14.1; previous revision: 1.12
Comment 6 pfelenda 2003-01-20 10:14:40 UTC
Verified in dev build 200301200100.
Comment 7 _ pkuzel 2003-02-04 17:53:00 UTC
The patch causes issue #29019. Going to rollback it.
Comment 8 _ pkuzel 2003-02-04 17:53:32 UTC
This issue is fixed as side effect of fixing issue #27601.
Comment 9 pfelenda 2003-03-03 11:03:44 UTC
Verified in dev build 200303030100.
Comment 10 Quality Engineering 2003-07-01 09:52:50 UTC
Resolved for 3.4 or earlier, no new info since then -> closing.