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).
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).