Showing 9,050 of 9,050 total issues
Method out
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static void out(final HttpServerResponse response, final Envelop envelop, final Set<MediaType> produces) {
/*
* Response processing
*/
if (!response.headWritten()) {
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
static boolean isMatch(final ProceedingJoinPoint point, final Class<?>... expected) {
final Method method = method(point);
final Class<?>[] clazz = method.getParameterTypes();
/*
* The expected and clazz must be matched
- 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 isBoolean
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static boolean isBoolean(final String literal, final boolean widely) {
if (Objects.isNull(literal)) {
return false;
} else {
final String lower = literal.toLowerCase().trim();
- 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 getJarDirectories
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static List<String> getJarDirectories(final JarFile jarFile, final String folder) {
final List<String> retList = new ArrayList<>();
final Enumeration<JarEntry> entities = jarFile.entries();
while (entities.hasMoreElements()) {
final JarEntry entry = entities.nextElement();
- 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 _findFactory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected AnnotatedMethod _findFactory(final AnnotatedClass cls, final String name, final Class... argTypes) {
final int argCount = argTypes.length;
final Iterator var5 = cls.getFactoryMethods().iterator();
AnnotatedMethod method;
- 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 ioYaml
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
static <T> T ioYaml(final String filename) {
if (TIs.isNil(filename)) {
/*
* If filename is null or empty
- 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 rename
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public boolean rename(final String nameFrom, final String nameTo) {
final File fileSrc = new File(nameFrom);
if (fileSrc.exists()) {
final File fileTo = new File(nameTo);
- 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 services
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static <T> Collection<T> services(final Class<T> clazz, final ClassLoader classLoader) {
final List<T> list = new ArrayList<>();
ServiceLoader<T> factories;
if (classLoader != null) {
factories = ServiceLoader.load(clazz, classLoader);
- 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 deserialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private <T> T deserialize(final Object response, final Class<?> dataType) {
if (Objects.isNull(response)) {
return null;
} else {
final T ret;
- 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 resolve
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static String resolve(final String folder, final String file) {
Objects.requireNonNull(file);
final String valueFolder;
if (TIs.isNil(folder)) {
valueFolder = "/";
- 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 bugAt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static <T, R> R bugAt(final R defaultValue, final ProgramFunction<T, R> function,
final HLogger logger) throws ProgramException {
try {
final R ret = function.apply(null);
return Objects.isNull(ret) ? defaultValue : ret;
- 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 safeT
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static <T> void safeT(final Supplier<T> supplier, final Consumer<T> consumer) {
final T input = supplier.get();
if (Objects.nonNull(input)) {
if (input instanceof String) {
if (Ut.isNotNil((String) input)) {
- 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 doBatch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected Boolean doBatch(final JsonArray documents, final String idField,
final Supplier<BulkRequest> executor) {
if (Ut.isNil(documents)) {
/*
* No data, not needed
- 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 cellConsumer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private BiConsumer<Cell, Integer> cellConsumer(final ExRecord record, final ConcurrentMap<String, JsonObject> rowMap,
final ExTable table, final HMetaAtom metaAtom) {
return (dataCell, cellIndex) -> {
/* Field / Value / field should not be null */
final String field = table.field(cellIndex);
- 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 configPath
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected String configPath(final IntegrationRequest request, final JsonObject params) {
final String exprPath = request.getPath();
if (request.isExpr()) {
/*
* The path contains `expression` such as
- 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 dataDelivery
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Buffer dataDelivery(final ChangeFlag flag) {
final JsonObject delivery = new JsonObject();
/*
* Check entity to see whether they are collection
- 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 compareTo
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static <T> int compareTo(
final T left, final T right,
final BiFunction<T, T, Integer> compare) {
if (null == left && null == right) {
return 0;
- 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 jvmAt
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static <T, R> R jvmAt(final R defaultValue, final ErrorFunction<T, R> function, final HLogger logger) {
try {
final R ret = function.apply(null);
return Objects.isNull(ret) ? defaultValue : ret;
} catch (final AbstractException ex) {
- 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 getValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static Object getValue(final Class<?> paramType,
final String literal) {
Object reference = null;
if (null != literal) {
Saber saber;
- 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 callback
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private Handler<AsyncResult<Buffer>> callback(final Promise<Buffer> promise) {
return handler -> {
if (handler.succeeded()) {
promise.complete(handler.result());
} 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"