Return-Path:
X-Original-To: apmail-struts-commits-archive@minotaur.apache.org
Delivered-To: apmail-struts-commits-archive@minotaur.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id 2D76D18117
for ;
Fri, 24 Jul 2015 18:27:53 +0000 (UTC)
Received: (qmail 58316 invoked by uid 500); 24 Jul 2015 18:27:46 -0000
Delivered-To: apmail-struts-commits-archive@struts.apache.org
Received: (qmail 58269 invoked by uid 500); 24 Jul 2015 18:27:46 -0000
Mailing-List: contact commits-help@struts.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: dev@struts.apache.org
Delivered-To: mailing list commits@struts.apache.org
Received: (qmail 58260 invoked by uid 99); 24 Jul 2015 18:27:46 -0000
Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org)
(140.211.11.23)
by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2015 18:27:46 +0000
Received: by git1-us-west.apache.org (ASF Mail Server at
git1-us-west.apache.org, from userid 33)
id 8A9BBE056D; Fri, 24 Jul 2015 18:27:46 +0000 (UTC)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: jogep@apache.org
To: commits@struts.apache.org
Date: Fri, 24 Jul 2015 18:27:46 -0000
Message-Id:
X-Mailer: ASF-Git Admin Mailer
Subject: [01/15] struts git commit: WW-4531- Improve javadoc to be compatible
with more strict JDK8 javadoc standard
Repository: struts
Updated Branches:
refs/heads/master 98d7756cb -> 775c82a74
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxp.java
----------------------------------------------------------------------
diff --git a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxp.java b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxp.java
index 6bd0028..a1a3cff 100644
--- a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxp.java
+++ b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxp.java
@@ -69,6 +69,9 @@ public abstract class AbstractGxp {
/**
* Writes GXP. Pulls GXP parameters from Struts2's value stack.
+ *
+ * @param out Appendable
+ * @param gxpContext GXP content
*/
public void write(Appendable out, GxpContext gxpContext) {
write(out, gxpContext, null);
@@ -77,6 +80,8 @@ public abstract class AbstractGxp {
/**
* Writes GXP. Pulls GXP parameters from Struts2's value stack.
*
+ * @param out Appendable
+ * @param gxpContext GXP content
* @param overrides parameter map pushed onto the value stack
*/
protected void write(Appendable out, GxpContext gxpContext, Map overrides) {
@@ -110,14 +115,14 @@ public abstract class AbstractGxp {
}
/**
- * Creates GXP closure. Pulls GXP parameters from Struts 2 value stack.
+ * @return Creates GXP closure. Pulls GXP parameters from Struts 2 value stack.
*/
public T getGxpClosure() {
return getGxpClosure(null, null);
}
/**
- * Creates GXP closure. Pulls GXP parameters from Struts 2 value stack.
+ * @return Creates GXP closure. Pulls GXP parameters from Struts 2 value stack.
*
* @param body is pushed onto the stack if this GXP has a
* {@link MarkupClosure} (or subclass) parameter named "body".
@@ -157,6 +162,8 @@ public abstract class AbstractGxp {
* be passed to a method on a GXP.
*
* @param overrides parameter map pushed onto the value stack
+ *
+ * @return list of arguments
*/
List getArgListFromValueStack(Map overrides) {
@@ -185,6 +192,8 @@ public abstract class AbstractGxp {
/**
* Combines parameter names and types into Param
objects.
+ *
+ * @return parameter list
*/
List lookupParams() {
List params = new ArrayList();
@@ -220,7 +229,7 @@ public abstract class AbstractGxp {
}
/**
- * Gets list of parameter types.
+ * @return list of parameter types.
*/
List> lookupParameterTypes() {
List> parameterTypes = Arrays.asList(writeMethod.getParameterTypes());
@@ -229,7 +238,7 @@ public abstract class AbstractGxp {
}
/**
- * Gets list of parameter names.
+ * @return list of parameter names.
*/
List lookupParameterNames() {
try {
@@ -240,7 +249,10 @@ public abstract class AbstractGxp {
}
/**
- * Returns first method with the given name. Should not be used if the
+ * @param clazz class
+ * @param name method name for lookup
+ *
+ * @return first method with the given name. Should not be used if the
* method is overloaded.
*/
protected static Method lookupMethodByName(Class clazz, String name) {
@@ -259,14 +271,16 @@ public abstract class AbstractGxp {
}
/**
- * Returns list of parameters requested by GXP.
+ * @return list of parameters requested by GXP.
*/
public List getParams() {
return params;
}
/**
- * Returns generated GXP class given an absolute path to a GXP file.
+ * @param gxpPath Gxp path
+ *
+ * @return generated GXP class given an absolute path to a GXP file.
* The current implementation assumes that the GXP and generated Java source
* file share the same name with different extensions.
*/
@@ -287,7 +301,10 @@ public abstract class AbstractGxp {
}
/**
- * Creates debug String which can be tacked onto an exception.
+ * @param args arguments
+ * @param exception Exception
+ *
+ * @return debug String which can be tacked onto an exception.
*/
String createDebugString(Object[] args, Exception exception) {
StringBuffer buffer = new StringBuffer();
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxpResult.java
----------------------------------------------------------------------
diff --git a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxpResult.java b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxpResult.java
index f27afc8..62ce72c 100644
--- a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxpResult.java
+++ b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/AbstractGxpResult.java
@@ -50,18 +50,18 @@ import java.util.Locale;
*
*
*
- * <result-types>
- * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult">
- * <param name="useInstances">true</param>
- * </result-type>
- * </result-types>
+ * <result-types>
+ * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult">
+ * <param name="useInstances">true</param>
+ * </result-type>
+ * </result-types>
*
*
*
* This means that Struts 2 will attempt to instantiate the {@code Interface}
* using the {@link com.opensymphony.xwork2.ObjectFactory}. If
- * {@link com.google.webwork.GuiceWebWorkIntegrationModule} is installed, or
- * {@link com.google.webwork.ContainerObjectFactory} is set as the static
+ * com.google.webwork.GuiceWebWorkIntegrationModule
is installed, or
+ * com.google.webwork.ContainerObjectFactory
is set as the static
* {@code ObjectFactory} instance, then Guice will be used to instantiate the
* GXP instance; otherwise, only GXPs with no constructor parameters will work.
*
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/Gxp.java
----------------------------------------------------------------------
diff --git a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/Gxp.java b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/Gxp.java
index 62d3ce0..705d1e1 100644
--- a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/Gxp.java
+++ b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/Gxp.java
@@ -57,6 +57,10 @@ public class Gxp extends AbstractGxp {
/**
* Looks up Gxp instance for GXP with given path.
+ *
+ * @param gxpPath Gxp path
+ *
+ * @return Gxp instance
*/
public static Gxp getInstance(String gxpPath) {
try {
@@ -74,6 +78,10 @@ public class Gxp extends AbstractGxp {
/**
* Looks up Gxp instance for the given GXP class.
+ *
+ * @param gxpClass Gxp class
+ *
+ * @return Gxp instance
*/
public static Gxp getInstance(Class gxpClass) {
return classToGxp.get(gxpClass);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpInstance.java
----------------------------------------------------------------------
diff --git a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpInstance.java b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpInstance.java
index d8c1a03..fef51bc 100644
--- a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpInstance.java
+++ b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpInstance.java
@@ -67,7 +67,9 @@ public class GxpInstance extends Gxp {
* instance of the {@code Interface} class that is nested within the GXP
* class. If that doesn't work, it falls back to trying to use the
* {@code ObjectFactory} to create an instance of the nested {@code Instance}
- * class, in case there is no binding for the {@code Interface}.
+ * class, in case there is no binding for the {@code Interface}.
+ *
+ * @return Gxp instance
*/
@Override
protected Object getGxpInstance() {
@@ -108,6 +110,10 @@ public class GxpInstance extends Gxp {
/**
* Looks up Gxp instance for GXP with given path.
+ *
+ * @param gxpPath Gxp path
+ *
+ * @return Gxp instance
*/
public static GxpInstance getInstance(String gxpPath) {
try {
@@ -125,6 +131,10 @@ public class GxpInstance extends Gxp {
/**
* Looks up {@code GxpInstance} instance for the given GXP class.
+ *
+ * @param gxpClass Gxp class
+ *
+ * @return Gxp instance
*/
public static GxpInstance getInstance(Class gxpClass) {
return classToGxpInstance.get(gxpClass);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpResult.java
----------------------------------------------------------------------
diff --git a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpResult.java b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpResult.java
index b854ef1..7019956 100644
--- a/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpResult.java
+++ b/plugins/gxp/src/main/java/org/apache/struts2/views/gxp/GxpResult.java
@@ -37,19 +37,19 @@ import java.io.IOException;
* Declare the GXP result type for your package in the xwork.xml file:
*
*
- * <result-types>
- * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult"/>
- * </result-types>
+ * <result-types>
+ * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult"/>
+ * </result-types>
*
*
* Or if you want to output XML instead of HTML:
*
*
- * <result-types>
- * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult">
- * <param name="outputXml">true</param>
- * </result-type>
- * </result-types>
+ * <result-types>
+ * <result-type name="gxp" class="org.apache.struts2.views.gxp.GxpResult">
+ * <param name="outputXml">true</param>
+ * </result-type>
+ * </result-types>
*
*
* Outputting XML changes the content type from text/html to application/xml
@@ -59,7 +59,7 @@ import java.io.IOException;
*
Use the GXP result type for the result of an action. For example:
*
*
- * <result name="success" type="gxp">/myPackage/MyGxp.gxp</result>
+ * <result name="success" type="gxp">/myPackage/MyGxp.gxp</result>
*
*
* @author Bob Lee
@@ -77,6 +77,8 @@ public class GxpResult extends AbstractGxpResult {
/**
* Whether or not this GXP should output XML.
+ *
+ * @param outputXml set the output XML
*/
public void setOutputXml(boolean outputXml) {
this.outputXml = outputXml;
@@ -103,6 +105,8 @@ public class GxpResult extends AbstractGxpResult {
/**
* Tells the GXP to write itself to the output stream.
+ *
+ * @param actionInvocation the action invocation
*/
public void execute(ActionInvocation actionInvocation) {
GxpResourceProvider provider = getProvider();
@@ -118,7 +122,7 @@ public class GxpResult extends AbstractGxpResult {
}
/**
- * Gets appropriate provider.
+ * @return appropriate provider.
*/
GxpResourceProvider getProvider() {
return new HtmlOrXmlProvider(outputXml);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
----------------------------------------------------------------------
diff --git a/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java b/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
index 63f965b..c3bba6e 100644
--- a/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
+++ b/plugins/jfreechart/src/main/java/org/apache/struts2/dispatcher/ChartResult.java
@@ -70,7 +70,7 @@ import javax.servlet.http.HttpServletResponse;
* public String execute() throws Exception {
* // chart creation logic...
* XYSeries dataSeries = new XYSeries(new Integer(1)); // pass a key for this serie
- * for (int i = 0; i <= 100; i++) {
+ * for (int i = 0; i <= 100; i++) {
* dataSeries.add(i, RandomUtils.nextInt());
* }
* XYSeriesCollection xyDataset = new XYSeriesCollection(dataSeries);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
index 553f08c..6731871 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java
@@ -320,6 +320,8 @@ public class JSONInterceptor extends AbstractInterceptor {
/**
* Ignore annotations on methods in interfaces You may need to set to this
* true if your action is a proxy/enhanced as annotations are not inherited
+ *
+ * @param ignoreSMDMethodInterfaces set the flag for ignore SMD method interfaces
*/
public void setIgnoreSMDMethodInterfaces(boolean ignoreSMDMethodInterfaces) {
this.ignoreSMDMethodInterfaces = ignoreSMDMethodInterfaces;
@@ -328,7 +330,7 @@ public class JSONInterceptor extends AbstractInterceptor {
/**
* Wrap generated JSON with comments. Only used if SMD is enabled.
*
- * @param wrapWithComments
+ * @param wrapWithComments Wrap generated JSON with comments.
*/
public void setWrapWithComments(boolean wrapWithComments) {
this.wrapWithComments = wrapWithComments;
@@ -340,9 +342,7 @@ public class JSONInterceptor extends AbstractInterceptor {
}
/**
- * Ignore properties defined on base classes of the root object.
- *
- * @param ignoreHierarchy
+ * @param ignoreHierarchy Ignore properties defined on base classes of the root object.
*/
public void setIgnoreHierarchy(boolean ignoreHierarchy) {
this.ignoreHierarchy = ignoreHierarchy;
@@ -467,13 +467,13 @@ public class JSONInterceptor extends AbstractInterceptor {
}
/**
- * Returns the appropriate set of includes, based on debug setting.
+ * @return the appropriate set of includes, based on debug setting.
* Derived classes can override if there are additional, custom
* debug-only parameters.
*/
protected List getIncludeProperties() {
if (includeProperties != null && getDebug()) {
- List list = new ArrayList(includeProperties);
+ List list = new ArrayList<>(includeProperties);
list.add(Pattern.compile("debug"));
list.add(WildcardUtil.compileWildcardPattern("error.*"));
return list;
@@ -503,7 +503,7 @@ public class JSONInterceptor extends AbstractInterceptor {
/**
* Add headers to response to prevent the browser from caching the response
*
- * @param noCache
+ * @param noCache no cache
*/
public void setNoCache(boolean noCache) {
this.noCache = noCache;
@@ -514,9 +514,7 @@ public class JSONInterceptor extends AbstractInterceptor {
}
/**
- * Do not serialize properties with a null value
- *
- * @param excludeNullProperties
+ * @param excludeNullProperties Do not serialize properties with a null value
*/
public void setExcludeNullProperties(boolean excludeNullProperties) {
this.excludeNullProperties = excludeNullProperties;
@@ -531,9 +529,7 @@ public class JSONInterceptor extends AbstractInterceptor {
}
/**
- * Add "{} && " to generated JSON
- *
- * @param prefix
+ * @param prefix Add "{} && " to generated JSON
*/
public void setPrefix(boolean prefix) {
this.prefix = prefix;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
index d03be45..3475be0 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java
@@ -298,9 +298,7 @@ public class JSONResult implements Result {
}
/**
- * Wrap generated JSON with comments
- *
- * @param wrapWithComments
+ * @param wrapWithComments Wrap generated JSON with comments
*/
public void setWrapWithComments(boolean wrapWithComments) {
this.wrapWithComments = wrapWithComments;
@@ -314,9 +312,7 @@ public class JSONResult implements Result {
}
/**
- * Enable SMD generation for action, which can be used for JSON-RPC
- *
- * @param enableSMD
+ * @param enableSMD Enable SMD generation for action, which can be used for JSON-RPC
*/
public void setEnableSMD(boolean enableSMD) {
this.enableSMD = enableSMD;
@@ -327,7 +323,7 @@ public class JSONResult implements Result {
}
/**
- * Controls whether interfaces should be inspected for method annotations
+ * @param ignoreInterfaces Controls whether interfaces should be inspected for method annotations
* You may need to set to this true if your action is a proxy as annotations
* on methods are not inherited
*/
@@ -336,11 +332,9 @@ public class JSONResult implements Result {
}
/**
- * Controls how Enum's are serialized : If true, an Enum is serialized as a
+ * @param enumAsBean Controls how Enum's are serialized : If true, an Enum is serialized as a
* name=value pair (name=name()) (default) If false, an Enum is serialized
* as a bean with a special property _name=name()
- *
- * @param enumAsBean
*/
public void setEnumAsBean(boolean enumAsBean) {
this.enumAsBean = enumAsBean;
@@ -363,9 +357,7 @@ public class JSONResult implements Result {
}
/**
- * Add headers to response to prevent the browser from caching the response
- *
- * @param noCache
+ * @param noCache Add headers to response to prevent the browser from caching the response
*/
public void setNoCache(boolean noCache) {
this.noCache = noCache;
@@ -380,27 +372,21 @@ public class JSONResult implements Result {
}
/**
- * Do not serialize properties with a null value
- *
- * @param excludeNullProperties
+ * @param excludeNullProperties Do not serialize properties with a null value
*/
public void setExcludeNullProperties(boolean excludeNullProperties) {
this.excludeNullProperties = excludeNullProperties;
}
/**
- * Status code to be set in the response
- *
- * @param statusCode
+ * @param statusCode Status code to be set in the response
*/
public void setStatusCode(int statusCode) {
this.statusCode = statusCode;
}
/**
- * Error code to be set in the response
- *
- * @param errorCode
+ * @param errorCode Error code to be set in the response
*/
public void setErrorCode(int errorCode) {
this.errorCode = errorCode;
@@ -415,18 +401,14 @@ public class JSONResult implements Result {
}
/**
- * Prefix JSON with "{} &&"
- *
- * @param prefix
+ * @param prefix Prefix JSON with "{} &&"
*/
public void setPrefix(boolean prefix) {
this.prefix = prefix;
}
/**
- * Content type to be set in the response
- *
- * @param contentType
+ * @param contentType Content type to be set in the response
*/
public void setContentType(String contentType) {
this.contentType = contentType;
@@ -437,7 +419,7 @@ public class JSONResult implements Result {
}
/**
- * Text to be inserted at the begining of the response
+ * @param wrapPrefix Text to be inserted at the begining of the response
*/
public void setWrapPrefix(String wrapPrefix) {
this.wrapPrefix = wrapPrefix;
@@ -448,7 +430,7 @@ public class JSONResult implements Result {
}
/**
- * Text to be inserted at the end of the response
+ * @param wrapSuffix Text to be inserted at the end of the response
*/
public void setWrapSuffix(String wrapSuffix) {
this.wrapSuffix = wrapSuffix;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
index fc2b25b..f44719f 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java
@@ -67,7 +67,7 @@ public class JSONUtil {
* @param cacheBeanInfo
* Specifies whether to cache bean info in the JSONWriter
* @return JSON string
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static String serialize(Object object, boolean cacheBeanInfo) throws JSONException {
JSONWriter writer = new JSONWriter();
@@ -83,11 +83,15 @@ public class JSONUtil {
* to be serialized
* @param excludeProperties
* Patterns matching properties to exclude
+ * @param includeProperties
+ * Patterns matching properties to include
* @param ignoreHierarchy
* whether to ignore properties defined on base classes of the
* root object
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @return JSON string
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static String serialize(Object object, Collection excludeProperties,
Collection includeProperties, boolean ignoreHierarchy, boolean excludeNullProperties)
@@ -104,13 +108,17 @@ public class JSONUtil {
* to be serialized
* @param excludeProperties
* Patterns matching properties to exclude
+ * @param includeProperties
+ * Patterns matching properties to include
* @param ignoreHierarchy
* whether to ignore properties defined on base classes of the
* root object
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @param cacheBeanInfo
* Specifies whether to cache bean info in the JSONWriter
* @return JSON string
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static String serialize(Object object, Collection excludeProperties,
Collection includeProperties, boolean ignoreHierarchy, boolean excludeNullProperties,
@@ -130,15 +138,19 @@ public class JSONUtil {
* to be serialized
* @param excludeProperties
* Patterns matching properties to exclude
+ * @param includeProperties
+ * Patterns matching properties to include
* @param ignoreHierarchy
* whether to ignore properties defined on base classes of the
* root object
* @param enumAsBean
* whether to serialized enums a Bean or name=value pair
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @param defaultDateFormat
* date format used to serialize dates
* @return JSON string
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static String serialize(Object object, Collection excludeProperties,
Collection includeProperties, boolean ignoreHierarchy, boolean enumAsBean,
@@ -155,17 +167,21 @@ public class JSONUtil {
* to be serialized
* @param excludeProperties
* Patterns matching properties to exclude
+ * @param includeProperties
+ * Patterns matching properties to include
* @param ignoreHierarchy
* whether to ignore properties defined on base classes of the
* root object
* @param enumAsBean
* whether to serialized enums a Bean or name=value pair
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @param defaultDateFormat
* date format used to serialize dates
* @param cacheBeanInfo
* Specifies whether to cache bean info in the JSONWriter
* @return JSON string
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static String serialize(Object object, Collection excludeProperties,
Collection includeProperties, boolean ignoreHierarchy, boolean enumAsBean,
@@ -185,8 +201,8 @@ public class JSONUtil {
* Writer to serialize the object to
* @param object
* object to be serialized
- * @throws IOException
- * @throws JSONException
+ * @throws IOException in case of IO errors
+ * @throws JSONException in case of error during serialize
*/
public static void serialize(Writer writer, Object object) throws IOException, JSONException {
serialize(writer, object, CACHE_BEAN_INFO_DEFAULT);
@@ -201,8 +217,8 @@ public class JSONUtil {
* object to be serialized
* @param cacheBeanInfo
* Specifies whether to cache bean info in the JSONWriter
- * @throws IOException
- * @throws JSONException
+ * @throws IOException in case of IO errors
+ * @throws JSONException in case of error during serialize
*/
public static void serialize(Writer writer, Object object, boolean cacheBeanInfo) throws IOException, JSONException {
writer.write(serialize(object, cacheBeanInfo));
@@ -219,8 +235,12 @@ public class JSONUtil {
* object to be serialized
* @param excludeProperties
* Patterns matching properties to ignore
- * @throws IOException
- * @throws JSONException
+ * @param includeProperties
+ * Patterns matching properties to include
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
+ * @throws IOException in case of IO errors
+ * @throws JSONException in case of error during serialize
*/
public static void serialize(Writer writer, Object object, Collection excludeProperties,
Collection includeProperties, boolean excludeNullProperties) throws IOException,
@@ -239,10 +259,14 @@ public class JSONUtil {
* object to be serialized
* @param excludeProperties
* Patterns matching properties to ignore
+ * @param includeProperties
+ * Patterns matching properties to include
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @param cacheBeanInfo
* Specifies whether to cache bean info in the JSONWriter
- * @throws IOException
- * @throws JSONException
+ * @throws IOException in case of IO errors
+ * @throws JSONException in case of error during serialize
*/
public static void serialize(Writer writer, Object object, Collection excludeProperties,
Collection includeProperties, boolean excludeNullProperties, boolean cacheBeanInfo)
@@ -256,7 +280,7 @@ public class JSONUtil {
* @param json
* string in JSON
* @return desrialized object
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public static Object deserialize(String json) throws JSONException {
JSONReader reader = new JSONReader();
@@ -364,11 +388,14 @@ public class JSONUtil {
/**
* List visible methods carrying the
*
- * @SMDMethod annotation
+ * {@literal @}SMDMethod annotation
*
+ * @param clazz
+ * class
* @param ignoreInterfaces
* if true, only the methods of the class are examined. If false,
* annotations on every interfaces' methods are examined.
+ * @return array of SMD methods
*/
@SuppressWarnings("unchecked")
public static Method[] listSMDMethods(Class clazz, boolean ignoreInterfaces) {
@@ -440,7 +467,7 @@ public class JSONUtil {
return visitUniqueInterfaces(aClass, visitor, classesVisited);
}
- /**
+ /*
* Recursive method to visit all the interfaces of a class (and its
* superclasses and super-interfaces) if they haven't already been visited.
*
Always visits itself if it hasn't already been visited
@@ -564,7 +591,7 @@ public class JSONUtil {
return patternExpr;
}
- /**
+ /*
* Add a pattern that does not have the indexed property matching (ie. list\[\d+\] becomes list).
*/
private static boolean isIndexedProperty(String patternPiece, String type, Map> includePatternData) {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/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 7dd169d..f895053 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
@@ -82,7 +82,8 @@ public class JSONValidationInterceptor extends MethodFilterInterceptor {
/**
* HTTP status that will be set in the response if validation fails
- * @param validationFailedStatus
+ *
+ * @param validationFailedStatus validation failed status
*/
public void setValidationFailedStatus(int validationFailedStatus) {
this.validationFailedStatus = validationFailedStatus;
@@ -153,6 +154,7 @@ public class JSONValidationInterceptor extends MethodFilterInterceptor {
}
/**
+ * @param validationAware the validation aware object
* @return JSON string that contains the errors and field errors
*/
@SuppressWarnings("unchecked")
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
----------------------------------------------------------------------
diff --git a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
index c3b8889..20f815c 100644
--- a/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
+++ b/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
@@ -79,16 +79,23 @@ public class JSONWriter {
/**
* @param object Object to be serialized into JSON
* @return JSON string for object
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public String write(Object object) throws JSONException {
return this.write(object, null, null, false);
}
/**
- * @param object Object to be serialized into JSON
+ * @param object
+ * Object to be serialized into JSON
+ * @param excludeProperties
+ * Patterns matching properties to ignore
+ * @param includeProperties
+ * Patterns matching properties to include
+ * @param excludeNullProperties
+ * enable/disable excluding of null properties
* @return JSON string for object
- * @throws JSONException
+ * @throws JSONException in case of error during serialize
*/
public String write(Object object, Collection excludeProperties,
Collection includeProperties, boolean excludeNullProperties) throws JSONException {
@@ -107,6 +114,11 @@ public class JSONWriter {
/**
* Detect cyclic references
+ *
+ * @param object Object to be serialized into JSON
+ * @param method method
+ *
+ * @throws JSONException in case of error during serialize
*/
protected void value(Object object, Method method) throws JSONException {
if (object == null) {
@@ -133,6 +145,11 @@ public class JSONWriter {
/**
* Serialize object into json
+ *
+ * @param object Object to be serialized into JSON
+ * @param method method
+ *
+ * @throws JSONException in case of error during serialize
*/
protected void process(Object object, Method method) throws JSONException {
this.stack.push(object);
@@ -170,6 +187,11 @@ public class JSONWriter {
/**
* Serialize custom object into json
+ *
+ * @param object object
+ * @param method method
+ *
+ * @throws JSONException in case of error during serialize
*/
protected void processCustom(Object object, Method method) throws JSONException {
this.bean(object);
@@ -177,6 +199,10 @@ public class JSONWriter {
/**
* Instrospect bean and serialize its properties
+ *
+ * @param object object
+ *
+ * @throws JSONException in case of error during serialize
*/
protected void bean(Object object) throws JSONException {
this.add("{");
@@ -322,6 +348,10 @@ public class JSONWriter {
/**
* Instrospect an Enum and serialize it as a name/value pair or as a bean
* including all its own properties
+ *
+ * @param enumeration the enum
+ *
+ * @throws JSONException in case of error during serialize
*/
protected void enumeration(Enum enumeration) throws JSONException {
if (enumAsBean) {
@@ -382,7 +412,7 @@ public class JSONWriter {
return false;
}
- /**
+ /*
* Add name/value pair to buffer
*/
protected boolean add(String name, Object value, Method method, boolean hasData) throws JSONException {
@@ -399,7 +429,7 @@ public class JSONWriter {
return true;
}
- /**
+ /*
* Add map to buffer
*/
protected void map(Map map, Method method) throws JSONException {
@@ -450,7 +480,7 @@ public class JSONWriter {
this.add("}");
}
- /**
+ /*
* Add date to buffer
*/
protected void date(Date date, Method method) {
@@ -465,7 +495,7 @@ public class JSONWriter {
this.string(formatter.format(date));
}
- /**
+ /*
* Add array to buffer
*/
protected void array(Iterator it, Method method) throws JSONException {
@@ -495,7 +525,7 @@ public class JSONWriter {
this.add("]");
}
- /**
+ /*
* Add array to buffer
*/
protected void array(Object object, Method method) throws JSONException {
@@ -526,7 +556,7 @@ public class JSONWriter {
this.add("]");
}
- /**
+ /*
* Add boolean to buffer
*/
protected void bool(boolean b) {
@@ -535,6 +565,8 @@ public class JSONWriter {
/**
* escape characters
+ *
+ * @param obj the object to escape
*/
protected void string(Object obj) {
this.add('"');
@@ -568,14 +600,14 @@ public class JSONWriter {
this.add('"');
}
- /**
+ /*
* Add object to buffer
*/
protected void add(Object obj) {
this.buf.append(obj);
}
- /**
+ /*
* Add char to buffer
*/
protected void add(char c) {
@@ -606,7 +638,7 @@ public class JSONWriter {
/**
* If true, an Enum is serialized as a bean with a special property
- * _name=name() as all as all other properties defined within the enum.
+ * _name=name() as all as all other properties defined within the enum.
* If false, an Enum is serialized as a name=value pair (name=name())
*
* @param enumAsBean true to serialize an enum as a bean instead of as a name=value
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
index c5103be..b3967a0 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/DefaultBundleAccessor.java
@@ -53,8 +53,8 @@ public class DefaultBundleAccessor implements BundleAccessor {
private static final Logger LOG = LogManager.getLogger(DefaultBundleAccessor.class);
private BundleContext bundleContext;
- private Map packageToBundle = new HashMap();
- private Map> packagesByBundle = new HashMap>();
+ private Map packageToBundle = new HashMap<>();
+ private Map> packagesByBundle = new HashMap<>();
private OsgiHost osgiHost;
public DefaultBundleAccessor() {
@@ -79,8 +79,9 @@ public class DefaultBundleAccessor implements BundleAccessor {
return bundleContext.getServiceReferences(className, null);
} catch (InvalidSyntaxException e) {
//cannot happen we are passing null as the param
- if (LOG.isErrorEnabled())
+ if (LOG.isErrorEnabled()) {
LOG.error("Invalid syntax for service lookup", e);
+ }
}
}
@@ -92,7 +93,7 @@ public class DefaultBundleAccessor implements BundleAccessor {
}
/**
- * Add as Bundle -> Package mapping
+ * Add as Bundle -> Package mapping
* @param bundle the bundle where the package was loaded from
* @param packageName the anme of the loaded package
*/
@@ -100,7 +101,7 @@ public class DefaultBundleAccessor implements BundleAccessor {
this.packageToBundle.put(packageName, bundle.getSymbolicName());
Set pkgs = packagesByBundle.get(bundle);
if (pkgs == null) {
- pkgs = new HashSet();
+ pkgs = new HashSet<>();
packagesByBundle.put(bundle, pkgs);
}
pkgs.add(packageName);
@@ -139,7 +140,7 @@ public class DefaultBundleAccessor implements BundleAccessor {
public List loadResources(String name, boolean translate) throws IOException {
Bundle bundle = getCurrentBundle();
if (bundle != null) {
- List resources = new ArrayList();
+ List resources = new ArrayList<>();
Enumeration e = bundle.getResources(name);
if (e != null) {
while (e.hasMoreElements()) {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
index b24eb8a..682fc53 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
@@ -89,7 +89,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
ActionContext.setContext(ctx);
}
- Set bundleNames = new HashSet();
+ Set bundleNames = new HashSet<>();
//iterate over the bundles and load packages from them
for (Bundle bundle : osgiHost.getBundles().values()) {
@@ -112,6 +112,8 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
/**
* Loads XML config as well as Convention config from a bundle
* Limitation: Constants and Beans are ignored on XML config
+ *
+ * @param bundle the bundle
*/
protected void loadConfigFromBundle(Bundle bundle) {
String bundleName = bundle.getSymbolicName();
@@ -141,7 +143,7 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
//Convention
//get the existing packages before reloading the provider (se we can figure out what are the new packages)
- Set packagesBeforeLoading = new HashSet(configuration.getPackageConfigNames());
+ Set packagesBeforeLoading = new HashSet<>(configuration.getPackageConfigNames());
PackageProvider conventionPackageProvider = configuration.getContainer().getInstance(PackageProvider.class, "convention.packageProvider");
if (conventionPackageProvider != null) {
@@ -170,6 +172,10 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
/**
* Checks for "Struts2-Enabled" header in the bundle
+ *
+ * @param bundle the bundle
+ *
+ * @return true is struts2 enabled
*/
protected boolean shouldProcessBundle(Bundle bundle) {
// Cast to String is required on JDK7
@@ -223,6 +229,8 @@ public class OsgiConfigurationProvider implements PackageProvider, BundleListene
/**
* Listens to bundle event to load/unload config
+ *
+ * @param bundleEvent the bundle event
*/
public void bundleChanged(BundleEvent bundleEvent) {
Bundle bundle = bundleEvent.getBundle();
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
index 60c478a..955d090 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiUtil.java
@@ -34,8 +34,15 @@ public class OsgiUtil {
private static final Logger LOG = LogManager.getLogger(OsgiUtil.class);
/**
- * A bundle is a jar, and a bunble URL will be useless to clients, this method translates
+ * A bundle is a jar, and a bundle URL will be useless to clients, this method translates
* a URL to a resource inside a bundle from "bundle:something/path" to "jar:file:bundlelocation!/path"
+ *
+ * @param bundleUrl URL to translate
+ * @param bundle the bundle
+ *
+ * @return translated URL
+ *
+ * @throws MalformedURLException if url is malformed
*/
public static URL translateBundleURLToJarURL(URL bundleUrl, Bundle bundle) throws MalformedURLException {
if (bundleUrl != null && "bundle".equalsIgnoreCase(bundleUrl.getProtocol())) {
@@ -52,6 +59,11 @@ public class OsgiUtil {
/**
* Calls getBean() on the passed object using refelection. Used on Spring context
* because they are loaded from bundles (in anothe class loader)
+ *
+ * @param beanFactory bean factory
+ * @param beanId id of bean
+ *
+ * @return the object found
*/
public static Object getBean(Object beanFactory, String beanId) {
try {
@@ -67,6 +79,11 @@ public class OsgiUtil {
/**
* Calls containsBean on the passed object using refelection. Used on Spring context
* because they are loaded from bundles (in anothe class loader)
+ *
+ * @param beanFactory bean factory
+ * @param beanId id of bean
+ *
+ * @return true if bean factory contains bean with bean id
*/
public static boolean containsBean(Object beanFactory, String beanId) {
try {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
index fdd5c74..4e2c57b 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
@@ -71,6 +71,8 @@ public abstract class BaseOsgiHost implements OsgiHost {
/**
* This bundle map will not change, but the status of the bundles can change over time.
* Use getActiveBundles() for active bundles
+ *
+ * @return map with bundles
*/
public abstract Map getBundles();
@@ -85,7 +87,7 @@ public abstract class BaseOsgiHost implements OsgiHost {
*
* @param paramName the name of the param to get from the ServletContext
* @param defaultValue value to return if the param is not set
- * @return
+ * @return param from the ServletContext, returning the default value if the param is not set
*/
protected String getServletContextParam(String paramName, String defaultValue) {
return StringUtils.defaultString(this.servletContext.getInitParameter(paramName), defaultValue);
@@ -119,7 +121,8 @@ public abstract class BaseOsgiHost implements OsgiHost {
}
/**
- * Return a list of directories under a directory whose name is a number
+ * @param dir directory
+ * @return a list of directories under a directory whose name is a number
*/
protected Map getRunLevelDirs(String dir) {
Map dirs = new HashMap();
@@ -261,7 +264,8 @@ public abstract class BaseOsgiHost implements OsgiHost {
}
/**
- * Gets the version used to export the packages. it tries to get it from MANIFEST.MF, or the file name
+ * @param url URL for package
+ * @return the version used to export the packages. it tries to get it from MANIFEST.MF, or the file name
*/
protected String getVersion(URL url) {
if ("jar".equals(url.getProtocol())) {
@@ -286,7 +290,8 @@ public abstract class BaseOsgiHost implements OsgiHost {
}
/**
- * Extracts numbers followed by "." or "-" from the string and joins them with "."
+ * @param str string for extract version
+ * @return Extracts numbers followed by "." or "-" from the string and joins them with "."
*/
protected String getVersionFromString(String str) {
Matcher matcher = versionPattern.matcher(str);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
index 259fe2e..a3241e7 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/FelixOsgiHost.java
@@ -43,7 +43,7 @@ import java.util.Properties;
/**
* Apache felix implementation of an OsgiHost
* See http://felix.apache.org/site/apache-felix-framework-launching-and-embedding.html
- *
+ *
* Servlet config params:
* struts.osgi.clearBundleCache: Defaults to "true" delete installed bundles when the comntainer starts
* struts.osgi.logLevel: Defaults to "1". Felix log level. 1 = error, 2 = warning, 3 = information, and 4 = debug
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
index 53a58eb..0c972dd 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/interceptor/OsgiInterceptor.java
@@ -37,7 +37,7 @@ import java.util.List;
/**
* If a class implements BundleContextAware, this interceptor will call the setBundleContext(BundleContext)
- * method on it. If a class implements ServiceAware, this interceptor will call setService(List)
+ * method on it. If a class implements ServiceAware<T>, this interceptor will call setService(List<T>)
*/
public class OsgiInterceptor extends AbstractInterceptor {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
index d3a7612..5f26f08 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
@@ -96,7 +96,7 @@ import static org.apache.struts2.portlet.PortletConstants.RESPONSE;
*
* Init parameters
*
- *
+ *
*
* Name |
* Description |
@@ -188,12 +188,13 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
/**
* Initialize the portlet with the init parameters from portlet.xml
+ *
+ * @param cfg portlet configuration
+ * @throws PortletException in case of errors
*/
public void init(PortletConfig cfg) throws PortletException {
super.init(cfg);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Initializing portlet " + getPortletName());
- }
+ LOG.debug("Initializing portlet {}", getPortletName());
Map params = new HashMap();
for (Enumeration e = cfg.getInitParameterNames(); e.hasMoreElements(); ) {
@@ -211,9 +212,8 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
factory = dispatcherUtils.getContainer().getInstance(ActionProxyFactory.class);
}
portletNamespace = cfg.getInitParameter("portletNamespace");
- if (LOG.isDebugEnabled()) {
- LOG.debug("PortletNamespace: " + portletNamespace);
- }
+ LOG.debug("PortletNamespace: {}", portletNamespace);
+
parseModeConfig(actionMap, cfg, PortletMode.VIEW, "viewNamespace",
"defaultViewAction");
parseModeConfig(actionMap, cfg, PortletMode.EDIT, "editNamespace",
@@ -288,6 +288,12 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
/**
* Service an action from the event phase.
*
+ * @param request action request
+ * @param response action response
+ *
+ * @throws PortletException in case of errors
+ * @throws IOException in case of IO errors
+ *
* @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest,
* javax.portlet.ActionResponse)
*/
@@ -310,6 +316,12 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
/**
* Service an action from the render phase.
*
+ * @param request render request
+ * @param response render response
+ *
+ * @throws PortletException in case of errors
+ * @throws IOException in case of IO errors
+ *
* @see javax.portlet.Portlet#render(javax.portlet.RenderRequest,
* javax.portlet.RenderResponse)
*/
@@ -351,10 +363,15 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
* @param applicationMap a Map of all servlet context attributes.
* @param request the PortletRequest object.
* @param response the PortletResponse object.
+ * @param servletRequest the HttpServletRequest object.
+ * @param servletResponse the HttpServletResponse object.
+ * @param servletContext the ServletContext object.
* @param portletConfig the PortletConfig object.
* @param phase The portlet phase (render or action, see
* {@link PortletConstants})
* @return a HashMap representing the Action context.
+ *
+ * @throws IOException in case of IO errors
*/
public HashMap createContextMap(Map requestMap, Map parameterMap,
Map sessionMap, Map applicationMap,
@@ -421,6 +438,8 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
* @param applicationMap a Map of all application attributes.
* @param portletNamespace the namespace or context of the action.
* @param phase The portlet phase (render or action, see {@link PortletConstants})
+ *
+ * @throws PortletException in case of errors
*/
public void serviceAction(PortletRequest request, PortletResponse response, Map requestMap, Map parameterMap,
Map sessionMap, Map applicationMap, String portletNamespace,
@@ -589,7 +608,7 @@ public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics {
/**
* Convenience method to ease testing.
- * @param factory
+ * @param factory action proxy factory
*/
protected void setActionProxyFactory(ActionProxyFactory factory) {
this.factory = factory;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
index 1461f1f..1f007a0 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletPreferencesAware.java
@@ -33,7 +33,7 @@ public interface PortletPreferencesAware {
/**
* Sets the HTTP request object in implementing classes.
*
- * @param request the HTTP request.
+ * @param prefs the portlet preferences.
*/
public void setPortletPreferences(PortletPreferences prefs);
}
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
index 5ef5a1a..0bc6938 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
@@ -42,7 +42,7 @@ import java.util.Map;
*
*
* This result uses the {@link ActionMapper} provided by the
- * {@link ActionMapperFactory} to instruct the render phase to invoke the
+ * ActionMapperFactory
to instruct the render phase to invoke the
* specified action and (optional) namespace. This is better than the
* {@link PortletResult} because it does not require you to encode the URL
* patterns processed by the {@link ActionMapper} in to your struts.xml
@@ -247,6 +247,8 @@ public class PortletActionRedirectResult extends PortletResult {
*
* @param key The parameter name
* @param value The parameter value
+ *
+ * @return the portlet action redirect result
*/
public PortletActionRedirectResult addParameter(String key, Object value) {
requestParameters.put(key, String.valueOf(value));
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
index 50fa223..0e0c881 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResult.java
@@ -54,14 +54,12 @@ public class PortletResult extends StrutsResultSupport {
private static final long serialVersionUID = 434251393926178567L;
+ private static final Logger LOG = LogManager.getLogger(PortletResult.class);
+
private boolean useDispatcherServlet;
private String dispatcherServletName = PortletConstants.DEFAULT_DISPATCHER_SERVLET_NAME;
- /**
- * Logger instance.
- */
- private static final Logger LOG = LogManager.getLogger(PortletResult.class);
private String contentType = "text/html";
@@ -93,7 +91,12 @@ public class PortletResult extends StrutsResultSupport {
* Execute the result. Obtains the
* {@link javax.portlet.PortletRequestDispatcher}from the
* {@link PortletActionContext}and includes the JSP.
+ *
+ * @param finalLocation the final location
+ * @param actionInvocation the action invocation
*
+ * @throws Exception in case of any errors
+ *
* @see com.opensymphony.xwork2.Result#execute(com.opensymphony.xwork2.ActionInvocation)
*/
public void doExecute(String finalLocation, ActionInvocation actionInvocation) throws Exception {
@@ -110,6 +113,12 @@ public class PortletResult extends StrutsResultSupport {
/**
* Executes the regular servlet result.
+ *
+ * @param finalLocation the final location
+ * @param actionInvocation the action invocation
+ *
+ * @throws ServletException in case of any Servlet errors
+ * @throws IOException in case of any IO errors
*/
private void executeRegularServletResult(String finalLocation, ActionInvocation actionInvocation)
throws ServletException, IOException {
@@ -130,17 +139,18 @@ public class PortletResult extends StrutsResultSupport {
/**
* Executes the action result.
*
- * @param finalLocation
- * @param invocation
+ * @param finalLocation the final location
+ * @param invocation the action invocation
+ *
+ * @throws Exception in case of any errors
*/
protected void executeActionResult(String finalLocation, ActionInvocation invocation) throws Exception {
String location = finalLocation;
String namespace = invocation.getProxy().getNamespace();
if (LOG.isDebugEnabled()) {
- String phase = (PortletActionContext.getPhase().isEvent()) ? "Event" : "Action";
- LOG.debug("Executing result in "+phase+" phase");
- LOG.debug("Setting event render parameter location : " + location);
- LOG.debug("Setting event render parameter namespace: " + namespace);
+ LOG.debug("Executing result in {} phase", (PortletActionContext.getPhase().isEvent()) ? "Event" : "Action");
+ LOG.debug("Setting event render parameter location : {}", location);
+ LOG.debug("Setting event render parameter namespace: {}", namespace);
}
Map sessionMap = invocation.getInvocationContext().getSession();
if (location.indexOf('?') != -1) {
@@ -171,7 +181,7 @@ public class PortletResult extends StrutsResultSupport {
/**
* Converts the query params to render params.
*
- * @param queryParams
+ * @param queryParams query parameter
*/
protected void convertQueryParamsToRenderParams(String queryParams) {
StringTokenizer tok = new StringTokenizer(queryParams, "&");
@@ -186,9 +196,10 @@ public class PortletResult extends StrutsResultSupport {
/**
* Executes the render result.
*
- * @param finalLocation
- * @throws PortletException
- * @throws IOException
+ * @param finalLocation the final location
+ *
+ * @throws PortletException in case of any Portlet errors
+ * @throws IOException in case of any IO errors
*/
protected void executeMimeResult(final String finalLocation) throws PortletException, IOException {
if (LOG.isDebugEnabled()) LOG.debug("Executing mime result");
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResultHelper.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResultHelper.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResultHelper.java
index cc6c725..26f1d52 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResultHelper.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletResultHelper.java
@@ -25,6 +25,8 @@ public interface PortletResultHelper {
*
* @param response The response to set the portlet mode on.
* @param portletMode The portlet mode to set.
+ *
+ * @throws PortletModeException in case of errors during setting of portlet mode
*/
void setPortletMode( PortletResponse response, PortletMode portletMode ) throws PortletModeException;
@@ -35,6 +37,9 @@ public interface PortletResultHelper {
* @param contentType The content type to set for the response.
* @param request The request to use for including
* @param response The response to use for including
+ *
+ * @throws IOException in case of any I/O errors
+ * @throws PortletException in case of any portlet errors
*/
void include( PortletRequestDispatcher dispatcher, String contentType, PortletRequest request,
PortletResponse response ) throws IOException, PortletException;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
index b49cfc4..d502e74 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletVelocityResult.java
@@ -204,6 +204,8 @@ public class PortletVelocityResult extends StrutsResultSupport {
* this method if they want to provide specific content types for specific
* templates (eg text/xml).
*
+ * @param templateLocation location of templates
+ *
* @return The content type associated with this template (default
* "text/html")
*/
@@ -215,6 +217,8 @@ public class PortletVelocityResult extends StrutsResultSupport {
* Retrieve the encoding for this template.
People can override this
* method if they want to provide specific encodings for specific templates.
*
+ * @param templateLocation location of templates
+ *
* @return The encoding associated with this template (defaults to the value
* of 'struts.i18n.encoding' property)
*/
@@ -256,6 +260,8 @@ public class PortletVelocityResult extends StrutsResultSupport {
* @param velocityManager a reference to the velocityManager to use
* @param stack the value stack to resolve the location against (when parse
* equals true)
+ * @param request servlet request
+ * @param response servlet response
* @param location the name of the template that is being used
* @return the a minted Velocity context.
*/
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
index 7e72287..73a3195 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
@@ -83,6 +83,19 @@ public class PortletUrlHelper {
/**
* Create a portlet URL with for the specified action and namespace.
*
+ * @param action The action the URL should invoke.
+ * @param namespace The namespace of the action to invoke.
+ * @param method The method of the action to invoke.
+ * @param params The parameters of the URL.
+ * @param type The type of the url, either action or render
+ * @param scheme The scheme of the URL.
+ * @param portletMode The Portlet Mode of the URL.
+ * @param windowState The Window State
+ * @param includeContext true for including context
+ * @param encodeResult true for encode of the result
+ *
+ * @return The URL String.
+ *
* @see #buildUrl(String, String, String, java.util.Map, String, String, String)
*/
public String buildUrl(String action, String namespace, String method, Map params,
@@ -218,7 +231,8 @@ public class PortletUrlHelper {
* Encode an url to a non Struts action resource, like stylesheet, image or
* servlet.
*
- * @param value
+ * @param value base url
+ * @param params url parameters
* @return encoded url to non Struts action resources.
*/
public String buildResourceUrl(String value, Map params) {
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/portlet/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java
----------------------------------------------------------------------
diff --git a/plugins/portlet/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java b/plugins/portlet/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java
index adda4bc..09a3d5f 100644
--- a/plugins/portlet/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java
+++ b/plugins/portlet/src/main/java/org/apache/struts2/views/freemarker/PortletFreemarkerResult.java
@@ -46,8 +46,6 @@ import java.io.IOException;
import java.io.Writer;
import java.util.Locale;
-/**
- */
public class PortletFreemarkerResult extends StrutsResultSupport {
private static final long serialVersionUID = -5570612389289887543L;
@@ -87,6 +85,8 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
/**
* allow parameterization of the contentType the default being text/html
+ *
+ * @return content type
*/
public String getContentType() {
return pContentType;
@@ -94,13 +94,20 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
/**
*
- * Execute this result, using the specified template location.
The
+ * Execute this result, using the specified template location.
The
* template location has already been interpolated for any variable
* substitutions
this method obtains the freemarker configuration and
* the object wrapper from the provided hooks. It them implements the
* template processing workflow by calling the hooks for preTemplateProcess
* and postTemplateProcess
*
+ *
+ * @param location template location
+ * @param invocation the action invocation
+ *
+ * @throws IOException in case of I/O related errors
+ * @throws TemplateException in case of freemarker templates related errors
+ * @throws PortletException in case of portlet related errors
*/
public void doExecute(String location, ActionInvocation invocation)
throws IOException, TemplateException, PortletException {
@@ -190,6 +197,10 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
* the configuration object in a subclass, or to fetch it from an IoC
* container.
The default implementation obtains the configuration
* from the ConfigurationManager instance.
+ *
+ * @return configuration
+ *
+ * @throws TemplateException in case of freemarker templates related errors
*/
protected Configuration getConfiguration() throws TemplateException {
return freemarkerManager.getConfiguration(ServletActionContext.getServletContext());
@@ -201,6 +212,8 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
* for adapting objects into template models. This is a hook that allows you
* to custom-configure the wrapper object in a subclass.
The default
* implementation returns {@link Configuration#getObjectWrapper()}
+ *
+ * @return object wrapper
*/
protected ObjectWrapper getObjectWrapper() {
return configuration.getObjectWrapper();
@@ -208,6 +221,10 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
/**
* The default writer writes directly to the response writer.
+ *
+ * @return response writer
+ *
+ * @throws IOException in case of I/O related errors
*/
protected Writer getWriter() throws IOException {
return PortletActionContext.getRenderResponse().getWriter();
@@ -234,6 +251,10 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
* servlet spec (for JSP Exception pages)
* struts - instance of the StrutsUtil class
*
+ *
+ * @return freemarker template model
+ *
+ * @throws TemplateModelException in case of template model errors
*/
protected TemplateModel createModel() throws TemplateModelException {
ServletContext servletContext = ServletActionContext
@@ -245,7 +266,7 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
}
/**
- * Returns the locale used for the
+ * @return the locale used for the
* {@link Configuration#getTemplate(String, Locale)}call. The base
* implementation simply returns the locale setting of the configuration.
* Override this method to provide different behaviour,
@@ -257,6 +278,11 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
/**
* the default implementation of postTemplateProcess applies the contentType
* parameter
+ *
+ * @param template freemarker template
+ * @param data model data
+ *
+ * @throws IOException in case of I/O related errors
*/
protected void postTemplateProcess(Template template, TemplateModel data) throws IOException {
}
@@ -268,8 +294,13 @@ public class PortletFreemarkerResult extends StrutsResultSupport {
* action to perform here is to inject application-specific objects into the
* model root
*
+ * @param template freemarker template
+ * @param model model data
+ *
* @return true to process the template, false to suppress template
* processing.
+ *
+ * @throws IOException in case of I/O related errors
*/
protected boolean preTemplateProcess(Template template, TemplateModel model) throws IOException {
Object attrContentType = template.getCustomAttribute("content_type");
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java b/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
index 38ca89c..5b81a97 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
@@ -46,6 +46,7 @@ public interface ContentTypeHandlerManager {
/**
* Gets the handler for the response by looking at the extension of the request
* @param req The request
+ * @param res The servlet response
* @return The appropriate handler
*/
ContentTypeHandler getHandlerForResponse(HttpServletRequest req, HttpServletResponse res);
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/HttpHeaders.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/HttpHeaders.java b/plugins/rest/src/main/java/org/apache/struts2/rest/HttpHeaders.java
index 4541676..b943a3b 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/HttpHeaders.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/HttpHeaders.java
@@ -40,17 +40,17 @@ public interface HttpHeaders {
HttpServletResponse response, Object target);
/**
- * The HTTP status code
+ * @return The HTTP status code
*/
int getStatus();
/**
- * The HTTP status code
+ * @param status set the HTTP status code
*/
void setStatus(int status);
/**
- * The result code to process
+ * @return The result code to process
*/
String getResultCode();
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
index 1a2cac2..816843a 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java
@@ -80,14 +80,14 @@ import java.util.HashMap;
* The following URL's will invoke its methods:
*
*
- * GET: /movies => method="index"
- * GET: /movies/Thrillers => method="show", id="Thrillers"
- * GET: /movies/Thrillers;edit => method="edit", id="Thrillers"
- * GET: /movies/Thrillers/edit => method="edit", id="Thrillers"
- * GET: /movies/new => method="editNew"
- * POST: /movies => method="create"
- * PUT: /movies/Thrillers => method="update", id="Thrillers"
- * DELETE: /movies/Thrillers => method="destroy", id="Thrillers"
+ * GET: /movies => method="index"
+ * GET: /movies/Thrillers => method="show", id="Thrillers"
+ * GET: /movies/Thrillers;edit => method="edit", id="Thrillers"
+ * GET: /movies/Thrillers/edit => method="edit", id="Thrillers"
+ * GET: /movies/new => method="editNew"
+ * POST: /movies => method="create"
+ * PUT: /movies/Thrillers => method="update", id="Thrillers"
+ * DELETE: /movies/Thrillers => method="destroy", id="Thrillers"
*
*
* To simulate the HTTP methods PUT and DELETE, since they aren't supported by HTML,
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionSupport.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionSupport.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionSupport.java
index 63230c2..812a00a 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionSupport.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionSupport.java
@@ -48,7 +48,7 @@ public class RestActionSupport extends ActionSupport {
/**
* Default execution.
* @return object because it can return string, result or httpHeader.
- * @throws Exception
+ * @throws Exception in case of any error
*/
public Object index() throws Exception {
return execute();
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/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 9ea78e8..7dca16a 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
@@ -34,6 +34,7 @@ public interface ContentTypeHandler {
* Populates an object using data from the input stream
* @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
*/
void toObject(Reader in, Object target) throws IOException;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/handler/FormUrlEncodedHandler.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/FormUrlEncodedHandler.java b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/FormUrlEncodedHandler.java
index 17ea005..90a08b8 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/FormUrlEncodedHandler.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/FormUrlEncodedHandler.java
@@ -31,7 +31,7 @@ import java.io.Reader;
*
* This handler is intended for requests only, not for responses
*
- * {@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4}
+ * @see http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
*
*/
public class FormUrlEncodedHandler implements ContentTypeHandler {
@@ -42,13 +42,17 @@ public class FormUrlEncodedHandler implements ContentTypeHandler {
throw new IOException("Conversion from Object to '"+getContentType()+"' is not supported");
}
- /** No transformation is required as the framework handles this data */
+ /**
+ * No transformation is required as the framework handles this data
+ *
+ * @param in The input stream, usually the body of the request
+ * @param target The target, usually the action class
+ */
public void toObject(Reader in, Object target) {
}
/**
- * The extension is not used by this handler
- * @return
+ * @return The extension is not used by this handler
*/
public String getExtension() {
return null;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/rest/src/main/java/org/apache/struts2/rest/handler/MultipartFormDataHandler.java
----------------------------------------------------------------------
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/MultipartFormDataHandler.java b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/MultipartFormDataHandler.java
index a49cc2b..affef17 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/handler/MultipartFormDataHandler.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/handler/MultipartFormDataHandler.java
@@ -32,8 +32,7 @@ import java.io.Reader;
*
* This handler is intended for requests only, not for responses
*
- * {@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4}
- *
+ * @see http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
*/
public class MultipartFormDataHandler implements ContentTypeHandler {
@@ -43,13 +42,17 @@ public class MultipartFormDataHandler implements ContentTypeHandler {
throw new IOException("Conversion from Object to '"+getContentType()+"' is not supported");
}
- /** No transformation is required as the framework handles this data */
+ /**
+ * No transformation is required as the framework handles this data
+ *
+ * @param in The input stream, usually the body of the request
+ * @param target The target, usually the action class
+ */
public void toObject(Reader in, Object target) {
}
/**
- * The extension is not used by this handler
- * @return
+ * @return The extension is not used by this handler
*/
public String getExtension() {
return null;
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
index 87c39b8..847bbd2 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
@@ -44,19 +44,24 @@ import java.util.HashSet;
import java.util.regex.Pattern;
/**
+ *
* This class can be used instead of XmlWebApplicationContext, and it will watch jar files and directories for changes
* and reload then changed classes.
- *
+ *
+ *
+ *
* To use this class:
+ *
*
* - Set "struts.devMode" to "true"
- * - Set "struts.class.reloading.watchList" to a comma separated list of directories, or jar files (absolute paths)
+ *
- Set "struts.class.reloading.watchList" to a comma separated list of directories, or jar files (absolute paths)
* - Add this to web.xml:
- *
+ *
* <context-param>
* <param-name>contextClass</param-name>
* <param-value>org.apache.struts2.spring.ClassReloadingXMLWebApplicationContext</param-value>
* </context-param>
+ *
*
* - Add Apache Commons JCI FAM to the classpath. If you are using maven, add this to pom.xml:
*
@@ -65,7 +70,7 @@ import java.util.regex.Pattern;
* <artifactId>commons-jci-fam</artifactId>
* <version>1.0</version>
* <optional>true</optional>
- * </dependency>
+ * </dependency>
*
*
*
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
index 251548d..83b2853 100644
--- a/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
+++ b/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
@@ -55,7 +55,10 @@ public class StrutsSpringObjectFactory extends SpringObjectFactory {
* @param autoWire The type of autowiring to use
* @param alwaysAutoWire Whether to always respect the autowiring or not
* @param useClassCacheStr Whether to use the class cache or not
+ * @param enableAopSupport enable AOP support
* @param servletContext The servlet context
+ * @param devMode development mode
+ * @param container container
* @since 2.1.3
*/
@Inject