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 236777 - CallToPrintStackTrace and CallToThreadDumpStack warnings seems to be tangled
Summary: CallToPrintStackTrace and CallToThreadDumpStack warnings seems to be tangled
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-04 17:03 UTC by Maksim Khramov
Modified: 2013-10-08 14:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maksim Khramov 2013-10-04 17:03:15 UTC
Product Version: NetBeans IDE Dev (Build 201310030001)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11

I have this code:

    @SuppressWarnings("CallToPrintStackTrace")
    public void dumpStack() {
        Thread.dumpStack();
    }
    
    @SuppressWarnings("CallToThreadDumpStack")
    public void printStack() {
        try { 
            throw new Exception();
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

I expected that first annotation should suppress warning in second function and vice versa but actually warnings suppressed this way...
Comment 1 Dusan Balek 2013-10-08 14:12:51 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/acdf50ecf44a