Showing 4,841 of 7,782 total issues
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 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 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 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 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
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
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 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 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 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 evalArgs
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static Map<String, Object> evalArgs(BindEvaluatorX eval, Component comp, Map<String, Object> args,
Map<String, Object> implicit) {
if (args == null) {
return 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);
}
Method validateSavePropertyBinding
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private boolean validateSavePropertyBinding(Component comp, SavePropertyBinding binding, String command,
Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
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
Method processFormInit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void processFormInit(Component comp, String formId, Annotation ann) {
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"
Further reading
Method remove
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void remove(Entry toRemove) {
Entry[] tab = this.table;
int index = (toRemove.hash & 0x7fffffff) % tab.length;
for (Entry e = tab[index], prev = null; e != null; e = e.next) {
- 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 equals
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static boolean equals(Object[] a, Object[] b) {
if (a == b) {
return true;
}
if (a == null || b == 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 (prev != null) {
prev.next = e.next;
} else {
tab[i] = e.next;
}
Method validateSaveFormBinding
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private boolean validateSaveFormBinding(Component comp, SaveFormBinding binding, String command,
Map<String, Property[]> validates, boolean valid, Set<Property> notifys) {
//validate tracked savebinding
Set<SaveBinding> savebindings = ((BinderCtrl) binding.getBinder())
.getFormAssociatedSaveBindings(binding.getComponent());
- 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 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"