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 221381 - Enhance SuppressWarnings annotation with justification
Summary: Enhance SuppressWarnings annotation with justification
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Harness (show other bugs)
Version: 7.3
Hardware: PC All
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
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
Exception Reporter:


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