Showing 4,841 of 7,782 total issues

Method getMethod has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    static Method getMethod(Class<?> type, Method m) {
        if (m == null || Modifier.isPublic(type.getModifiers())) {
            return m;
        }
        Class<?>[] inf = type.getInterfaces();
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/Util.java - About 1 hr to fix

    Method addContainer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        @Listen("onClick = #addContainer")
        public void addContainer() {
            final Div container = new Div();
            container.setStyle("border: 1px solid red");
    
    
    Severity: Minor
    Found in zktest/src/main/java/org/zkoss/zktest/test2/B70_ZK_2827.java - About 1 hr to fix

      Method render has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public void render(Treeitem treeitem, Object data, int index) throws Exception {
              Treerow row;
              if(treeitem.getTreerow()==null){// tree row not create yet.
                  row = new Treerow();
                  row.setParent(treeitem);

        Method getValidator1 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public Validator getValidator1(){
                return new Validator() {
                    public void validate(ValidationContext ctx) {
                        Boolean v1 = (Boolean)ctx.getBindContext().getBindingArg("v1");
                        Boolean v2 = (Boolean)ctx.getBindContext().getBindingArg("v2");
        Severity: Minor
        Found in zktest/src/main/java/org/zkoss/zktest/bind/issue/B00634.java - About 1 hr to fix

          Method lookup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public <T extends Event> EventQueue<T> lookup(String name, String scope, boolean autoCreate) {
          
                  final boolean bAppScope = EventQueues.APPLICATION.equals(scope);
                  final boolean bSessionScope = EventQueues.SESSION.equals(scope);
          
          

            Method renderProperties has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
                    super.renderProperties(renderer);
            
                    if (_auxinf != null) {
                        render(renderer, "width", _auxinf.width);
            Severity: Minor
            Found in zk/src/main/java/org/zkoss/zk/ui/HtmlBasedComponent.java - About 1 hr to fix

              Method fillUpIndexMap has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private Map<Component, Integer> fillUpIndexMap(Component first, Component last) {
                      if (first == null) // last will be null too
                          return getIndexMap(getShadowHostIfAny());
                      Component parent = first.getParent();
                      if (parent == null)
              Severity: Minor
              Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java - About 1 hr to fix

                Method parseAttribute has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private void parseAttribute(PageDefinition pgdef, ComponentInfo parent, Element el, AnnotationHelper annHelper)
                            throws Exception {
                        if (el.getAttributeItem("forEach") != null)
                            throw new UiException(message("forEach not applicable to attribute", el));
                
                
                Severity: Minor
                Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 1 hr to fix

                  Method setPage0 has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private void setPage0(Page page) {
                          if (page == _page)
                              return; //nothing changed
                  
                          //assert _parent == null || _parent.getPage() == page;
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 1 hr to fix

                    Method initClone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private void initClone(AbstractComponent owner, AuxInfo clone) {
                                //spaceinfo (after children is cloned)
                                if (spaceInfo != null) {
                                    clone.spaceInfo = owner.new SpaceInfo();
                                    owner.cloneSpaceInfoFrom(spaceInfo);
                    Severity: Minor
                    Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 1 hr to fix

                      Method newComponent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public Component newComponent(Page page, Component parent, ShadowInfo compInfo, Component insertBefore) {
                              final Component comp = compInfo.newInstance(page, parent);
                              Utils.setShadowInfo(comp, compInfo);
                              Object currentInfo = ShadowElementsCtrl.getCurrentInfo();
                      
                      
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractUiFactory.java - About 1 hr to fix

                        Method addListener has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public void addListener(Object listener) {
                                boolean added = false;
                                if (listener instanceof EventInterceptor) {
                                    _eis.addEventInterceptor((EventInterceptor) listener);
                                    added = true;
                        Severity: Minor
                        Found in zk/src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java - About 1 hr to fix

                          Method resumeAll has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private void resumeAll(Desktop desktop, UiVisualizer uv, List<Throwable> errs) {
                                  //We have to loop because a resumed thread might resume others
                                  while (!_resumed.isEmpty()) { //no need to sync (better performance)
                                      final List<EventProcessingThreadImpl> list;
                                      synchronized (_resumed) {
                          Severity: Minor
                          Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

                            Method parseRequest has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static AuDecoder parseRequest(HttpServletRequest request, AuDecoder decoder) {
                                    Map<String, Object> params = getFileuploadMetaPerWebApp(
                                            WebApps.getCurrent());
                                    AbstractFileUpload upload = newServletDiskFileUpload(new DiskFileItemFactory.Builder()
                                            .setBufferSize((Integer) params.get("sizeThreadHold"))
                            Severity: Minor
                            Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java - About 1 hr to fix

                              Method getFileuploadMetaPerWebApp has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private static  Map<String, Object> getFileuploadMetaPerWebApp(WebApp webApp) {
                                      final Map<String, Object> params = new HashMap<String, Object>();
                              
                                      final Configuration conf = webApp.getConfiguration();
                                      int thrs = conf.getFileSizeThreshold();
                              Severity: Minor
                              Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java - About 1 hr to fix

                                Method reconstructPacket has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private static Object reconstructPacket(Object data, Map<String, Object> reqData, Desktop desktop,
                                            Map<String, Object> params) throws IOException {
                                        if (data instanceof List) {
                                            int i = 0;
                                            List listData = (List) data;
                                Severity: Minor
                                Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java - About 1 hr to fix

                                  Method readObject has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private void readObject(java.io.ObjectInputStream s) throws IOException, ClassNotFoundException {
                                          s.defaultReadObject();
                                  
                                          if (s.readBoolean()) {
                                              BSHInterpreter.read(new NameSpace(null, null, "nst") {
                                  Severity: Minor
                                  Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/NSWrapSR.java - About 1 hr to fix

                                    Method get has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            public Object get(ContextType type) {
                                                switch (type) {
                                                //bind contexts
                                                case BIND_CONTEXT:
                                                    return _bindContext;
                                    Severity: Minor
                                    Found in zkbind/src/main/java/org/zkoss/bind/impl/ParamCall.java - About 1 hr to fix

                                      Method visitMethod has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              private MethodCollector visitMethod(int access, String name, String desc) {
                                                  // already found the method, skip any processing
                                                  if (collector != null) {
                                                      return null;
                                                  }

                                        Method createKey has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static Object createKey(Object obj) {
                                                if (obj == null) {
                                                    return NULL;
                                                }
                                                if (!obj.getClass().isArray()) {
                                        Severity: Minor
                                        Found in zkbind/src/main/java/org/zkoss/bind/impl/KeyFactory.java - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language