fujaba/NetworkParser

View on GitHub

Showing 4,645 of 4,645 total issues

These nested if statements could be combined
Open

                if (this.banks.remove(item)) {
                    item.setRiver(null);
                    getPropertyChangeSupport().firePropertyChange(PROPERTY_BANKS, item, null);
                }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (property == null) {
                msg = space.encode(entity, filter);
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

This for loop could be simplified to a while loop
Open

                for (; i.hasNext();) {
                    item = i.next();
                    if (first == false) {
                        sb.append(", ");
                    }

ForLoopShouldBeWhileLoop

Since: PMD 1.02

Priority: Medium

Categories: Style

Remediation Points: 50000

Some for loops can be simplified to while loops, this makes them more concise.

Example:

public class Foo {
 void bar() {
 for (;true;) true; // No Init or Update part, may as well be: while (true)
 }
}

These nested if statements could be combined
Open

                    if (member instanceof Attribute) {
                        clazz.createAttribute(member.getName(), (DataType) newValue);
                    }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (expression instanceof ParserCondition && value instanceof LocalisationInterface) {
                ParserCondition parser = (ParserCondition) expression;
                Object object = parser.getValue((LocalisationInterface) value);
                LocalisationInterface variablen = (LocalisationInterface) value;
                if (object instanceof Collection<?>) {

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                        if (EntityUtil.isDate(itemType) == false) {
                            continue;
                        }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                    if (((XMLEntity) item).getTag() == null) {
                        show = true;
                        break;
                    }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                if (this.banks.remove(item)) {
                    item.setRiver(null);
                    getPropertyChangeSupport().firePropertyChange(PROPERTY_BANKS, item, null);
                }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                if (this.tas.remove(item)) {
                    item.withRoom(null);
                }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (ReflectionLoader.WEBVIEW != null && Os.isJavaFX()) {
                if (Os.isFXThread()) {
                    this.webView = ReflectionLoader.newInstance(ReflectionLoader.WEBVIEW);
                    this.webEngine = ReflectionLoader.call(this.webView, "getEngine");
                    ReflectionLoader.call(this.webView, "setMaxSize", double.class, Double.MAX_VALUE, double.class,

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                if (Os.isFXThread()) {
                    this.webView = ReflectionLoader.newInstance(ReflectionLoader.WEBVIEW);
                    this.webEngine = ReflectionLoader.call(this.webView, "getEngine");
                    ReflectionLoader.call(this.webView, "setMaxSize", double.class, Double.MAX_VALUE, double.class,
                            Double.MAX_VALUE);

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

This for loop could be simplified to a while loop
Open

                        for (; i.hasNext();) {
                            item = i.next();
                            keys.append(", ").append(item.getKey());
                            values.append(", '");
                            convertValue(values, item.getValue());

ForLoopShouldBeWhileLoop

Since: PMD 1.02

Priority: Medium

Categories: Style

Remediation Points: 50000

Some for loops can be simplified to while loops, this makes them more concise.

Example:

public class Foo {
 void bar() {
 for (;true;) true; // No Init or Update part, may as well be: while (true)
 }
}

These nested if statements could be combined
Open

                            if (statement.getCommand() == SQLCommand.INSERT
                                    || statement.getCommand() == SQLCommand.UPDATE) {

                            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (value != null) {
                value.withChildren(this);
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (indexOf(newValue.getOther()) >= 0) {
                return false;
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (isError(this, "parseToEntity", NetworkParserLog.ERROR_TYP_PARSING, entity)) {
                throw new SimpleException("A JsonObject text must begin with '{' \n" + buffer, this);
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                    if (rightValue instanceof Number || EntityUtil.isNumeric("" + rightValue)) {
                        Double leftNumber = Double.valueOf("" + leftValue);
                        Double rightNumber = Double.valueOf("" + rightValue);
                        if (position > 0) {
                            return rightNumber > leftNumber;

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

                        if (buffer.getCurrentChar() == ' ') {
                            buffer.skip();
                        }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (sourceAttribute.getClazz().getName().equals(otherAttribute.getClazz().getName())) {
                return false;
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}

These nested if statements could be combined
Open

            if (value.equalsIgnoreCase(this.getValue())) {
                return this;
            }

CollapsibleIfStatements

Since: PMD 3.1

Priority: Medium

Categories: Style

Remediation Points: 50000

Sometimes two consecutive 'if' statements can be consolidated by separating their conditions with a boolean short-circuit operator.

Example:

void bar() {
 if (x) { // original implementation
 if (y) {
 // do stuff
 }
 }
}

void bar() {
 if (x && y) { // optimized implementation
 // do stuff
 }
}
Severity
Category
Status
Source
Language