Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 206543 - Permit @NbBundle.Messages on fields
Permit @NbBundle.Messages on fields
Product: platform
Classification: Unclassified
Component: -- Other --
All All
: P3 (vote)
: 7.2
Assigned To: Jesse Glick
Depends on:
Blocks: 190129
  Show dependency treegraph
Reported: 2011-12-19 15:34 UTC by Jesse Glick
Modified: 2012-01-04 15:43 UTC (History)
2 users (show)

See Also:

Proposed patch (10.44 KB, patch)
2011-12-19 16:18 UTC, Jesse Glick
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2011-12-19 15:34:05 UTC
There is no particular reason to forbid use of @Messages on fields, it was just not initially thought useful. In fact sometimes it is desirable; either code traditionally kept a localized String as a field (better refactored to be inlined of course), or the field initializer is of an anonymous inner class which uses a bundle string in some method.
Comment 1 Jesse Glick 2011-12-19 16:18:39 UTC
Created attachment 114308 [details]
Proposed patch
Comment 2 Jesse Glick 2011-12-19 16:19:01 UTC
Please review.
Comment 3 Jaroslav Tulach 2011-12-20 09:08:14 UTC
Right, I need that for issue 190129 as well.
Comment 4 Jesse Glick 2011-12-20 15:38:57 UTC
Makes sense; see the diff to the existing GroupOptionProcessor.
Comment 5 Jesse Glick 2012-01-03 14:58:30 UTC
core-main #a4ea1f7d8d68
Comment 6 Quality Engineering 2012-01-04 15:43:06 UTC
Integrated into 'main-golden'
User: Jesse Glick <>
Log: #206543: permit @NbBundle.Messages on fields.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo