Showing 4,841 of 7,782 total issues
Method unsubscribe
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public boolean unsubscribe(EventListener<T> listener) {
if (listener != null)
for (Iterator<ListenerInfo<T>> it = _listenerInfos.iterator(); it.hasNext();) {
final ListenerInfo<T> inf = it.next();
if (listener.equals(inf.listener)) {
- 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 parsePI
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private static void parsePI(LanguageDefinition langdef, Document doc) throws Exception {
for (Iterator it = doc.getChildren().iterator(); it.hasNext();) {
final Object o = it.next();
if (!(o instanceof ProcessingInstruction))
continue;
- 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 handleError
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void handleError(Session sess, HttpServletRequest request, HttpServletResponse response, String path,
Throwable err) throws ServletException, IOException {
Utils.resetOwner();
// ZK-3679
- 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 toComposer
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private static void toComposer(List<Composer> composers, Page page, Object o) throws Exception {
if (o instanceof String) {
final String s = (String) o;
if (s.indexOf(',') >= 0)
o = CollectionsX.parse(null, s, ','); //No 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 evalProperties
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public Map<String, Object> evalProperties(Map<String, Object> propmap, Page owner, Component parent) {
if (propmap == null)
propmap = new HashMap<String, Object>();
if (_props != 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 sort
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static void sort(List<? extends Component> list, int from, int to, Comparator<? super Component> cpr) {
final Component[] ary = CollectionsX.toArray(list, new Component[0], from, to);
Arrays.sort(ary, cpr);
ListIterator<? extends Component> it = list.listIterator(from);
- 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 writeObject
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
//No need to unshare annots and evthds, since stored as an independent copy
s.defaultWriteObject();
- 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 checkParentChild
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private static void checkParentChild(Component parent, Component child) throws UiException {
if (child == null)
throw new UiException("Child cannot be null");
if (parent != null) {
final AbstractComponent acp = (AbstractComponent) parent;
- 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 getDefinition
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
/*package*/ static ComponentDefinition getDefinition(Execution exec, Class<? extends Component> cls) {
if (exec != null) {
final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
final PageDefinition pgdef = execCtrl.getCurrentPageDefinition();
final Page page = execCtrl.getCurrentPage();
- 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 destroy
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void destroy() {
Visualizer visualizer = null;
try {
if (_desktop != null) {
Execution execution = _desktop.getExecution();
- 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 evalDeferredZScripts
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void evalDeferredZScripts(Interpreter ip, String zslang) {
if (_zsDeferred != null) {
for (Iterator<Object[]> it = _zsDeferred.iterator(); it.hasNext();) {
final Object[] zsInfo = it.next();
final ZScript zscript = (ZScript) zsInfo[1];
- 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 addMoved
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void addMoved(Component comp, Component oldparent, Page oldpg, Page newpg) {
if (_recovering || _disabled || (newpg == null && oldpg == null)
|| (newpg == null && (oldpg instanceof VolatilePage || !_exec.isAsyncUpdate(oldpg))) //detach from loading pg
|| (oldpg == null && (newpg instanceof VolatilePage || !_exec.isAsyncUpdate(newpg))) //attach to loading pg
|| isCUDisabled(comp) || (oldparent != null && isCUDisabled(oldparent)))
- 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 readObject
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject();
init();
- 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 doDeactivate
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private static final void doDeactivate(Execution exec) {
// if (log.finerable()) log.finer("Deactivating "+desktop);
final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
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 desktopDestroyed0
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void desktopDestroyed0(Desktop desktop) {
final Configuration config = _wapp.getConfiguration();
if (!_suspended.isEmpty()) { //no need to sync (better performance)
final Map<Object, List<EventProcessingThreadImpl>> map;
synchronized (_suspended) {
- 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 storeForm
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void storeForm(Component comp, String id, Form form) {
final String oldid = (String) comp.getAttribute(FORM_ID, Component.COMPONENT_SCOPE);
//check if a form exist already, allow to store a form with same id again for replacing the form
if (oldid != null && !oldid.equals(id)) {
throw new IllegalArgumentException(
- 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 loadComponentProperties0
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
private void loadComponentProperties0(Component comp, boolean loadinit) {
final Map<String, List<Binding>> compBindings = _bindings.get(comp);
if (compBindings != null) { // if component is not registered in this binder, do nothing.
for (String key : compBindings.keySet()) {
- 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 mergeExceptionInfo
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public static RuntimeException mergeExceptionInfo(Exception ex, Object loc) {
Location location = null;
boolean showColumn = true;
if (loc instanceof Component) {
location = toComponentLocation((Component) loc);
- 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 onEvent
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public void onEvent(Event event) throws Exception {
if (_modelInitListener != null) {
Grid.this.removeEventListener("onInitModel", _modelInitListener);
_modelInitListener = 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 renderChangedItem
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
@SuppressWarnings("unchecked")
private void renderChangedItem(Treeitem item, Object node, int index) throws Throwable {
if (!_rendered && (_renderer instanceof RendererCtrl)) {
((RendererCtrl) _renderer).doTry();
_ctrled = true;
- 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"