History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-9203
Type: Bug Bug
Status: Open Open
Priority: Normal Normal
Assignee: Alexey Kudravtsev
Reporter: Sascha Weinreuter
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

"Redundant suppression" inspection doesn't recognize redundant "unchecked" suppression

Created: 24 Feb 06 23:12   Updated: 07 Sep 06 18:54
Component/s: Code Analysis. Inspection
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 5,162
Severity: Medium


 Description  « Hide
It doesn't think that suppressing the "unchecked" warning is redundant here:
protected Set<String> getStrings() {
            //noinspection unchecked
            return Collections.emptySet();
        }


 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 17 Apr 06 19:47
Still an issue in #5231. Both the UNUSED_SYMBOL suppression as well as the AutoUnboxing suppression are reported, but it misses the unchecked suppression.
class C {
    @SuppressWarnings("UNUSED_SYMBOL")
    private boolean CONST = true;

    void f() {
        CONST = false;
    }

    protected Set<String> getStrings() {
        //noinspection AutoUnboxing
        int i = 1;

        //noinspection unchecked
        return Collections.emptySet();
    }
}

Alexander Chernikov - 07 Sep 06 18:54
Merged issue IDEA-8729. Build 5667. For code:
//noinspection StringEquality
if (password == EMPTY_PASSWORD) {
  ...
}

the redundant supression is reported, but without suppession comment possible error is reported.