Showing 9 of 9 total issues
RenamingResultSet
has 196 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
@RequiredArgsConstructor
public class RenamingResultSet implements ResultSet {
private final ResultSet underlying;
private final ColumnNameMapping columnNameMapping;
File RenamingResultSet.java
has 804 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.github.chrisgleissner.jutil.jdbi;
import com.github.chrisgleissner.jutil.jdbi.mapping.ColumnNameMapping;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
RenamingResultSetMetaData
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
@RequiredArgsConstructor(access = AccessLevel.PACKAGE)
class RenamingResultSetMetaData implements ResultSetMetaData {
private final ResultSetMetaData underlying;
private final ColumnNameMapping columnNameMapping;
SqlLog
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
@Slf4j
public class SqlLog extends NoOpQueryExecutionListener implements BeanPostProcessor {
public static final String DEFAULT_ID = "default";
public static final QueryTransformer identityQueryTransformer = transformInfo -> transformInfo.getQuery();
File TablePrinter.java
has 251 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.github.chrisgleissner.jutil.table;
import com.github.chrisgleissner.jutil.table.format.AsciiTableFormat;
import com.github.chrisgleissner.jutil.table.format.TableFormat;
import com.github.chrisgleissner.jutil.table.provider.SimpleTableProvider;
Method getRows
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
@Override
public Iterable<? extends Iterable<String>> getRows() {
return (Iterable<Iterable<String>>) () -> new Iterator<Iterable<String>>() {
@Override
public boolean hasNext() {
- 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 toSpacedHex
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static String toSpacedHex(byte[] bytes) {
if (bytes == null) {
return "null";
} else if (bytes.length == 0) {
return "0 bytes";
- 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 writeRows
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void writeRows() {
if (!tableData.getRows().isEmpty()) {
for (int i = 0; i < tableData.getRows().size(); i++) {
if (i > 0 && horizontalDividers)
printHorizontalDivider();
- 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 print
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void print(char divider, List<TableData.Cell> cells, int lineIndex) {
for (int cellIndex = 0; cellIndex < tableData.numberOfCellWidths(); cellIndex++) {
if (cellIndex > 0)
pw.append(divider);
pw.append(' ');
- 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"