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 206543

Summary: Permit @NbBundle.Messages on fields
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: Jesse Glick <jglick>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, yardus
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 190129    
Attachments: Proposed patch

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'
Changeset: http://hg.netbeans.org/main-golden/rev/a4ea1f7d8d68
User: Jesse Glick <jglick@netbeans.org>
Log: #206543: permit @NbBundle.Messages on fields.