Ensure className is never null

This commit is contained in:
Juan Martín Sotuyo Dodero
2016-11-15 03:36:08 -03:00
committed by Andreas Dangel
parent 810760e3a6
commit b5ca7baa9a

View File

@ -9,6 +9,7 @@ import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import net.sourceforge.pmd.lang.ast.Node;
@ -51,12 +52,12 @@ public class ClassScope extends AbstractJavaScope {
}
};
private String className;
private final String className;
private boolean isEnum;
public ClassScope(String className) {
this.className = className;
public ClassScope(final String className) {
this.className = Objects.requireNonNull(className);
anonymousInnerClassCounter.set(Integer.valueOf(1));
}