Skip to content

No warning for source unit with missing package statement #473

@eric-milles

Description

@eric-milles

If a Java source unit is in package x according to the source folder it resides in but declares package y in its package statement, the warning The declared package "y" does not match the expected package "x" is generated. Groovy sources do not provide this warning. This is most troublesome when a new source file is created but the package statement is forgotten. No problem markers are shown but there is very unpredictable behavior finding expected types.

NOTE: This appears to be an issue only if the declared package is the default package (aka there is no package statement in the source unit).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions