struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4899) Upgrade Spring to version 4.3.13
Date Tue, 30 Jan 2018 07:18:02 GMT

    [ https://issues.apache.org/jira/browse/WW-4899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16344600#comment-16344600
] 

ASF GitHub Bot commented on WW-4899:
------------------------------------

yasserzamani closed pull request #189: WW-4899: upgrade Spring
URL: https://github.com/apache/struts/pull/189
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/apps/pom.xml b/apps/pom.xml
index 1a7d12c96..791f306ba 100644
--- a/apps/pom.xml
+++ b/apps/pom.xml
@@ -99,7 +99,7 @@
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
-            <version>${struts2.springPlatformVersion}</version>
+            <version>${spring.platformVersion}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
b/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
index 9876fdf8e..9b6753572 100644
--- a/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
+++ b/core/src/test/java/org/apache/struts2/interceptor/FileUploadInterceptorTest.java
@@ -224,10 +224,8 @@ public void testNoMultipartRequest() throws Exception {
     public void testInvalidContentTypeMultipartRequest() throws Exception {
         MockHttpServletRequest req = new MockHttpServletRequest();
 
-        req.setCharacterEncoding("text/html");
-        req.setContentType("text/xml"); // not a multipart contentype
+        req.setContentType("multipart/form-data"); // not a multipart contentype
         req.setMethod("post");
-        req.addHeader("Content-type", "multipart/form-data");
 
         MyFileupAction action = container.inject(MyFileupAction.class);
         MockActionInvocation mai = new MockActionInvocation();
diff --git a/plugins/embeddedjsp/pom.xml b/plugins/embeddedjsp/pom.xml
index d629781eb..414a2a4bc 100644
--- a/plugins/embeddedjsp/pom.xml
+++ b/plugins/embeddedjsp/pom.xml
@@ -46,6 +46,11 @@
             <artifactId>spring-core</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <scope>test</scope>
+        </dependency>
         <dependency>
             <groupId>org.easymock</groupId>
             <artifactId>easymock</artifactId>
diff --git a/plugins/json/pom.xml b/plugins/json/pom.xml
index ccacc2960..c84fdff03 100644
--- a/plugins/json/pom.xml
+++ b/plugins/json/pom.xml
@@ -89,6 +89,12 @@
             <scope>test</scope>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
             <groupId>org.easytesting</groupId>
             <artifactId>fest-assert</artifactId>
diff --git a/plugins/rest/pom.xml b/plugins/rest/pom.xml
index 77b8119e7..06fa959ed 100644
--- a/plugins/rest/pom.xml
+++ b/plugins/rest/pom.xml
@@ -68,6 +68,12 @@
             <optional>true</optional>
         </dependency>
 
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <optional>true</optional>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-core</artifactId>
diff --git a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
index 9cc1ac652..f23d014d5 100644
--- a/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
+++ b/plugins/rest/src/test/java/org/apache/struts2/rest/DefaultHttpHeadersTest.java
@@ -30,19 +30,28 @@
 import static javax.servlet.http.HttpServletResponse.*;
 
 public class DefaultHttpHeadersTest extends TestCase {
+
+    private static final String DATE_FORMAT = "EEE, dd MMM yyyy HH:mm:ss zzz";
+    private static final TimeZone GMT = TimeZone.getTimeZone("GMT");
+
     private MockHttpServletResponse mockResponse;
     private MockHttpServletRequest mockRequest;
+    private SimpleDateFormat dateFormat;
 
     @Override
     public void setUp() {
         mockResponse = new MockHttpServletResponse();
         mockRequest = new MockHttpServletRequest();
+
+        dateFormat = new SimpleDateFormat(DATE_FORMAT, Locale.US);
+        dateFormat.setTimeZone(GMT);
     }
 
     @Override
     public void tearDown() {
         mockRequest = null;
         mockRequest = null;
+        dateFormat = null;
     }
 
     public void testApply() {
@@ -59,7 +68,7 @@ public void testApply() {
         assertEquals(SC_CREATED, mockResponse.getStatus());
         assertEquals("http://localhost/foo/bar/44.xhtml", mockResponse.getHeader("Location"));
         assertEquals("asdf", mockResponse.getHeader("ETag"));
-        assertEquals(String.valueOf(now.getTime()), mockResponse.getHeader("Last-Modified"));
+        assertEquals(dateFormat.format(now), mockResponse.getHeader("Last-Modified"));
 
     }
 
diff --git a/pom.xml b/pom.xml
index 672b126da..b15d3b880 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,7 +97,7 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <struts2.springPlatformVersion>4.1.9.RELEASE</struts2.springPlatformVersion>
+        <spring.platformVersion>4.3.13.RELEASE</spring.platformVersion>
         <ognl.version>3.1.15</ognl.version>
         <asm.version>5.2</asm.version>
         <tiles.version>3.0.7</tiles.version>
@@ -878,47 +878,47 @@
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-core</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-webmvc-portlet</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-context</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-aop</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-aspects</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-beans</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-test</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-context-support</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
             <dependency>
                 <groupId>org.springframework</groupId>
                 <artifactId>spring-web</artifactId>
-                <version>${struts2.springPlatformVersion}</version>
+                <version>${spring.platformVersion}</version>
             </dependency>
 
             <dependency>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Upgrade Spring to version 4.3.13
> --------------------------------
>
>                 Key: WW-4899
>                 URL: https://issues.apache.org/jira/browse/WW-4899
>             Project: Struts 2
>          Issue Type: Dependency
>          Components: Plugin - Spring
>            Reporter: Lukasz Lenart
>            Priority: Major
>             Fix For: 2.5.15
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message