[java] Fix same package import from default package
- If the package was passed as an empty string rather than a `null`, we would attempt to load classes such as `.Foo` rather than `Foo`.
This commit is contained in:

committed by
Andreas Dangel

parent
e25844fb01
commit
357b10952d
@ -215,7 +215,7 @@ public class TypeSet {
|
||||
*/
|
||||
public CurrentPackageResolver(PMDASMClassLoader pmdClassLoader, String pkg) {
|
||||
super(pmdClassLoader);
|
||||
if (pkg == null) {
|
||||
if (pkg == null || pkg.length() == 0) {
|
||||
this.pkg = null;
|
||||
} else {
|
||||
this.pkg = pkg + ".";
|
||||
|
Reference in New Issue
Block a user