question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove unused suppress warning annotations removes USED supress warning annotations.

See original GitHub issue

Example

public Button getActionButton(final String actionButtonId) {
    Button button = null;
    final ActionToolbar actionToolbar = this.getActionToolbar();

    if (actionToolbar != null && CollectionUtils.isNotEmpty(actionToolbar.getChildren())) {
        for (final Component component : new ArrayList<Component>(actionToolbar.getChildren())) {
            if ((component instanceof Button) && (StringUtils.equals(actionButtonId, component.getId()))) {
                button = (Button) component;

                break;
            }
        }
    }

    return button;
}

actionToolbar.getChildren() is unchecked but the @SuppressWarnings("unchecked") was removed upon save even thought it was being used.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:30 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
MartinX3commented, Apr 5, 2019

+1 IntelliJ Ultimate 2019.1 Save Actions v1.4.0

(Had it last year too.)

2reactions
koflerdavidgrawecommented, Jul 17, 2019

+1 IntelliJ Ultime 2019.1.3 Save Action 1.5.0

A workaround would be necessary asap 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unnecessary @SuppressWarnings("unused") - Stack Overflow
In the code in your question, the @SuppressWarnings("unused") annotation is unnecessary because the method is either overriding another ...
Read more >
Excluding warnings using @SuppressWarnings - IBM
Token Description Suppressed compiler option(s) all to suppress all warnings All compiler options cast to suppress warnings relative to cast operations Unnecessary cast or 'instance... deprecation...
Read more >
What is @SuppressWarnings annotation in Java? Unchecked ...
@SuppressWarnings instruct the compiler to ignore or suppress, specified compiler warning in annotated element and all program elements inside that element.
Read more >
Java @SuppressWarnings Annotation - Baeldung
2. @SuppressWarnings Annotation ... Compiler warning messages are usually helpful. Sometimes warnings can get noisy, though. ... The compiler will ...
Read more >
Disable and suppress inspections | IntelliJ IDEA Documentation
For example in Java, if you suppress an inspection for a class, a method, or a field, the IDE adds the @SuppressWarnings annotation....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found