Showing 4,841 of 7,782 total issues
Method finishUpdate
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public JSONArray finishUpdate(Object ctx, List<Throwable> errs) throws IOException {
final UpdateInfo ui = (UpdateInfo) ctx;
final Execution exec = ui.uv.getExecution();
final Desktop desktop = exec.getDesktop();
- 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 getLastModified
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected long getLastModified(HttpServletRequest request) {
final String pi = Https.getThisPathInfo(request);
if (pi != null && pi.startsWith(ClassWebResource.PATH_PREFIX) && pi.indexOf('*') < 0 //language independent
&& !Servlets.isIncluded(request)) {
//If a resource extension is registered for the extension, we assume the content is dynamic
- 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 getLastModified
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
protected long getLastModified(HttpServletRequest request) {
final String pi = Https.getThisPathInfo(request);
if (pi != null && pi.startsWith(ClassWebResource.PATH_PREFIX) && pi.indexOf('*') < 0 //language independent
&& !Servlets.isIncluded(request)) {
//If a resource extension is registered for the extension,
- 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 (value instanceof FormProxyObject) {
((FormProxyObject) value).submitToOrigin((BindContext) args[0]);
}
Method getEncodedData
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public List<Object> getEncodedData() {
if (_data == null)
return null;
final JSONArray encdata = new JSONArray();
- 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 saveEqualBeans
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private void saveEqualBeans(ELContext elCtx, Object base, String prop, Object value) {
final BindELContext ctx = (BindELContext) ((EvaluationContext) elCtx).getELContext();
final BindContext bctx = (BindContext) ctx.getAttribute(BinderImpl.BINDCTX);
- 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 getValue
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public Object getValue(ELContext context, Object property, int numOfKids) {
String[] msgs = null;
if (property instanceof Component) {
context.setPropertyResolved(true);
if (numOfKids == 0) { //case vmsgs.texts[tb1]
- 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 cacheSavePropertyBinding
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
/* package */static void cacheSavePropertyBinding(ProxyNode node, String property, SavePropertyBinding savePropertyBinding) {
while (node != null) {
ProxyNode parent = node.getParent();
if (parent == null) {
node.getCachedSavePropertyBinding().add(new Pair<>(property, savePropertyBinding));
- 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 coerce
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static final Integer coerce(Object property) {
//should only handle a property that is possible a number
if (property instanceof Number) {
return ((Number) property).intValue();
}
- 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 (_dirtyFieldNames != null && _dirtyFieldNames.contains(me.getKey())) {
final String setter = ProxyHelper.toSetter(me.getKey());
try {
final Method m = Classes.getMethodByObject(_origin.getClass(), setter,
new Object[] { value });
Avoid deeply nested control flow statements. Open
if (_log.isDebugEnabled()) {
_log.debug("add save-field '{}' to form '{}'", fieldName, formLegacyBean);
}
Method toString
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public String toString() {
//Don't call getCommand and getData since it causes
//AuSetDeferredAttribute to evaluate the deferred value
final StringBuffer sb = new StringBuffer(60).append("[cmd=").append(_cmd);
if (_data != null && _data.length > 0) {
- 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 (allownotify) {
//ZK-905 Save into a Form should fire NotifyChange
if (isForm) {
//collect notify property, kept in BindContext
Avoid deeply nested control flow statements. Open
if (formLegacyBean instanceof FormLegacyExt) {
((FormLegacyExt) formLegacyBean).addSaveFieldName(fieldName);
}
Method add
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final String add(String zslang, String ipcls) {
if (zslang == null || zslang.length() == 0 || ipcls == null || ipcls.length() == 0)
throw new IllegalArgumentException("emty or null");
for (int j = zslang.length(); --j >= 0;) {
- 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 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 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 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);