Showing 7,775 of 7,775 total issues
Method setValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void setValue(ELContext context, Object base, Object property,
Object value) {
if (context == null) {
throw new NullPointerException();
}
- 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 isReadOnly
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isReadOnly(ELContext context, Object base, Object property) {
if (context == null) {
throw new NullPointerException();
}
- 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 deeply nested control flow statements. Open
if (kind > 56)
kind = 56;
Avoid deeply nested control flow statements. Open
if (jj_3_8()) {
jj_scanpos = xsp;
if (jj_3R_88()) {
jj_scanpos = xsp;
if (jj_3R_89()) return true;
Method LexicalError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
Avoid deeply nested control flow statements. Open
if (kind > 57)
kind = 57;
Avoid deeply nested control flow statements. Open
if (kind > 10)
kind = 10;
Method coerce
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static final int coerce(Object property) {
if (property instanceof Number) {
return ((Number) property).intValue();
}
if (property instanceof Character) {
- 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 deeply nested control flow statements. Open
if (jj_3R_84()) return true;
Avoid deeply nested control flow statements. Open
if (c.gen < jj_gen) c.first = null;
Method addEscapes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected static final String addEscapes(String str) {
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
- 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 add_escapes
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static String add_escapes(String str) {
StringBuffer retval = new StringBuffer();
char ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
- 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 getOutputStream
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public ServletOutputStream getOutputStream() throws IOException {
if (writer != null) {
throw new IllegalStateException(
"getWriter() has already been called on this response.");
- 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 deeply nested control flow statements. Open
if (mergedPRMPs == null) {
// Lazy initialization
mergedPRMPs = new LinkedHashMap<String, Object>();
}
Avoid deeply nested control flow statements. Open
if (!typeName.equals(types[i].getName())) {
match = false;
}
Avoid deeply nested control flow statements. Open
if (paramTypes.length == 0) {
mergeInPropertyReaderMethod(mergedPRMPs, propName, method);
} else { // It's an indexed property reader method
mergeInPropertyReaderMethodPair(mergedPRMPs, propName,
new PropertyReaderMethodPair(null, method));
Method coerceToBoolean
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final Boolean coerceToBoolean(final Object obj,
boolean primitive) throws ELException {
if (!COERCE_TO_ZERO && !primitive) {
if (obj == null) {
- 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 deeply nested control flow statements. Open
if (ptns[j].trim().length() > 1 && vals[k].trim().length() > 1) {
if (vals[k].trim().toLowerCase(java.util.Locale.ENGLISH).indexOf(ptns[j].trim().toLowerCase(java.util.Locale.ENGLISH)) > -1) {
m = true;
break;
}
Method equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
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
Method getValidator2
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Validator getValidator2(){
return new Validator(){
public void validate(ValidationContext ctx) {
if(!ctx.isValid()) return;
Property p = ctx.getProperty();
- 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"