You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2022/03/15 13:32:06 UTC

[struts] branch master updated (c094052 -> 5b40f9f)

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git.


    from c094052  Uses Java Reflections instead BeanUtils to read property
     new e9d0a55  Cleans up code
     new 5b40f9f  WW-5172 Upgrades Freemarker to 2.3.31 version

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/struts2/rest/ContentTypeInterceptor.java | 17 ++++++++---------
 pom.xml                                                 |  2 +-
 2 files changed, 9 insertions(+), 10 deletions(-)

[struts] 02/02: WW-5172 Upgrades Freemarker to 2.3.31 version

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 5b40f9f48e6f77851a1adda0824716c9c0cbff04
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Mar 15 14:32:02 2022 +0100

    WW-5172 Upgrades Freemarker to 2.3.31 version
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index a238c0c..99431aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -704,7 +704,7 @@
             <dependency>
                 <groupId>org.freemarker</groupId>
                 <artifactId>freemarker</artifactId>
-                <version>2.3.30</version>
+                <version>2.3.31</version>
             </dependency>
 
             <dependency>

[struts] 01/02: Cleans up code

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit e9d0a5518cd0671d9ad0353a2c87246ef0d2061b
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Tue Mar 15 14:27:57 2022 +0100

    Cleans up code
---
 .../org/apache/struts2/rest/ContentTypeInterceptor.java | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java b/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java
index 5571714..1c49d36 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java
@@ -34,23 +34,22 @@ import java.io.InputStreamReader;
  */
 public class ContentTypeInterceptor extends AbstractInterceptor {
 
-    private static final long serialVersionUID = 1L;
-    ContentTypeHandlerManager selector;
-    
+    private final ContentTypeHandlerManager selector;
+
     @Inject
-    public void setContentTypeHandlerSelector(ContentTypeHandlerManager sel) {
-        this.selector = sel;
+    public ContentTypeInterceptor(ContentTypeHandlerManager selector) {
+        this.selector = selector;
     }
-    
+
     public String intercept(ActionInvocation invocation) throws Exception {
         HttpServletRequest request = ServletActionContext.getRequest();
         ContentTypeHandler handler = selector.getHandlerForRequest(request);
-        
+
         Object target = invocation.getAction();
         if (target instanceof ModelDriven) {
-            target = ((ModelDriven)target).getModel();
+            target = ((ModelDriven<?>)target).getModel();
         }
-        
+
         if (request.getContentLength() > 0) {
             InputStream is = request.getInputStream();
             InputStreamReader reader = new InputStreamReader(is);