struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [6/7] struts git commit: Fixes post cherry-pick
Date Thu, 24 Aug 2017 07:11:40 GMT
Fixes post cherry-pick


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b9a0c497
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b9a0c497
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b9a0c497

Branch: refs/heads/support-2-3
Commit: b9a0c497d3fd872defc9683341c8ceaccc23b7f1
Parents: 2f95b9a
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Thu Aug 24 09:10:12 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Thu Aug 24 09:10:12 2017 +0200

----------------------------------------------------------------------
 .../struts2/rest/DefaultContentTypeHandlerManager.java    |  7 +++----
 .../struts2/rest/handler/AbstractContentTypeHandler.java  |  8 +++-----
 .../apache/struts2/rest/handler/JacksonLibHandler.java    | 10 +++++-----
 3 files changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b9a0c497/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
index 02a314a..def9da0 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultContentTypeHandlerManager.java
@@ -25,8 +25,8 @@ import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.config.entities.ActionConfig;
 import com.opensymphony.xwork2.inject.Container;
 import com.opensymphony.xwork2.inject.Inject;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.rest.handler.ContentTypeHandler;
 
@@ -44,7 +44,7 @@ import java.util.Set;
  */
 public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManager {
 
-    private static final Logger LOG = LogManager.getLogger(DefaultContentTypeHandlerManager.class);
+    private static final Logger LOG = LoggerFactory.getLogger(DefaultContentTypeHandlerManager.class);
 
     /** ContentTypeHandlers keyed by the extension */
     Map<String, ContentTypeHandler> handlersByExtension = new HashMap<String, ContentTypeHandler>();
@@ -158,7 +158,6 @@ public class DefaultContentTypeHandlerManager implements ContentTypeHandlerManag
         return handler;
     }
 
-    @Override
     public String handleResult(ActionConfig actionConfig, Object methodResult, Object target)
throws IOException {
         LOG.warn("This method is deprecated!");
         return readResultCode(methodResult);

http://git-wip-us.apache.org/repos/asf/struts/blob/b9a0c497/plugins/rest/src/main/java/org/apache/struts2/rest/handler/AbstractContentTypeHandler.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/AbstractContentTypeHandler.java
b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/AbstractContentTypeHandler.java
index ae9b3b8..1aadc66 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/AbstractContentTypeHandler.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/AbstractContentTypeHandler.java
@@ -19,8 +19,8 @@
 
 package org.apache.struts2.rest.handler;
 
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 
 import java.io.IOException;
 import java.io.Reader;
@@ -28,14 +28,12 @@ import java.io.Writer;
 
 abstract public class AbstractContentTypeHandler implements ContentTypeHandler {
 
-    private static final Logger LOG = LogManager.getLogger(AbstractContentTypeHandler.class);
+    private static final Logger LOG = LoggerFactory.getLogger(AbstractContentTypeHandler.class);
 
-    @Override
     public void toObject(Reader in, Object target) throws IOException {
         LOG.warn("This method is deprecated!");
     }
 
-    @Override
     public String fromObject(Object obj, String resultCode, Writer stream) throws IOException
{
         LOG.warn("This method is deprecated!");
         return null;

http://git-wip-us.apache.org/repos/asf/struts/blob/b9a0c497/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java
b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java
index dd9dee3..a8ed5a5 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JacksonLibHandler.java
@@ -21,9 +21,9 @@
 
 package org.apache.struts2.rest.handler;
 
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectReader;
-import com.fasterxml.jackson.databind.SerializationFeature;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.ObjectReader;
+import org.codehaus.jackson.map.SerializationConfig.Feature;
 import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.inject.Inject;
 import org.apache.struts2.StrutsConstants;
@@ -42,13 +42,13 @@ public class JacksonLibHandler extends AbstractContentTypeHandler {
     private ObjectMapper mapper = new ObjectMapper();
 
     public void toObject(ActionInvocation invocation, Reader in, Object target) throws IOException
{
-        mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
+        mapper.configure(Feature.WRITE_NULL_MAP_VALUES, false);
         ObjectReader or = mapper.readerForUpdating(target);
         or.readValue(in);
     }
 
     public String fromObject(ActionInvocation invocation, Object obj, String resultCode,
Writer stream) throws IOException {
-        mapper.configure(SerializationFeature.WRITE_NULL_MAP_VALUES, false);
+        mapper.configure(Feature.WRITE_NULL_MAP_VALUES, false);
         mapper.writeValue(stream, obj);
         return null;
     }


Mime
View raw message