diff --git a/directjngine-demo/pom.xml b/directjngine-demo/pom.xml index ee31c38..a97e91c 100644 --- a/directjngine-demo/pom.xml +++ b/directjngine-demo/pom.xml @@ -6,7 +6,7 @@ org.sonatype.directjngine directjngine-parent - 2.2.11-SNAPSHOT + 3.0.0 ../pom.xml @@ -30,8 +30,8 @@ - 1.5 - 1.5 + 17 + 17 @@ -49,9 +49,9 @@ --> - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 6.0.0 provided diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/FormPostDemo.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/FormPostDemo.java index 2bc41b9..e8c23e5 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/FormPostDemo.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/FormPostDemo.java @@ -28,7 +28,7 @@ import java.io.IOException; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.apache.commons.io.IOUtils; import com.softwarementors.extjs.djn.StringBuilderUtils; diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/Profile.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/Profile.java index 48aa388..2ceff4b 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/Profile.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/demo/Profile.java @@ -28,7 +28,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import com.softwarementors.extjs.djn.config.annotations.DirectFormPostMethod; import com.softwarementors.extjs.djn.config.annotations.DirectMethod; diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/FormTest.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/FormTest.java index ce8276d..aaeb44a 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/FormTest.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/FormTest.java @@ -27,7 +27,7 @@ import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import com.softwarementors.extjs.djn.config.annotations.DirectFormPostMethod; diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/ManualFormUploadSupportTest.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/ManualFormUploadSupportTest.java index 6ce6b6a..d3f6ec0 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/ManualFormUploadSupportTest.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/ManualFormUploadSupportTest.java @@ -28,7 +28,7 @@ import java.io.IOException; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.apache.commons.io.IOUtils; import com.softwarementors.extjs.djn.config.annotations.DirectFormPostMethod; diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/config/RegistryConfiguratorForTesting.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/config/RegistryConfiguratorForTesting.java index f30a19f..67f12c8 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/config/RegistryConfiguratorForTesting.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/config/RegistryConfiguratorForTesting.java @@ -28,7 +28,7 @@ import java.lang.reflect.Method; import java.util.Map; -import javax.servlet.ServletConfig; +import jakarta.servlet.ServletConfig; import com.softwarementors.extjs.djn.StringUtils; import com.softwarementors.extjs.djn.api.RegisteredAction; diff --git a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/ssm/WebContextManagerTest.java b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/ssm/WebContextManagerTest.java index e7a1fda..cf22f84 100644 --- a/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/ssm/WebContextManagerTest.java +++ b/directjngine-demo/src/main/java/com/softwarementors/extjs/djn/test/servlet/ssm/WebContextManagerTest.java @@ -25,8 +25,8 @@ package com.softwarementors.extjs.djn.test.servlet.ssm; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpSession; import com.softwarementors.extjs.djn.config.annotations.DirectMethod; import com.softwarementors.extjs.djn.servlet.ssm.WebContext; diff --git a/directjngine/pom.xml b/directjngine/pom.xml index 4fb0f31..a21ff26 100644 --- a/directjngine/pom.xml +++ b/directjngine/pom.xml @@ -6,7 +6,7 @@ org.sonatype.directjngine directjngine-parent - 2.2.11-SNAPSHOT + 3.0.0 ../pom.xml @@ -32,51 +32,57 @@ com.google.code.findbugs jsr305 - 2.0.1 + 3.0.2 compile - com.google.code.findbugs - annotations - 2.0.1 + com.github.spotbugs + spotbugs-annotations + 4.8.3 compile - commons-lang - commons-lang - 2.6 + org.apache.commons + commons-lang3 + 3.14.0 + + + + org.apache.commons + commons-text + 1.11.0 commons-io commons-io - 2.11.0 + 2.15.1 - commons-fileupload - commons-fileupload - 1.4 + org.apache.commons + commons-fileupload2-jakarta + 2.0.0-M1 com.google.code.gson gson - 2.9.0 + 2.10.1 org.slf4j slf4j-api - 1.7.36 + 2.0.12 org.slf4j slf4j-ext - 1.7.36 + 2.0.9 @@ -126,9 +132,9 @@ --> - javax.servlet - javax.servlet-api - 3.1.0 + jakarta.servlet + jakarta.servlet-api + 6.0.0 provided diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/EncodingUtils.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/EncodingUtils.java index 4ea202c..4dd5092 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/EncodingUtils.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/EncodingUtils.java @@ -27,7 +27,8 @@ import javax.annotation.Nullable; -import org.apache.commons.lang.StringEscapeUtils; +import static org.apache.commons.text.StringEscapeUtils.escapeHtml4; + public final class EncodingUtils { private EncodingUtils() { @@ -41,7 +42,6 @@ public static String htmlEncode(@Nullable String value) { if (value == null) { return value; } - - return StringEscapeUtils.escapeHtml(value); + return escapeHtml4(value); } } diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/RequestRouter.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/RequestRouter.java index f27c4e5..981fd8c 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/RequestRouter.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/RequestRouter.java @@ -32,8 +32,8 @@ import java.io.Writer; import java.util.List; -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileUploadException; +import org.apache.commons.fileupload2.core.FileItem; +import org.apache.commons.fileupload2.core.FileUploadException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestData.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestData.java index 0c90ce0..e9e4b86 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestData.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestData.java @@ -28,7 +28,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import com.softwarementors.extjs.djn.router.processor.standard.StandardRequestData; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBase.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBase.java index 4b4beaf..b28ebf3 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBase.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBase.java @@ -25,12 +25,13 @@ package com.softwarementors.extjs.djn.router.processor.standard.form; +import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -135,7 +136,11 @@ private ResponseData processRequest( FormPostRequestData request ) { } finally { for (FileItem fileItem : request.getFileFields().values()) { - fileItem.delete(); + try { + fileItem.delete(); + } catch (IOException e) { + //ignore ... + } } } } diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/simple/SimpleFormPostRequestProcessor.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/simple/SimpleFormPostRequestProcessor.java index c2b6c3c..ef0e474 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/simple/SimpleFormPostRequestProcessor.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/simple/SimpleFormPostRequestProcessor.java @@ -31,7 +31,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/FileUploadException.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/FileUploadException.java index d14ed9b..cbf9618 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/FileUploadException.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/FileUploadException.java @@ -34,7 +34,7 @@ protected FileUploadException(String message, Throwable cause) { super(message, cause); } - public static FileUploadException forFileUploadException( org.apache.commons.fileupload.FileUploadException cause ) { + public static FileUploadException forFileUploadException( org.apache.commons.fileupload2.core.FileUploadException cause ) { assert cause != null; // The FileUploadException raised by commons-fileupload usually hides an inner exception that is the real cause diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessor.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessor.java index 5c5bc58..85cd3d3 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessor.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessor.java @@ -25,25 +25,23 @@ package com.softwarementors.extjs.djn.router.processor.standard.form.upload; -import java.io.IOException; -import java.io.Writer; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.disk.DiskFileItemFactory; -import org.apache.commons.fileupload.servlet.ServletFileUpload; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.softwarementors.extjs.djn.api.Registry; import com.softwarementors.extjs.djn.config.GlobalConfiguration; import com.softwarementors.extjs.djn.router.dispatcher.Dispatcher; import com.softwarementors.extjs.djn.router.processor.standard.form.FormPostRequestProcessorBase; - import edu.umd.cs.findbugs.annotations.NonNull; +import org.apache.commons.fileupload2.core.DiskFileItemFactory; +import org.apache.commons.fileupload2.core.FileItem; +import org.apache.commons.fileupload2.jakarta.JakartaServletDiskFileUpload; +import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.Writer; +import java.util.HashMap; +import java.util.List; +import java.util.Map; import static com.softwarementors.extjs.djn.EncodingUtils.htmlEncode; @@ -112,11 +110,12 @@ private static String getFileParametersLogString(Map fileField return result.toString(); } - public static ServletFileUpload createFileUploader(final long maxUploadSize) { + public static JakartaServletFileUpload createFileUploader(final long maxUploadSize) { // Create a factory for disk-based file items - DiskFileItemFactory factory = new DiskFileItemFactory(); + JakartaServletDiskFileUpload fileUpload = new JakartaServletDiskFileUpload(); + DiskFileItemFactory factory = fileUpload.getFileItemFactory(); // Create a new file upload handler - ServletFileUpload upload = new ServletFileUpload(factory); + JakartaServletFileUpload upload = new JakartaServletFileUpload(factory); // Set upload handler limits upload.setSizeMax(maxUploadSize); @@ -124,7 +123,7 @@ public static ServletFileUpload createFileUploader(final long maxUploadSize) { return upload; } - public void handleFileUploadException(FileUploadException e) { + public void handleFileUploadException(org.apache.commons.fileupload2.core.FileUploadException e) { assert e != null; com.softwarementors.extjs.djn.router.processor.standard.form.upload.FileUploadException ex = com.softwarementors.extjs.djn.router.processor.standard.form.upload.FileUploadException.forFileUploadException(e); diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/DirectJNgineServlet.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/DirectJNgineServlet.java index b70797d..a949a74 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/DirectJNgineServlet.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/DirectJNgineServlet.java @@ -31,16 +31,17 @@ import java.util.List; import java.util.Map; -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.fileupload.FileItem; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.servlet.ServletFileUpload; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload2.core.FileItem; +import org.apache.commons.fileupload2.core.FileUploadException; +import org.apache.commons.fileupload2.jakarta.JakartaServletDiskFileUpload; +import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.NDC; @@ -97,7 +98,7 @@ public class DirectJNgineServlet extends HttpServlet { unique in a web application. */ @NonNull private static Map processors = new HashMap(); - @NonNull private static Map uploaders = new HashMap(); + @NonNull private static Map uploaders = new HashMap<>(); // Non-mutable => no need to worry about thread-safety => can be an 'instance' variable protected RequestRouter getProcessor() { @@ -107,7 +108,7 @@ protected RequestRouter getProcessor() { } // Non-mutable => no need to worry about thread-safety => can be an 'instance' variable - protected ServletFileUpload getUploader() { + protected JakartaServletFileUpload getUploader() { assert uploaders.containsKey(getServletName()); return uploaders.get(getServletName()); @@ -548,7 +549,7 @@ else if( StringUtils.startsWithCaseInsensitive( contentType, "application/json") else if( StringUtils.startsWithCaseInsensitive( contentType, "application/x-www-form-urlencoded") && request.getMethod().equalsIgnoreCase("post")) { return RequestType.FORM_SIMPLE_POST; } - else if( ServletFileUpload.isMultipartContent(request)) { + else if( JakartaServletDiskFileUpload.isMultipartContent(request)) { return RequestType.FORM_UPLOAD_POST; } else if( RequestRouter.isSourceRequest(pathInfo)) { @@ -671,10 +672,10 @@ private void processUploadFormPost(HttpServletRequest request, HttpServletRespon } @SuppressWarnings("unchecked") - private List getFileItems(HttpServletRequest request) throws FileUploadException { + private List getFileItems(HttpServletRequest request) throws org.apache.commons.fileupload2.core.FileUploadException { assert request != null; - ServletFileUpload uploader = getUploader(); + JakartaServletFileUpload uploader = getUploader(); return uploader.parseRequest(request); } @@ -693,7 +694,7 @@ private String getAntiCsrfTokenCookie(final HttpServletRequest request) { Cookie[] cookies = request.getCookies(); if (cookies != null) { for (Cookie cookie : cookies) { - if (org.apache.commons.lang.StringUtils.equals(antiCsrfTokenName, cookie.getName())) { + if (org.apache.commons.lang3.StringUtils.equals(antiCsrfTokenName, cookie.getName())) { return cookie.getValue(); } } @@ -703,7 +704,7 @@ private String getAntiCsrfTokenCookie(final HttpServletRequest request) { private String getAntiCsrfTokenField(final List fileItems) { for (FileItem item : fileItems) { - if (item.isFormField() && org.apache.commons.lang.StringUtils.equals(antiCsrfTokenName, item.getFieldName())) { + if (item.isFormField() && org.apache.commons.lang3.StringUtils.equals(antiCsrfTokenName, item.getFieldName())) { return item.getString(); } } diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletRegistryConfigurator.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletRegistryConfigurator.java index 2d1cb2f..f8a3640 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletRegistryConfigurator.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletRegistryConfigurator.java @@ -25,7 +25,7 @@ package com.softwarementors.extjs.djn.servlet; -import javax.servlet.ServletConfig; +import jakarta.servlet.ServletConfig; import com.softwarementors.extjs.djn.api.Registry; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletUtils.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletUtils.java index 7234e86..68b426a 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletUtils.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ServletUtils.java @@ -29,8 +29,8 @@ import java.util.Enumeration; import java.util.List; -import javax.servlet.ServletConfig; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/SsmDispatcher.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/SsmDispatcher.java index 20e625b..707bc87 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/SsmDispatcher.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/SsmDispatcher.java @@ -28,8 +28,8 @@ import java.util.HashMap; import java.util.Map; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContext.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContext.java index a8849c1..c9ae06f 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContext.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContext.java @@ -25,12 +25,12 @@ package com.softwarementors.extjs.djn.servlet.ssm; -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpSession; import com.softwarementors.extjs.djn.StringUtils; diff --git a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContextManager.java b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContextManager.java index c95c1e7..46e8f03 100644 --- a/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContextManager.java +++ b/directjngine/src/main/java/com/softwarementors/extjs/djn/servlet/ssm/WebContextManager.java @@ -25,9 +25,9 @@ package com.softwarementors.extjs.djn.servlet.ssm; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import edu.umd.cs.findbugs.annotations.NonNull; diff --git a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBaseTest.java b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBaseTest.java index 5435405..649c5cd 100644 --- a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBaseTest.java +++ b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/FormPostRequestProcessorBaseTest.java @@ -24,6 +24,7 @@ */ package com.softwarementors.extjs.djn.router.processor.standard.form; +import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -31,7 +32,7 @@ import com.softwarementors.extjs.djn.config.GlobalConfiguration; import com.softwarementors.extjs.djn.gson.DefaultGsonBuilderConfigurator; import com.softwarementors.extjs.djn.router.dispatcher.Dispatcher; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; @@ -60,7 +61,7 @@ public void setup() { } @Test - public void validateTempFileRemoved() { + public void validateTempFileRemoved() throws IOException { Map formParameters = new HashMap(); formParameters.put("extAction", "action"); formParameters.put("extMethod", "method"); diff --git a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/Util.java b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/Util.java index d1b97c7..cee20b2 100644 --- a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/Util.java +++ b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/Util.java @@ -24,7 +24,7 @@ */ package com.softwarementors.extjs.djn.router.processor.standard.form; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessorTest.java b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessorTest.java index 455e314..968d5a1 100644 --- a/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessorTest.java +++ b/directjngine/src/test/java/com/softwarementors/extjs/djn/router/processor/standard/form/upload/UploadFormPostRequestProcessorTest.java @@ -33,7 +33,7 @@ import com.softwarementors.extjs.djn.gson.DefaultGsonBuilderConfigurator; import com.softwarementors.extjs.djn.router.dispatcher.Dispatcher; import com.softwarementors.extjs.djn.router.processor.standard.form.Util; -import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload2.core.FileItem; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; diff --git a/pom.xml b/pom.xml index 97c1bd7..6836e1e 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.sonatype.directjngine directjngine-parent - 2.2.11-SNAPSHOT + 3.0.0 pom ${project.groupId}:${project.artifactId} @@ -31,8 +31,8 @@ - 1.8 - 1.8 + 17 + 17 @@ -46,7 +46,7 @@ com.mycila license-maven-plugin - 3.0 + 4.3 true false @@ -59,7 +59,7 @@ com.sonatype.clm clm-maven-plugin - 2.16.0-01 + 2.47.10-01