struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [38/50] [abbrv] struts git commit: increased visibilty of methods and constants for better extensibility
Date Fri, 15 Jul 2016 13:19:05 GMT
increased visibilty of methods and constants for better extensibility


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

Branch: refs/heads/master
Commit: b0613a60ed48540cfa749c482c902872b03517c5
Parents: 4e36a54
Author: cnenning <cnenning@apache.org>
Authored: Thu Jan 14 09:33:50 2016 +0100
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Tue Jan 19 16:19:19 2016 +0100

----------------------------------------------------------------------
 .../org/apache/struts2/json/JSONActionRedirectResult.java    | 8 ++++----
 .../org/apache/struts2/json/JSONValidationInterceptor.java   | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b0613a60/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
index 40aa092..4b8b948 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONActionRedirectResult.java
@@ -44,12 +44,12 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult
{
      * @return true if a JSON response shall be generated, false if a redirect
      *         shall be sent.
      */
-    private boolean sendJsonInsteadOfRedirect() {
+    protected boolean sendJsonInsteadOfRedirect() {
         HttpServletRequest request = ServletActionContext.getRequest();
         return isJsonEnabled(request) && !isValidateOnly(request);
     }
 
-    private void printJson(HttpServletResponse response, String finalLocation) throws IOException
{
+    protected void printJson(HttpServletResponse response, String finalLocation) throws IOException
{
         response.setStatus(HttpServletResponse.SC_OK);
         response.setContentType("application/json");
         response.setHeader("Location", finalLocation);
@@ -60,11 +60,11 @@ public class JSONActionRedirectResult extends ServletActionRedirectResult
{
         writer.close();
     }
 
-    private boolean isJsonEnabled(HttpServletRequest request) {
+    protected boolean isJsonEnabled(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_JSON_PARAM));
     }
 
-    private boolean isValidateOnly(HttpServletRequest request) {
+    protected boolean isValidateOnly(HttpServletRequest request) {
         return "true".equals(request.getParameter(JSONValidationInterceptor.VALIDATE_ONLY_PARAM));
     }
 }

http://git-wip-us.apache.org/repos/asf/struts/blob/b0613a60/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
index 0fc7902..20ffb50 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONValidationInterceptor.java
@@ -74,11 +74,11 @@ public class JSONValidationInterceptor extends MethodFilterInterceptor
{
 
     private static final Logger LOG = LogManager.getLogger(JSONValidationInterceptor.class);
 
-    static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
-    static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
-    private static final String NO_ENCODING_SET_PARAM = "struts.JSONValidation.no.encoding";
+    public static final String VALIDATE_ONLY_PARAM = "struts.validateOnly";
+    public static final String VALIDATE_JSON_PARAM = "struts.enableJSONValidation";
+    public static final String NO_ENCODING_SET_PARAM = "struts.JSONValidation.no.encoding";
 
-    private static final String DEFAULT_ENCODING = "UTF-8";
+    public static final String DEFAULT_ENCODING = "UTF-8";
 
     private int validationFailedStatus = -1;
 


Mime
View raw message