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 144690 - Refactoring of package doesn't refactor bundles
Summary: Refactoring of package doesn't refactor bundles
Status: VERIFIED DUPLICATE of bug 138994
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 6.x
Hardware: PC All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-21 09:58 UTC by Petr Cyhelsky
Modified: 2008-08-21 13:01 UTC (History)
0 users

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 Petr Cyhelsky 2008-08-21 09:58:19 UTC
Product Version: NetBeans IDE Dev (Build 200808210201)
Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-120
System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb)

Observed: Refactoring package doesn't refactor internationalized strings belonging to the bundle in this package. For example:

java.util.ResourceBundle.getBundle("javaapplication31/Bundle").getString("foobar");

if package javaaplication31 is refactored to javaaplication666 the i18n string should be changed to:

java.util.ResourceBundle.getBundle("javaapplication666/Bundle").getString("foobar")

But in reality the string isn't changed at all so when the application is run the following occurs:

Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name javaapplication31/Bundle, locale en_US
        at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
        at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)
        at java.util.ResourceBundle.getBundle(ResourceBundle.java:549)
        at Javaap58.Main.main(Main.java:19)
Java Result: 1
BUILD SUCCESSFUL (total time: 4 seconds)

Expected: when refactoring if the refactored package contains bundles NB should check for all occurences of function java.util.ResourceBundle.getBundle 
and check/change parameter of these functions to new location of said bundle.

Steps to reproduce: Create new java project ->insert some i18n string via tools|internationalization| insert internationalized string(in the dialog create new 
bundle in some package) -> refactor | rename the package in which is this bundle -> check whether the internationalized string was updated (the 
parameter of getBundle function)
Comment 1 Tomas Pavek 2008-08-21 12:46:49 UTC

*** This issue has been marked as a duplicate of 138994 ***
Comment 2 Petr Cyhelsky 2008-08-21 13:01:39 UTC
verified duplicate