Showing 7,775 of 7,775 total issues

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) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

    Method addPropertyInitBinding0 has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        private void addPropertyInitBinding0(Component comp, String attr, String initExpr, Map<String, Object> bindingArgs,
                String converterExpr, Map<String, Object> converterArgs) {
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (wve != null) {
                                          Component c = wve.getComponent();
                                          if (c == null)
                                              c = wvc;
                                          Clients.wrongValue(c, wve.getMessage());
      Severity: Major
      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

        Method collectSavePropertyBinding has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            private void collectSavePropertyBinding(Component comp, SavePropertyBinding binding, String command, Event evt,
                    Set<Property> validates, boolean checkFormFieldFromCollection) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationHelper.java - About 45 mins to fix

          Method getLoadPromptBindings has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              public List<Binding> getLoadPromptBindings(Component comp, String attr) {
                  checkInit();
                  final List<Binding> bindings = new ArrayList<Binding>();
                  final BindingKey bkey = getBindingKey(comp, attr);
                  final List<LoadPropertyBinding> loadBindings = _propertyBindingHandler.getLoadPromptBindings(bkey);
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 45 mins to fix

          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 put has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

                  public void put(Object bean) {
                      EqualBeans equalBeans = _innerMap.get(bean);
                      if (equalBeans == null) { //hashcode might changed
                          equalBeans = _identityMap.remove(bean);
                          if (equalBeans != null) { //hashcode is changed
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/TrackerImpl.java - About 45 mins to fix

          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 removeBindingsRecursively has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              private void removeBindingsRecursively(Component comp, Map<Binder, Set<Component>> batchRemove) {
                  removeBindings0(comp, batchRemove);
                  for (final Iterator<Component> it = comp.getChildren().iterator(); it.hasNext();) {
                      final Component kid = it.next();
                      if (kid != null) {
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/BindUiLifeCycle.java - About 45 mins to fix

          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 coerceFromString has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              protected Object coerceFromString(String value) throws WrongValueException {
                  final Object[] vals = toNumberOnly(value);
                  final String val = (String) vals[0];
                  if (val == null || val.length() == 0)
                      return null;
          Severity: Minor
          Found in zul/src/main/java/org/zkoss/zul/Decimalbox.java - About 45 mins to fix

          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 get has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              protected static Media[] get(Map<String, Object> params, String message, String title, int max, int maxsize,
                      boolean alwaysNative) {
          Severity: Minor
          Found in zul/src/main/java/org/zkoss/zul/Fileupload.java - About 45 mins to fix

            Method validate has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public void validate(Component comp, Object value) throws WrongValueException {
                    super.validate(comp, value);
                    if (value instanceof Integer) {
                        final Integer intValue = (Integer) value;
            
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/SimpleSpinnerConstraint.java - About 45 mins to fix

            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 onAfterRender has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                public void onAfterRender() {
                    if (inPagingMold() && _model instanceof Pageable) {
                        Pageable m = (Pageable) _model;
                        if (m.getPageSize() > 0) { //min page size is 1
                            _pgi.setPageSize(m.getPageSize());
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 45 mins to fix

            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 fixClone has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open

                private void fixClone() {
                    if (_sortAsc instanceof RowComparator) {
                        final RowComparator c = (RowComparator) _sortAsc;
                        if (c.getColumn() == this && c.isAscending())
                            _sortAsc = new RowComparator(this, true, c.shallIgnoreCase(), false);
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/Column.java - About 45 mins to fix

            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 (refBinding.getComponent() == comp) {
                                            ignore = false;
                                            break;
                                        }
            Severity: Major
            Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/TrackerImpl.java - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if (cols != null) {
                                          for (Component column : cols.getChildren()) {
                                              ((Column) column).setSortDirection("natural");
                                          }
                                      }
              Severity: Major
              Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 45 mins to fix

                Method addInvalidMessages has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                Open

                    protected void addInvalidMessages(ValidationContext ctx, String key, String[] messages, Object value) {
                        ctx.setInvalid();
                        ValidationMessages vmsgs = ((BinderCtrl) ctx.getBindContext().getBinder()).getValidationMessages();
                        if (vmsgs != null) {
                            Binding binding = ctx.getBindContext().getBinding();
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/validator/AbstractValidator.java - About 45 mins to fix

                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 (m.getActivePage() >= 0) { //min page index is 0
                                            pgi.setActivePage(m.getActivePage());
                                        } else {
                                            m.setActivePage(pgi.getActivePage());
                                        }
                Severity: Major
                Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 45 mins to fix

                  Method testBindingRendererCase has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private boolean testBindingRendererCase(LoadBinding binding) {
                          if (binding instanceof LoadChildrenBinding)
                              return true;
                          if (binding instanceof LoadPropertyBinding) {
                              LoadPropertyBinding lb = (LoadPropertyBinding) binding;
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/TrackerImpl.java - About 45 mins to fix

                  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

                                              for (Group group : new ArrayList<Group>(rows.getGroups()))
                                                  group.detach(); // Groupfoot is removed
                  Severity: Major
                  Found in zul/src/main/java/org/zkoss/zul/Column.java - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (m.getPageSize() > 0) { //min page size is 1
                                                pgi.setPageSize(m.getPageSize());
                                            } else {
                                                m.setPageSize(pgi.getPageSize());
                                            }
                    Severity: Major
                    Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 45 mins to fix

                      Method doSelectionChanged has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void doSelectionChanged() {
                              final Selectable<Object> smodel = getSelectableModel();
                              if (smodel.isSelectionEmpty()) {
                                  if (_jsel >= 0)
                                      setSelectedIndex(-1);
                      Severity: Minor
                      Found in zul/src/main/java/org/zkoss/zul/Selectbox.java - About 45 mins to fix

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language