6

Eclipse のバグですか、それとも完全修飾型名 (FQN) でパラメーターに注釈を付けられないのはなぜ@NonNullですか?

    import org.eclipse.jdt.annotation.NonNull;

    public class Foo {
        // No problem
        public void bar(@NonNull String x) {
        }

        // Error: Type annotations are not allowed on type names used to access
        // static members
        public void baz(@NonNull java.lang.String x) {
        }
    }
4

1 に答える 1