Showing 4,841 of 7,782 total issues

Method toByteArray has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        @SuppressWarnings("unchecked")
        private byte[] toByteArray(RequestContext reqctx) throws ServletException, IOException {
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
            final HttpServletRequest request = reqctx.request;
            final String main = request != null ? request.getParameter("main") : null;
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/http/WpdExtendlet.java - About 1 hr to fix

    Method addByCompoundValue has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public void addByCompoundValue(String cval, Location loc) {
            final int len = cval.length();
            if (cval.charAt(1) == '{' && cval.charAt(len - 1) == '}') { //Format 1
                addInV5(cval.substring(2, len - 1));
                return;

      Method writeObject has 34 lines of code (exceeds 25 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();
      
      
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.java - About 1 hr to fix

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

            private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
                s.defaultReadObject();
        
                init();
        
        
        Severity: Minor
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java - About 1 hr to fix

          Method addRequest has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private void addRequest(AuRequest request) {
                  //case 1, BUSY_IGNORE: Drop any existent ignorable requests
                  //We don't need to iterate all because requests is added one-by-one
                  //In other words, if any temporary request, it must be the last
                  {
          Severity: Minor
          Found in zk/src/main/java/org/zkoss/zk/ui/impl/RequestQueueImpl.java - About 1 hr to fix

            Method onPiggyback has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public void onPiggyback() {
                    // B65-ZK-2105: Need to check if desktop is null.
                    if (_desktop == null)
                        return;
                    final Configuration config = _desktop.getWebApp().getConfiguration();
            Severity: Minor
            Found in zk/src/main/java/org/zkoss/zk/ui/impl/PollingServerPush.java - About 1 hr to fix

              Method doGet0 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  static boolean doGet0(HttpServletRequest request, HttpServletResponse response, ServletContext ctx,
                          ClassWebResource cwr) throws ServletException, IOException {
                      final String pi = Https.getThisPathInfo(request);
              
                      final boolean withpi = pi != null && pi.length() != 0 && !(pi.startsWith("/_/") || "/_".equals(pi));
              Severity: Minor
              Found in zk/src/main/java/org/zkoss/zk/au/http/DHtmlResourceServlet.java - About 1 hr to fix

                Method invoke has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public Object invoke(Object self, Method method, Method proceed, Object[] args) throws Exception {
                        try {
                            final String mname = method.getName();
                            Class<?> declaringClass = method.getDeclaringClass();
                
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/proxy/FormProxyHandler.java - About 1 hr to fix

                  Method readClass has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private static byte[] readClass(final InputStream is) throws IOException {
                              if (is == null) {
                                  throw new IOException("Class not found");
                              }
                              try {

                    Method equals has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        static boolean equals(Object a, Object b) {
                            if (a == b) {
                                return true;
                            }
                            if (a == null || b == null) {
                    Severity: Minor
                    Found in zkbind/src/main/java/org/zkoss/bind/impl/KeyFactory.java - About 1 hr to fix

                      Method doGlobalCommandExecute has 34 lines of code (exceeds 25 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

                        Method clone has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public Object clone() {
                                final Grid clone = (Grid) super.clone();
                                clone.init();
                        
                                // remove cached listeners
                        Severity: Minor
                        Found in zul/src/main/java/org/zkoss/zul/Grid.java - About 1 hr to fix

                          Method removePartial has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private boolean removePartial(Collection<?> c, boolean isRemove) {
                                  int sz = c.size();
                                  int removed = 0;
                                  int retained = 0;
                                  int index = 0;
                          Severity: Minor
                          Found in zul/src/main/java/org/zkoss/zul/ListModelSet.java - About 1 hr to fix

                            Method fixGroupsInfoBeforeInsert has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                private void fixGroupsInfoBeforeInsert(Row newItem, Row refChild, boolean isReorder) {
                                    if (_isReplacingRow) //@see Grid.Renderer#render
                                        return; //called by #insertBefore(), skip handling GroupInfo
                            
                                    if (newItem instanceof Groupfoot) {
                            Severity: Minor
                            Found in zul/src/main/java/org/zkoss/zul/Rows.java - About 1 hr to fix

                              Method stringToInts has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static final int[] stringToInts(String numbers, int defaultValue) throws WrongValueException {
                                      if (numbers == null)
                                          return null;
                              
                                      List<Integer> list = new LinkedList<Integer>();
                              Severity: Minor
                              Found in zul/src/main/java/org/zkoss/zul/impl/Utils.java - About 1 hr to fix

                                Function handlers has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    handlers: function( event, handlers ) {
                                        var i, handleObj, sel, matchedHandlers, matchedSelectors,
                                            handlerQueue = [],
                                            delegateCount = handlers.delegateCount,
                                            cur = event.target;
                                Severity: Minor
                                Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 1 hr to fix

                                  Function center has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      center(flags?: string): this {
                                          var el = this.jq[0],
                                              wdgap = this.offsetWidth(),
                                              hghgap = this.offsetHeight();
                                  
                                  
                                  Severity: Minor
                                  Found in zk/src/main/resources/web/js/zk/dom.ts - About 1 hr to fix

                                    Function _scrollIntoView has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        _scrollIntoView(parent?: Element | boolean): this {
                                            // eslint-disable-next-line zk/noNull
                                            var n: HTMLElement | null = this.jq[0];
                                            if (n) {
                                                var real = jq('#' + n.id + '-real')[0];
                                    Severity: Minor
                                    Found in zk/src/main/resources/web/js/zk/dom.ts - About 1 hr to fix

                                      Function _getTextSize has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      function _getTextSize(zkc: zk.JQZK, zkp: zk.JQZK, zkpOffset: zk.Offset): zk.Offset {
                                          let $zkc = zkc.jq,
                                              $prev = $zkc.prev(),
                                              pos: zk.Offset = [0, 0],
                                              coldVal: Record<string, string>,
                                      Severity: Minor
                                      Found in zk/src/main/resources/web/js/zk/flex.ts - About 1 hr to fix

                                        Function zkShowCrashMessage has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    window.zkShowCrashMessage = function () {
                                                        var styleHTML = '<style> a:visited {color: white;} </style>',
                                                            divHTML = '<div style="background: rgb(35,48,64); text-align: center; color: white; position: absolute; \
                                                                top: 0; left: 0; right: 0; bottom: 0; margin: auto; width: 50%; height: 300px; font-size: 20px;">',
                                                            iconHTML = '<i class="z-icon-frown-o" style="font-size: 5em; display: block;"></i>',
                                        Severity: Minor
                                        Found in zk/src/main/resources/web/js/zk/crashmsg.ts - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language