Showing 7,775 of 7,775 total issues

Method addPropertySaveBindings has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public void addPropertySaveBindings(Component comp, String attr, String saveExpr, String[] beforeCmds,
            String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
            Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs);
Severity: Major
Found in zkbind/src/main/java/org/zkoss/bind/Binder.java - About 1 hr to fix

    Method coerceToBean has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        public Object coerceToBean(Object val, Component comp, BindContext ctx) {
            if (val != null) {
                final ListModel<?> model = ((Radio) val).getRadiogroup().getModel();
    
                if (model != null && !(model instanceof Selectable)) {

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

        private boolean checkShadowElementAndCreateSubChildren(Component parent) {
            boolean hasShadow = false;
            if (parent instanceof ComponentCtrl) {
                ComponentCtrl pCtrl = (ComponentCtrl) parent;
                for (ShadowElement se : pCtrl.getShadowRoots()) {
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/AbstractRenderer.java - About 1 hr 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 initMatchMediaValues has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        private Map<String, Method> initMatchMediaValues(Object viewModel) {
            Map<String, Method> values = new HashMap<>(6);
            for (Method m : BindUtils.getViewModelClass(viewModel).getMethods()) {
                MatchMedia annomm = ViewModelAnnotationResolvers.getAnnotation(m, MatchMedia.class);
                if (annomm != null) {
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr 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 processCommandBinding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        private void processCommandBinding(Component comp, String propName) {
            final ComponentCtrl compCtrl = (ComponentCtrl) comp;
            final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, COMMAND_ANNO);
            if (anncol.size() == 0)
                return;
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 processAllComponentsBindings has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

        private void processAllComponentsBindings(Component comp) {
            final Binder selfBinder = BinderUtil.getBinder(comp);
            //check if a component was binded already(by any binder)
            if (selfBinder != null) //this component already binded ! skip all of its children
                return;
    Severity: Minor
    Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 newLoadPropertyBinding has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        protected LoadPropertyBinding newLoadPropertyBinding(Component comp, String attr, String loadAttr,
                Class<?> attrType, String loadExpr, ConditionType conditionType, String command,
                Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
    Severity: Major
    Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr to fix

      Method processGlobalCommandBinding has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          private void processGlobalCommandBinding(Component comp, String propName) {
              final ComponentCtrl compCtrl = (ComponentCtrl) comp;
              final Collection<Annotation> anncol = compCtrl.getAnnotations(propName, GLOBAL_COMMAND_ANNO);
              if (anncol.size() == 0)
                  return;
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 parseConverter has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          private ExpressionAnnoInfo parseConverter(Component comp, String propName) {
              final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, CONVERTER_ANNO);
              if (annos.size() == 0)
                  return null;
              if (annos.size() > 1) {
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 containsKey has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public boolean containsKey(Object key) {
              if (key == null) {
                  key = KeyFactory.NULL;
              }
      
      
      Severity: Minor
      Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr 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 addPropertySaveBindings0 has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          private void addPropertySaveBindings0(Component comp, String attr, String saveExpr, String[] beforeCmds,
                  String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
                  Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
      Severity: Major
      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr to fix

        Method contains has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

                        public boolean contains(Object o) {
                            if (!(o instanceof Map.Entry)) {
                                return false;
                            }
                            Map.Entry entry = (Map.Entry) o;
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 hr 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 doGlobalCommandExecute has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            private void doGlobalCommandExecute(Component comp, String command, Map<String, Object> commandArgs,
                    BindContext ctx, Set<Property> notifys) {
                String debugInfo = MessageFormat.format("doGlobalCommandExecute comp=[{0}],command=[{1}]", comp, command);
                try {
                    if (_log.isDebugEnabled()) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr 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 loadComponent0 has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            protected void loadComponent0(Component comp, boolean loadinit) {
                loadComponentProperties0(comp, loadinit);
        
                final Map<String, List<Binding>> compBindings = _bindings.get(comp);
                if (_activating || compBindings == null || !compBindings.keySet().contains(CHILDREN_ATTR)) {
        Severity: Minor
        Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr 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 load has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

            public void load(BindContext ctx) {
                final Component comp = getComponent(); //ctx.getComponent();
                final BindEvaluatorX eval = getBinder().getEvaluatorX();
                final BindingExecutionInfoCollector collector = ((BinderCtrl) getBinder()).getBindingExecutionInfoCollector();
        
        

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

            public void addPropertySaveBindings(Component comp, String attr, String saveExpr, String[] beforeCmds,
                    String[] afterCmds, Map<String, Object> bindingArgs, String converterExpr,
                    Map<String, Object> converterArgs, String validatorExpr, Map<String, Object> validatorArgs) {
        Severity: Major
        Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr to fix

          Method doPropertyChange has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              private void doPropertyChange(Object base, String prop) {
                  if (_log.isDebugEnabled()) {
                      _log.debug("doPropertyChange: base=[{}],prop=[{}]", base, prop);
                  }
          
          
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 1 hr 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 parseValidator has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              private ExpressionAnnoInfo parseValidator(Component comp, String propName) {
                  final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, VALIDATOR_ANNO);
                  if (annos.size() == 0)
                      return null;
                  if (annos.size() > 1) {
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 parseTemplate has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              private ExpressionAnnoInfo parseTemplate(Component comp, String propName) {
                  final Collection<Annotation> annos = ((ComponentCtrl) comp).getAnnotations(propName, TEMPLATE_ANNO);
                  if (annos.size() == 0)
                      return null;
                  if (annos.size() > 1) {
          Severity: Minor
          Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr 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 parseConstraint has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              protected int parseConstraint(String constraint) throws UiException {
                  int minIndex = constraint.indexOf("min");
                  int maxIndex = constraint.indexOf("max");
          
                  try {
          Severity: Minor
          Found in zul/src/main/java/org/zkoss/zul/SimpleSpinnerConstraint.java - About 1 hr 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