Showing 7,775 of 7,775 total issues
Avoid deeply nested control flow statements. Open
if (allownotify) {
//ZK-905 Save into a Form should fire NotifyChange
if (isForm) {
//collect notify property, kept in BindContext
Method tieValue
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void tieValue(Object comp, Object base, Object script, Object propName, Object value, Object basePath);
Method coerceToBean
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("rawtypes")
public Object coerceToBean(Object val, C comp, BindContext ctx) {
if (val == null) {
throw new NullPointerException("value");
}
- 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 coerceToBean
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Object coerceToBean(Object val, Component comp, BindContext ctx) {
//since there is always a model, we get the selected by item by model directly
if (val != null) {
Selectbox sbox = (Selectbox) comp;
final ListModel<?> model = sbox.getModel();
- 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 addFormLoadBindings
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addFormLoadBindings(Component comp, String id, String loadExpr, String[] beforeCmds, String[] afterCmds,
Map<String, Object> bindingArgs);
Method isFormDirty
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isFormDirty() {
if (_dirty)
return true;
Iterator<?> e = iterator();
while (e.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 newXelContext
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected XelContext newXelContext(BindContext ctx, final Component comp) {
final FunctionMapper mapper = getFunctionMapper(comp);
//ZK-1795MVVM nested template may cause exception
//Dennis: Shouldn't get the real variable-resolver and keep it, it will set ref as evaluator's self,
//When nested MVVM templates, if there are a ref-binding, it will newXelContext multiple time to do new evaluation in this evaluation,
- 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 isFormDirty
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isFormDirty() {
if (_dirty)
return true;
int size = getSize();
ListModelArray<E> cache = getCache();
- 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 isFormDirty
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isFormDirty() {
if (_dirty)
return true;
Iterator<?> e = iterator();
while (e.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
Avoid deeply nested control flow statements. Open
if (log.isDebugEnabled()) {
log.debug(
"value reference not found by expression [{}], check if you are trying to save to a variable only expression",
expr.getExpressionString());
}
Method isFormDirty
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isFormDirty() {
if (_dirty)
return true;
Iterator<?> e = iterator();
while (e.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 resolveTemplate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected Template resolveTemplate(Component templateComp, Component comp, Object data, int index, int size,
String defaultName) {
Method addPropertyInitBinding
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public void addPropertyInitBinding(Component comp, String attr, String initExpr, Map<String, Object> initArgs,
String converterExpr, Map<String, Object> converterArgs);
Method getValueReference
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public ValueReference getValueReference(BindContext ctx, Component comp, ExpressionX expression)
throws XelException {
try {
ValueReference ref = expression.getValueReference(newXelContext(ctx, comp));
//bug 1129-ref NPE, no value reference if it is a SimpleNode
- 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 (args != null) {
if (args.size() == 1) {
Object data = new JavaScriptValue(String.valueOf(binder.getConverter("jsonBindingParam")
.coerceToUi(args.values().iterator().next(), ctx.getComponent(), ctx)));
Clients.response(new AuInvoke(ctx.getBinder().getView(), "$afterCommand",
Method newBindContext
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static BindContext newBindContext(Binder binder, Binding binding, boolean save, String command,
Component comp, Event event) {
Method compare
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static int compare(Object[] a, Object[] b) {
if (a == b) {
return 0;
}
if (a == 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 (!activating) { //don't load to form if activating
//ZK-911. Save into Form bean via expression(so will use form's AccessFieldName)
final ExpressionX formExpr = getFormExpression(eval, field);
eval.setValue(null, comp, formExpr, value); //formExprform.setField(field, value);
}
Avoid deeply nested control flow statements. Open
if (prev != null) {
prev.next = e.next;
} else {
tab[i] = e.next;
}
Method processChildrenInit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void processChildrenInit(Component comp, Annotation ann, ExpressionAnnoInfo converterInfo) {
String initExpr = null;
Map<String, String[]> args = null;
for (final Iterator<Entry<String, String[]>> it = ann.getAttributes().entrySet().iterator(); it.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"