Showing 146 of 168 total issues
Method producedEvents
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public Set<String> producedEvents() {
Set<String> result = new TreeSet<>();
for (KeyBehaviorEntry entry : keyBehaviorEntries) {
if (entry.produceEvent()) {
result.addAll(entry.getEvents());
- 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 resolveStepExType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private Class resolveStepExType() {
Class thisClass;
if (AopUtils.isAopProxy(this)) {
thisClass = AopUtils.getTargetClass(this);
} else {
- 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 visit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void visit(final ClassOrInterfaceDeclaration classDeclaration, final KeyRelationReport report) {
super.visit(classDeclaration, report);
if (!classDeclaration.isAnnotationPresent(KeyRelation.class)) {
- 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 visit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void visit(final MethodDeclaration methodDeclaration, final EncapsulationReport report) {
super.visit(methodDeclaration, report);
ClassOrInterfaceDeclaration parentClass = JavaParserUtil.getClass(methodDeclaration.getParentNode().get());
- 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 fixPackage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public void fixPackage(String fromPkg, String toPkg) {
if (!fromPkg.contains(".")) {
// fix a single entity pkg
String keyModelName = fromPkg;
KeyModelEntry entry = data.get(keyModelName);
- 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 resolveExtClazz
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private void resolveExtClazz() {
// 实现IPolicy的类可能有继承:
// abstract class AbstractFooPolicy implements IPolicy<IFooExt, Ident>
// class ConcreteFooPolicy extends AbstractFooPolicy
ResolvableType resolvableType = ResolvableType.forInstance(InternalAopUtils.getTarget(this.policyBean));
- 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"