Method doScanPackageClassesByFile
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
private void doScanPackageClassesByFile(
Set<Class<?>> classes,
String packageName,
String packagePath,
final boolean recursive) {
Method doScanPackageClassesByFile
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private void doScanPackageClassesByFile(
Set<Class<?>> classes,
String packageName,
String packagePath,
final boolean recursive) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method scanEntry
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void scanEntry(String packagePath, Set<Class<?>> classes, Enumeration entries) {
if (!entries.hasMoreElements()) {
return;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method getPackageAllClasses
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public Set<Class<?>> getPackageAllClasses(String basePackage, boolean recursive) {
Set<Class<?>> classes = new LinkedHashSet<>();
String packageName = basePackage;
if (basePackage.endsWith(".")) {
packageName = basePackage.substring(0, basePackage.length() - 1);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method filterClassName
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private boolean filterClassName(String className) {
if (!className.endsWith(suffix)) {
return false;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"