mirror of
https://github.com/apache/struts.git
synced 2026-08-06 07:06:58 +00:00
WN-5141
- fix formatting issues, spurious comments, etc - RuntimeException > UncheckedIOException
This commit is contained in:
+1
-1
@@ -89,7 +89,7 @@
|
||||
<failOnError>true</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
|
||||
+15
-13
@@ -18,6 +18,19 @@
|
||||
*/
|
||||
package org.apache.struts2.dispatcher.multipart;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.fileupload2.core.DiskFileItem;
|
||||
import org.apache.commons.fileupload2.core.DiskFileItemFactory;
|
||||
import org.apache.commons.fileupload2.core.FileItem;
|
||||
@@ -33,17 +46,6 @@ import org.apache.logging.log4j.Logger;
|
||||
import org.apache.struts2.dispatcher.LocalizedMessage;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Multipart form data request adapter for Jakarta Commons Fileupload package.
|
||||
@@ -82,7 +84,7 @@ public class JakartaMultiPartRequest extends AbstractMultiPartRequest {
|
||||
} else if (e instanceof FileUploadSizeException) {
|
||||
FileUploadSizeException ex = (FileUploadSizeException) e;
|
||||
errorMessage = buildErrorMessage(e, new Object[]{ex.getPermitted(), ex.getActualSize()});
|
||||
} else {
|
||||
} else {
|
||||
errorMessage = buildErrorMessage(e, new Object[]{});
|
||||
}
|
||||
|
||||
@@ -369,7 +371,7 @@ public class JakartaMultiPartRequest extends AbstractMultiPartRequest {
|
||||
try {
|
||||
item.delete();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,8 +64,6 @@ public class Restful2ActionMapperTest extends StrutsInternalTestCase {
|
||||
public void testGetIndex() throws Exception {
|
||||
req.setRequestURI("/my/namespace/foo/");
|
||||
req.setServletPath("/my/namespace/foo/");
|
||||
//
|
||||
//
|
||||
req.setMethod("GET");
|
||||
|
||||
ActionMapping mapping = mapper.getMapping(req, configManager);
|
||||
|
||||
@@ -83,9 +83,6 @@ public class BeanTagTest extends AbstractUITagTest {
|
||||
fail();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
|
||||
BeanTag freshTag = new BeanTag();
|
||||
freshTag.setPerformClearTagStateForTagPoolingServers(true);
|
||||
|
||||
Reference in New Issue
Block a user