Showing 7,775 of 7,775 total issues
Method parseTextAs
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static void parseTextAs(ComponentDefinitionImpl compdef, Element el) {
if (el != null) {
final String s = el.getText(true);
noEmpty("text-as", s, el);
noEL("text-as", s, el);
- 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 setDefaultWidgetClass
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setDefaultWidgetClass(String widgetClass) {
final ExValue oldwc = _defWgtClass;
_defWgtClass = new ExValue(widgetClass, String.class);
//replace mold's widget class if it is the old default one
- 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 toString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public String toString() {
final StringBuffer sb = new StringBuffer().append('@').append(_name).append('(');
if (_attrs != null) {
boolean first = true;
for (Map.Entry<String, String[]> me : _attrs.entrySet()) {
- 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 setForEach
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void setForEach(String expr, String begin, String end) {
_forEach = Utils.parseList(expr, Object.class, false);
//forEach="" means to iterate a single-element array and the value
//is empty
_forEachInfo = _forEach == null ? 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 isDynamicValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected boolean isDynamicValue(String propName) {
final ComponentCtrl compCtrl = this;
Collection<Annotation> annos = compCtrl.getAnnotations(propName);
if (!annos.isEmpty()) {
for (Annotation anno : annos) {
- 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 setParent0
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void setParent0(Component parent) {
if (_host != null && parent != null) {
throw new UiException("As a shadow root cannot be a child of a shadow element.");
}
- 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 mergeToHost
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public boolean mergeToHost(Component host) {
if (host == null)
throw new UiException("The host cannot be null.");
if (host == _host)
return false; // nothing to do
- 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 getCurrent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static final Scope getCurrent(Page page) {
final List<Scope> nss = _scopes.get();
final Scope scope = nss != null && !nss.isEmpty() ? nss.get(0) : null;
if (scope != null)
return scope;
- 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 getScope
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static final int getScope(String scope) {
if ("component".equals(scope))
return Component.COMPONENT_SCOPE;
if ("space".equals(scope))
return Component.SPACE_SCOPE;
- 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 isShadowElement
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static final boolean isShadowElement(LanguageDefinition langdef, PageDefinition pgdef, String nm,
String pref, String uri, boolean bNativeContent) {
// feature in 8.0.0, no need to check namespace, if any.
if ("true".equalsIgnoreCase(Library.getProperty("org.zkoss.zk.namespace.tolerant", "false")))
return langdef.hasShadowDefinition(nm) || (!"xul/html".equals(langdef.getName())
- 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 setClientAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public String setClientAttribute(String name, String value) {
if (name == null)
throw new IllegalArgumentException();
final String old;
- 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 afterComponentPageChanged
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void afterComponentPageChanged(Page newpg, Page oldpg) {
if (newpg == oldpg) {
// Orphan case: detached again after the parent was detached
if (getParent() == null && oldpg == null) {
WebApps.getCurrent().getConfiguration().afterComponentDetached(this, 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 getAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public Object getAttribute(String name, boolean recurse) {
Object val = getAttribute(name);
if (val != null || !recurse || hasAttribute(name))
return val;
- 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 getDownloadMediaURI
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public String getDownloadMediaURI(Media media, String pathInfo) {
if (media == null)
throw new IllegalArgumentException("null media");
if (_meds == 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 addSharedEventHandlerMap
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public void addSharedEventHandlerMap(EventHandlerMap evthds) {
if (evthds != null && !evthds.isEmpty()) {
unshareEventHandlerMap(false);
if (initAuxInfo().evthds == null) {
_auxinf.evthds = evthds;
- 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 setTemplate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public Template setTemplate(String name, Template template) {
if (template == null) {
return _auxinf != null && _auxinf.templates != null ? _auxinf.templates.remove(name) : null;
} else {
AuxInfo auxinf = initAuxInfo();
- 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 getAttribute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public Object getAttribute(String name, boolean recurse) {
Object val = getAttribute(name);
if (val != null || !recurse || hasAttribute(name))
return val;
if (_sess != 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private static void init(Map<String, Component> fellows, Component comp) {
if (!(comp instanceof NonFellow)) {
final String compId = comp.getId();
if (!AbstractComponent.isAutoId(compId))
fellows.put(compId, comp);
- 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 findNearestShadow
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private HtmlShadowElement findNearestShadow(HtmlShadowElement current, Component baseChild) {
List<ShadowElement> list = cast(current.getChildren());
for (ShadowElement sh : list) {
if (sh instanceof HtmlShadowElement) {
HtmlShadowElement shadow0 = (HtmlShadowElement) sh;
- 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 afterPageAttached
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void afterPageAttached(Page page, Desktop desktop) {
if (_uiCycles != null) {
for (Iterator<UiLifeCycle> it = new LinkedList<UiLifeCycle>(_uiCycles).iterator(); it.hasNext();) {
final UiLifeCycle listener = it.next();
try {
- 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"