struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [1/5] struts git commit: Adds new methods and marks current as deprecated
Date Thu, 03 Aug 2017 14:05:00 GMT
Repository: struts
Updated Branches:
  refs/heads/master 5678ff74b -> c2aeaf2ea


Adds new methods and marks current as deprecated


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

Branch: refs/heads/master
Commit: 2f690cfe6260ccdf3aa617baf65a4b836c49cf65
Parents: 9d47af6
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Wed Aug 2 14:56:09 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Wed Aug 2 14:56:09 2017 +0200

----------------------------------------------------------------------
 .../struts2/rest/handler/ContentTypeHandler.java    | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/2f690cfe/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
index 7dca16a..a01557e 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
@@ -21,6 +21,8 @@
 
 package org.apache.struts2.rest.handler;
 
+import com.opensymphony.xwork2.ActionInvocation;
+
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
@@ -35,9 +37,14 @@ public interface ContentTypeHandler {
      * @param in The input stream, usually the body of the request
      * @param target The target, usually the action class
      * @throws IOException If unable to write to the output stream
+     *
+     * @deprecated use version which requires {@link ActionInvocation}
      */
+    @Deprecated
     void toObject(Reader in, Object target) throws IOException;
-    
+
+    void toObject(ActionInvocation invocation, Reader in, Object target) throws IOException;
+
     /**
      * Writes content to the stream
      * 
@@ -46,9 +53,14 @@ public interface ContentTypeHandler {
      * @param stream The output stream, usually the response
      * @return The new result code
      * @throws IOException If unable to write to the output stream
+     *
+     * @deprecated use version which requires {@link ActionInvocation}
      */
+    @Deprecated
     String fromObject(Object obj, String resultCode, Writer stream) throws IOException;
-    
+
+    String fromObject(ActionInvocation invocation, Object obj, String resultCode, Writer
stream) throws IOException;
+
     /**
      * Gets the content type for this handler
      * 


Mime
View raw message