Bug 221381 - Enhance SuppressWarnings annotation with justification
Enhance SuppressWarnings annotation with justification
Status: RESOLVED FIXED
Product: apisupport
Classification: Unclassified
Component: Harness
7.3
PC All
: P2 (vote)
: 7.4
Assigned To: Petr Hejl
issues@apisupport
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-02 17:54 UTC by Petr Hejl
Modified: 2013-01-30 03:41 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
patch (2.33 KB, patch)
2012-11-02 18:09 UTC, Petr Hejl
Details | Diff
updated patch (116.19 KB, patch)
2013-01-25 15:52 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2012-11-02 17:54:00 UTC
The SuppressWarnings annotation should have optional attribute containing justification for a supression.
Comment 1 Petr Hejl 2012-11-02 18:09:36 UTC
Created attachment 127038 [details]
patch
Comment 2 Petr Hejl 2012-11-02 18:10:34 UTC
Please review.
Comment 3 Milos Kleint 2012-11-02 18:57:16 UTC
MK1: what happens with the justification? is it used somewhere? or it's just a replacement for a comment?
Comment 4 Petr Hejl 2012-11-02 19:04:23 UTC
(In reply to comment #3)
> MK1: what happens with the justification? is it used somewhere? or it's just a
> replacement for a comment?
Yep just a doc like attribute.

Real world example for a FindBugs check:
@org.netbeans.api.annotations.common.SuppressWarnings("DMI_COLLECTION_OF_URLS", justification="Code uses file URLs only")
Comment 5 Petr Hejl 2013-01-25 11:58:38 UTC
Thanks for the review. I'll integrate it once trunk is open for non-fixes.
Comment 6 Petr Hejl 2013-01-25 15:52:42 UTC
Created attachment 130656 [details]
updated patch

This patch coverts all present justifications from comment to attribute.
Comment 7 Petr Hejl 2013-01-29 09:35:25 UTC
Fixed in web-main 40e79aca5d09.
Comment 8 Quality Engineering 2013-01-30 03:41:14 UTC
Integrated into 'main-golden', will be available in build *201301300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/40e79aca5d09
User: Petr Hejl <phejl@netbeans.org>
Log: #221381 - Enhance SuppressWarnings annotation with justification


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