Skip to content

Several javac warning hints are missing the action to suppress the warning #9474

Description

@nmatt

Apache NetBeans version

Apache NetBeans 30

What happened

This is a generalization of issue #9444. Another affected warning is "overloads"; in all likelihood there are more. The javac documentation lists the suppressable warnings here: https://docs.oracle.com/en/java/javase/24/docs/specs/man/javac.html#option-Xlint-custom. The corresponding resource keys can be found here: https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties.

Language / Project Type / NetBeans Component

Java, Hints

How to reproduce

Below is an example for reproducing an "overloads" warning. However, in this issue I am aiming for a more general fix to supporting all javac warnings, in order to avoid having to create a new issue every time another unsupported warning occurs in practice.

import java.util.function.IntConsumer;
import java.util.function.LongConsumer;

interface Example
{
    void method(IntConsumer cs);
    void method(LongConsumer a);
}

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

JDK 21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions