Skip to content

@NullMarked and @NullUnmarked of JSpecify are inlined on methods #446

Closed
@jonatan-ivanov

Description

@jonatan-ivanov

@NullMarked has @Target({MODULE, PACKAGE, TYPE, METHOD, CONSTRUCTOR})
@NullUnmarked has @Target({PACKAGE, TYPE, METHOD, CONSTRUCTOR})

When these annotations are on methods (or constructors), they are inlined, so this:

@NullMarked
void testNullMarked(String str) {
}

@NullUnmarked
void testNullUnmarked(String str) {
}

will be transformed into this:

@NullMarked void testNullMarked(String str) {
}

@NullUnmarked void testNullUnmarked(String str) {
}

Other targets like PACKAGE and TYPE does not have this issue, I haven't tried MODULE.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions