在对ahxu中的上传文件中的DiskFileUploadEx.class进行反编译时出现了goto语句:
编译后的代码如下:
public List parseRequestEx(HttpServletRequest req)
        throws FileUploadException
    {
        ArrayList InvalidFiles;
        ArrayList items;
        String contentType;
        if(req == null)
            throw new NullPointerException("req parameter");
        InvalidFiles = new ArrayList();
        items = new ArrayList();
        contentType = req.getHeader("Content-type");
        if(contentType == null || !contentType.startsWith("multipart/"))
            throw new org.apache.commons.fileupload.FileUploadBase.InvalidContentTypeException("the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is " + contentType);
        checkIfInMaxSize(req);
        byte boundary[];
        MultipartStream multi;
        boolean nextPart;
        int boundaryIndex = contentType.indexOf("boundary=");
        if(boundaryIndex < 0)
            throw new FileUploadException("the request was rejected because no multipart boundary was found");
        boundary = contentType.substring(boundaryIndex + 9).getBytes();
        java.io.InputStream input = req.getInputStream();
        aUploadProcess = new UploadProcess(req);
        aUploadProcess.init();
        aUploadProcess.setReportLimitSize(reportLimitSize);
        InputSteamEx inputEx = new InputSteamEx(input, aUploadProcess);
        multi = new MultipartStream(inputEx, boundary);
        String headerEncoding = getHeaderEncoding();
        multi.setHeaderEncoding(headerEncoding);
        nextPart = multi.skipPreamble();
          goto _L1
_L16:
        java.util.Map headers;
        String fieldName;
        headers = parseHeaders(multi.readHeaders());
        fieldName = getFieldName(headers);
        if(fieldName == null) goto _L3; else goto _L2
_L2:
        String subContentType = getHeader(headers, "Content-type");
        if(subContentType == null || !subContentType.startsWith("multipart/mixed")) goto _L5; else goto _L4
_L4:
        boolean nextSubPart;
        byte subBoundary[] = subContentType.substring(subContentType.indexOf("boundary=") + 9).getBytes();
        multi.setBoundary(subBoundary);
        nextSubPart = multi.skipPreamble();
          goto _L6
_L10:
        headers = parseHeaders(multi.readHeaders());
        if(getFileName(headers) == null) goto _L8; else goto _L7
_L7:
        FileItem item;
        if(!isInAllowFilesList(getFileName(headers)))
        {
            InvalidFiles.add(getFileName(headers));
            multi.discardBodyData();
            continue; /* Loop/switch isn't completed */
        }
        item = createItem(headers, false);
        OutputStream os = item.getOutputStream();
        try
        {
            aUploadProcess.setCurrentUploadFileName(getFileName(headers));
            multi.readBodyData(os);
        }
        finally
        {
            os.close();
        }
        items.add(item);
        continue; /* Loop/switch isn't completed */
_L8:
        multi.discardBodyData();
        nextSubPart = multi.readBoundary();
_L6:
        if(nextSubPart) goto _L10; else goto _L9
_L9:
        multi.setBoundary(boundary);
        continue; /* Loop/switch isn't completed */
_L5:
        if(getFileName(headers) == null) goto _L12; else goto _L11
_L11:
        FileItem item;
        if(!isInAllowFilesList(getFileName(headers)))
        {
            InvalidFiles.add(getFileName(headers));
            multi.discardBodyData();
            continue; /* Loop/switch isn't completed */
        }
        item = createItem(headers, false);
        OutputStream os = item.getOutputStream();
        try
        {
            aUploadProcess.setCurrentUploadFileName(getFileName(headers));
            multi.readBodyData(os);
        }
        finally
        {
            os.close();
        }
        items.add(item);
        continue; /* Loop/switch isn't completed */
_L12:
        if(!allowField) goto _L14; else goto _L13
_L13:
        item = createItem(headers, true);
        OutputStream os = item.getOutputStream();
        try
        {
            multi.readBodyData(os);
        }
        finally
        {
            os.close();
        }
        items.add(item);
        continue; /* Loop/switch isn't completed */
_L14:
        multi.discardBodyData();
        continue; /* Loop/switch isn't completed */
_L3:
        multi.discardBodyData();
        nextPart = multi.readBoundary();
_L1:
        if(nextPart) goto _L16; else goto _L15
_L15:
        if(!InvalidFiles.isEmpty())
            throw new InvalidFileUploadException("Unallowed Files!", InvalidFiles);
        break MISSING_BLOCK_LABEL_710;
        IOException e;
        e;
        throw new FileUploadException("Processing of multipart/form-data request failed. " + e.getMessage());
        return items;
    }
如何对上面的代码进行还原?请高手帮帮
高手帮帮忙  在线等..........

解决方案 »

  1.   

    还原?代码有什么问题??
    goto是java中的一个关键字啊,程序直接跳转到指定的地方继续执行。
    上biadu找找相关信息吧。
      

  2.   

    不对,java里是break,continue有goto的作用。
      

  3.   

    也就是怎样去掉 goto 关键字
      

  4.   

    有个网页
    http://hi.baidu.com/qepqgeqqt%5Ftech/blog/item/975f401061c75406213f2ed9.html
    你看看吧,共3篇文章,讲的是反编译后的代码还原,看看有没有帮助
      

  5.   

    goto在java中只是一个保留字,以备未来用
      

  6.   

    public void f2() {    
            int[] list = new int[] { 1, 2, 3, 4 };    
            if (Boolean.getBoolean("sys")) {    
                 System.out.println("sys");    
             } else {    
                 check: while (true) {    
                    for (int i = 0; i < list.length; i++) {    
                        if (list[i] == 2) {    
                            continue check;    
                         } else {    
                            break;    
                         }    
                     }    
                 }    
             }    
         }    这段代码中的check是起什么做用的,是JAVA的关键字吗
      

  7.   

    check是标记,这里的continue就和goto的功能很像了
      

  8.   


    比如用下面的语句:当程序执行到continue这个语句时,程序是执行下面的_L3,还是继续循环下一个呢?
    _L14:
         multi.discardBodyData();
         continue; /* Loop/switch isn't completed */
    _L3:
         multi.discardBodyData();
         nextPart = multi.readBoundary();
      

  9.   

    用if else理一下顺序再稍作修改就可以了
      

  10.   

    混淆器处理过的class文件可能!