Method invokeAsync
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
static <T> Future<T> invokeAsync(final Object instance,
final Method method,
final Object... args) {
/*
* Analyzing method returnType first
- 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 invokeAsync
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
static <T> Future<T> invokeAsync(final Object instance,
final Method method,
final Object... args) {
/*
* Analyzing method returnType first
Method methodSeek
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
private static Method methodSeek(final Object instance, final String name, final Object... args) {
// Direct invoke, multi overwrite for unbox/box issue still existing.
if (Ut.isNil(name) || Objects.isNull(instance)) {
throw new _412ArgumentNullException(Invoker.class, "name | instance");
}
- 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 isMatch
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static boolean isMatch(final Method method, final String name, final Class<?>[] arguments) {
if (!name.equals(method.getName())) {
// Name not match
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"
Further reading
Avoid too many return
statements within this method. Open
return Future.succeededFuture(null);
Avoid too many return
statements within this method. Open
return promise.future();
Avoid too many return
statements within this method. Open
return Future.failedFuture(ex);
Method invokeObject
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static <T> T invokeObject(
final Object instance,
final String name,
final Object... args) {
- 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"