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 205217 - java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key MSG_ConfirmDeleteObject
Summary: java.util.MissingResourceException: Can't find resource for bundle org.openid...
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: REGRESSION
: 205246 205290 (view as bug list)
Depends on: 205230
Blocks: 204945
  Show dependency tree
 
Reported: 2011-11-16 17:40 UTC by Jesse Glick
Modified: 2011-11-24 15:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 182964


Attachments
stacktrace (4.53 KB, text/plain)
2011-11-16 17:40 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-11-16 17:40:21 UTC
Build: NetBeans IDE Dev (Build 20111116-b4494087e0bb)
VM: Java HotSpot(TM) Client VM, 20.4-b02, Java(TM) SE Runtime Environment, 1.6.0_29-b11
OS: Linux

User Comments:
jglick: Deleting an icon. Assign to mentlicher.




Stacktrace: 
java.util.MissingResourceException: Can't find resource for bundle org.openide.util.NbBundle$PBundle, key MSG_ConfirmDeleteObject
   at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
   at java.util.ResourceBundle.getString(ResourceBundle.java:334)
   at org.openide.util.NbBundle.getMessage(NbBundle.java:642)
   at org.openide.util.NbBundle.getMessage(NbBundle.java:736)
   at org.openide.util.NbBundle.getMessage(NbBundle.java:658)
   at org.netbeans.modules.refactoring.spi.impl.SafeDeleteAction.doConfirm(SafeDeleteAction.java:206)
Comment 1 Jesse Glick 2011-11-16 17:40:24 UTC
Created attachment 113267 [details]
stacktrace
Comment 2 Jesse Glick 2011-11-16 18:18:38 UTC
NbBundle.getMessage(ExtendedDelete.class, "MSG_ConfirmDeleteObject", sel[0].getDisplayName()) broken by 40571e33eed7.
Comment 3 Martin Entlicher 2011-11-16 18:46:34 UTC
This should be really highlighted in the Bundle.properties file that the messages are used from various other places.
Comment 4 Martin Entlicher 2011-11-16 18:57:39 UTC
Fixed by changeset:   207383:bf5e20da443b
http://hg.netbeans.org/main/rev/bf5e20da443b
Comment 5 Jesse Glick 2011-11-16 19:36:51 UTC
Better fix would be to revert bf5e20da443b and instead create a Bundle.properties in the refactoring module and copy these keys (then optionally switch to @Messages) so that no one need remember this in the future. Please consider doing this after 7.1 is branched. And use:

hg locate -r. -0 \*\*.java | xargs -0 grep -l MSG_ConfirmDeleteObject

where you can see that various functional tests are still referring to the old location.

Also note that MSG_ConfirmDelete{Folder,Shadow}{,Title} are unused.
Comment 6 Martin Entlicher 2011-11-16 21:24:46 UTC
I think that adding the keys back was the safest last-minute fix.
I do not have time for complex solutions for things that are badly designed for a long time already, few days before the code freeze.

I've created issue #205230 to solve this.
Though I'm not convinced that copying of the messages into several locations is the best solution. I think that they should be translated in the same way and thus it's best to have them at one place.
Comment 7 Quality Engineering 2011-11-17 07:27:38 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/bf5e20da443b
User: mentlicher@netbeans.org
Log: #205217: The removed messages added back, they are accessed from various other places.
Comment 8 Jan Becicka 2011-11-18 07:25:04 UTC
*** Bug 205246 has been marked as a duplicate of this bug. ***
Comment 9 Jiri Prox 2011-11-18 12:51:23 UTC
*** Bug 205290 has been marked as a duplicate of this bug. ***
Comment 10 Jiri Prox 2011-11-24 15:09:57 UTC
verified