[07/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java index fe8b532..24b1711 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/Node.java @@ -19,11 +19,11 @@ package org.apache.struts2.el.parser; +import org.apache.struts2.el.lang.EvaluationContext; + import javax.el.ELException; import javax.el.MethodInfo; -import org.apache.struts2.el.lang.EvaluationContext; - /* All AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships @@ -35,37 +35,65 @@ import org.apache.struts2.el.lang.EvaluationContext; */ public interface Node { - /** This method is called after the node has been made the current -node. It indicates that child nodes can now be added to it. */ - public void jjtOpen(); - - /** This method is called after all the child nodes have been -added. */ - public void jjtClose(); - - /** This pair of methods are used to inform the node of its -parent. */ - public void jjtSetParent(Node n); - public Node jjtGetParent(); - - /** This method tells the node to add its argument to the node's -list of children. */ - public void jjtAddChild(Node n, int i); - - /** This method returns a child node. The children are numbered - from zero, left to right. */ - public Node jjtGetChild(int i); - - /** Return the number of children the node has. */ - public int jjtGetNumChildren(); - - public String getImage(); - - public Object getValue(EvaluationContext ctx) throws ELException; - public void setValue(EvaluationContext ctx, Object value) throws ELException; - public Class getType(EvaluationContext ctx) throws ELException; - public boolean isReadOnly(EvaluationContext ctx) throws ELException; - public void accept(NodeVisitor visitor) throws Exception; - public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException; - public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException; +/** + * This method is called after the node has been made the current + * node. It indicates that child nodes can now be added to it. + */ +public void jjtOpen(); + +/** + * This method is called after all the child nodes have been + * added. + */ +public void jjtClose(); + +/** + * This pair of methods are used to inform the node of its + * parent. + * + * @param n the node + */ +public void jjtSetParent(Node n); + +public Node jjtGetParent(); + +/** + * This method tells the node to add its argument to the node's + * list of children. + * + * @param n the node + * @param i i + */ +public void jjtAddChild(Node n, int i); + +/** + * This method returns a child node. The children are numbered + * from zero, left to right. + * + * @param i i + * + * @return child node + */ +public Node jjtGetChild(int i); + +/** + * @return the number of children the node has. + */ +public int jjtGetNumChildren(); + +public String getImage(); + +public Object getValue(EvaluationContext ctx) throws ELException; + +public void setValue(EvaluationContext ctx, Object value) throws ELException; + +public Class getType(EvaluationContext ctx) throws ELException; + +public boolean isReadOnly(EvaluationContext ctx) throws ELException; + +public void accept(NodeVisitor visitor) throws Exception; + +public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException; + +public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException; } http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java index 231d73c..a57e7da 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ParseException.java @@ -23,7 +23,11 @@ public class ParseException extends Exception { * This constructor calls its super class with the empty string * to force the "toString" method of parent class "Throwable" to * print the error message in the form: - * ParseException: +
[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/Ab
[08/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java index d793787..e3ea7c5 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParserTokenManager.java @@ -1,1340 +1,1325 @@ /* Generated By:JJTree&JavaCC: Do not edit this line. ELParserTokenManager.java */ package org.apache.struts2.el.parser; -import java.io.StringReader; -import javax.el.ELException; -/** Token Manager. */ -public class ELParserTokenManager implements ELParserConstants -{ +/** + * Token Manager. + */ +public class ELParserTokenManager implements ELParserConstants { - /** Debug output. */ - public java.io.PrintStream debugStream = System.out; - /** Set debug output. */ - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - case 0: - if ((active0 & 0x10L) != 0L) -return 2; - if ((active0 & 0x4L) != 0L) - { -jjmatchedKind = 1; -return 4; - } - if ((active0 & 0x8L) != 0L) - { -jjmatchedKind = 1; -return 6; - } - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 35: - return jjMoveStringLiteralDfa1_0(0x8L); - case 36: - return jjMoveStringLiteralDfa1_0(0x4L); - case 92: - return jjStartNfaWithStates_0(0, 4, 2); - default : - return jjMoveNfa_0(7, 0); - } -} -private int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0); - return 1; - } - switch(curChar) - { - case 123: - if ((active0 & 0x4L) != 0L) -return jjStopAtPos(1, 2); - else if ((active0 & 0x8L) != 0L) -return jjStopAtPos(1, 3); - break; - default : - break; - } - return jjStartNfa_0(0, active0); -} -private int jjStartNfaWithStates_0(int pos, int kind, int state) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return pos + 1; } - return jjMoveNfa_0(state, pos + 1); -} -static final long[] jjbitVec0 = { - 0xfffeL, 0xL, 0xL, 0xL -}; -static final long[] jjbitVec2 = { - 0x0L, 0x0L, 0xL, 0xL -}; -private int jjMoveNfa_0(int startState, int curPos) -{ - int startsAt = 0; - jjnewStateCnt = 8; - int i = 1; - jjstateSet[0] = startState; - int kind = 0x7fff; - for (;;) - { - if (++jjround == 0x7fff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { -switch(jjstateSet[--i]) -{ - case 7: - if ((0xffe7L & l) != 0L) - { - if (kind > 1) -kind = 1; - jjCheckNAddStates(0, 3); - } - else if ((0x18L & l) != 0L) - { - if (kind > 1) -kind = 1; - } - if (curChar == 35) - jjstateSet[jjnewStateCnt++] = 6; - else if (curChar == 36) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 0: - if ((0xffe7L & l) == 0L) - break; - if (kind > 1) - kind = 1; - jjCheckNAddStates(0, 3); - break; - case 2: - if ((0x18L & l) == 0L) - break; - if (kind > 1) - kind = 1; - jjCheckNAddStates(0, 3); - break; - case 3: - if (curChar == 36) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 4: - if ((0xffefL & l) == 0L) -
[10/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java -- diff --git a/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java b/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java index 88e3c53..acabef0 100644 --- a/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java +++ b/core/src/main/java/org/apache/struts2/views/velocity/components/AbstractDirective.java @@ -50,7 +50,8 @@ public abstract class AbstractDirective extends Directive { public abstract String getBeanName(); /** - * All components, unless otherwise stated, are LINE-level directives. + * @return All components, unless otherwise stated, are LINE-level directives. + * */ public int getType() { return LINE; @@ -82,12 +83,18 @@ public abstract class AbstractDirective extends Directive { } /** - * create a Map of properties that the user has passed in. for example, + * + * Create a Map of properties that the user has passed in. For example: + * + * * * #xxx("name=hello" "value=world" "template=foo") * - * would yield a params that contains {["name", "hello"], ["value", "world"], ["template", "foo"]} * + * + * would yield a params that contains {["name", "hello"], ["value", "world"], ["template", "foo"]} + * + * @param contextAdapter the context adapter * @param node the Node passed in to the render method * @return a Map of the user specified properties * @throws org.apache.velocity.exception.ParseErrorException @@ -132,7 +139,11 @@ public abstract class AbstractDirective extends Directive { * then the key, rows, would be added to the propertyMap with the String value, 20. * * @param propertyMap a params containing all the properties that we wish to set + * @param contextAdapter the context adapter * @param nodethe parameter to set expressed in "name=value" format + * + * @throws ParseErrorException in case of parsing errors + * @throws MethodInvocationException in case of method invocation errors */ protected void putProperty(Map propertyMap, InternalContextAdapter contextAdapter, Node node) throws ParseErrorException, MethodInvocationException { // node.value uses the StrutsValueStack to evaluate the directive's value parameter http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java -- diff --git a/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java b/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java index d110d2d..78fea2d 100644 --- a/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java +++ b/core/src/main/java/org/apache/struts2/views/xslt/AbstractAdapterNode.java @@ -93,10 +93,10 @@ public abstract class AbstractAdapterNode implements AdapterNode { /** * - * @param adapterFactory - * @param parent - * @param propertyName - * @param value + * @param adapterFactory the adapter factory + * @param parent the parent adapter node + * @param propertyName the property name + * @param value value */ protected void setContext(AdapterFactory adapterFactory, AdapterNode parent, String propertyName, Object value) { setAdapterFactory(adapterFactory); @@ -116,6 +116,8 @@ public abstract class AbstractAdapterNode implements AdapterNode { /** * Lazily initialize child childAdapters + * + * @return node list */ protected List getChildAdapters() { if (childAdapters == null) { http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java -- diff --git a/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java b/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java index 67202fc..159ccf4 100644 --- a/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java +++ b/core/src/main/java/org/apache/struts2/views/xslt/AdapterFactory.java @@ -29,60 +29,77 @@ import java.util.HashMap; import java.util.Map; /** + * * AdapterFactory produces Node adapters for Java object types. * Adapter classes are generally instantiated dynamically via a no-args constructor * and populated with their context information via the AdapterNode interface. + * * + * * This factory supports proxying of generic DOM Node trees, allowing arbitrary * Node types to be mixed together. You may simply return a Doc
[09/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java index 6cd2847..d8dd5dd 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/el/parser/ELParser.java @@ -1,10 +1,13 @@ /* Generated By:JJTree&JavaCC: Do not edit this line. ELParser.java */ package org.apache.struts2.el.parser; -import java.io.StringReader; + import javax.el.ELException; -public class ELParser/*@bgen(jjtree)*/implements ELParserTreeConstants, ELParserConstants {/*@bgen(jjtree)*/ - protected JJTELParserState jjtree = new JJTELParserState();public static Node parse(String ref) throws ELException -{ +import java.io.StringReader; + +public class ELParser/*@bgen(jjtree)*/ implements ELParserTreeConstants, ELParserConstants {/*@bgen(jjtree)*/ +protected JJTELParserState jjtree = new JJTELParserState(); + +public static Node parse(String ref) throws ELException { try { return (new ELParser(new StringReader(ref))).CompositeExpression(); } catch (ParseException pe) { @@ -12,2179 +15,2451 @@ public class ELParser/*@bgen(jjtree)*/implements ELParserTreeConstants, ELParser } } -/* - * CompositeExpression - * Allow most flexible parsing, restrict by examining - * type of returned node - */ - final public AstCompositeExpression CompositeExpression() throws ParseException { +/* + * CompositeExpression + * Allow most flexible parsing, restrict by examining + * type of returned node + */ +final public AstCompositeExpression CompositeExpression() throws ParseException { /*@bgen(jjtree) CompositeExpression */ - AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION); - boolean jjtc000 = true; - jjtree.openNodeScope(jjtn000); -try { - label_1: - while (true) { -switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { -case LITERAL_EXPRESSION: -case START_DYNAMIC_EXPRESSION: -case START_DEFERRED_EXPRESSION: - ; - break; -default: - jj_la1[0] = jj_gen; - break label_1; -} -switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { -case START_DEFERRED_EXPRESSION: - DeferredExpression(); - break; -case START_DYNAMIC_EXPRESSION: - DynamicExpression(); - break; -case LITERAL_EXPRESSION: - LiteralExpression(); - break; -default: - jj_la1[1] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); -} - } - jj_consume_token(0); - jjtree.closeNodeScope(jjtn000, true); - jjtc000 = false; - {if (true) return jjtn000;} -} catch (Throwable jjte000) { - if (jjtc000) { -jjtree.clearNodeScope(jjtn000); -jjtc000 = false; - } else { -jjtree.popNode(); - } - if (jjte000 instanceof RuntimeException) { -{if (true) throw (RuntimeException)jjte000;} - } - if (jjte000 instanceof ParseException) { -{if (true) throw (ParseException)jjte000;} - } - {if (true) throw (Error)jjte000;} -} finally { - if (jjtc000) { -jjtree.closeNodeScope(jjtn000, true); - } -} -throw new Error("Missing return statement in function"); - } - -/* - * LiteralExpression - * Non-EL Expression blocks - */ - final public void LiteralExpression() throws ParseException { +AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION); +boolean jjtc000 = true; +jjtree.openNodeScope(jjtn000); +try { +label_1: +while (true) { +switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { +case LITERAL_EXPRESSION: +case START_DYNAMIC_EXPRESSION: +case START_DEFERRED_EXPRESSION: +; +break; +default: +jj_la1[0] = jj_gen; +break label_1; +} +switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) { +case START_DEFERRED_EXPRESSION: +DeferredExpression(); +break; +case START_DYNAMIC_EXPRESSION: +
[03/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java index 20d3628..bcf5641 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/EncodingMap.java @@ -28,445 +28,447 @@ package org.apache.struts2.jasper.xmlparser; import java.util.Hashtable; /** + * * EncodingMap is a convenience class which handles conversions between * IANA encoding names and Java encoding names, and vice versa. The * encoding names used in XML instance documents must * be the IANA encoding names specified or one of the aliases for those names * which IANA defines. - * - * + * + * + * * - * - * Common Name + * + * Common Name * - * - * Use this name in XML files + * + * Use this name in XML files * - * - * Name Type + * + * Name Type * - * - * Xerces converts to this Java Encoder Name + * + * Xerces converts to this Java Encoder Name * * * - * 8 bit Unicode - * - * UTF-8 + * 8 bit Unicode + * + * UTF-8 * - * - * IANA + * + * IANA * - * - * UTF8 + * + * UTF8 * * * - * ISO Latin 1 - * - * ISO-8859-1 + * ISO Latin 1 + * + * ISO-8859-1 * - * - * MIME + * + * MIME * - * - * ISO-8859-1 + * + * ISO-8859-1 * * * - * ISO Latin 2 - * - * ISO-8859-2 + * ISO Latin 2 + * + * ISO-8859-2 * - * - * MIME + * + * MIME * - * - * ISO-8859-2 + * + * ISO-8859-2 * * * - * ISO Latin 3 - * - * ISO-8859-3 + * ISO Latin 3 + * + * ISO-8859-3 * - * - * MIME + * + * MIME * - * - * ISO-8859-3 + * + * ISO-8859-3 * * * - * ISO Latin 4 - * - * ISO-8859-4 + * ISO Latin 4 + * + * ISO-8859-4 * - * - * MIME + * + * MIME * - * - * ISO-8859-4 + * + * ISO-8859-4 * * * - * ISO Latin Cyrillic - * - * ISO-8859-5 + * ISO Latin Cyrillic + * + * ISO-8859-5 * - * - * MIME + * + * MIME * - * - * ISO-8859-5 + * + * ISO-8859-5 * * * - * ISO Latin Arabic - * - * ISO-8859-6 + * ISO Latin Arabic + * + * ISO-8859-6 * - * - * MIME + * + * MIME * - * - * ISO-8859-6 + * + * ISO-8859-6 * * * - * ISO Latin Greek - * - * ISO-8859-7 + * ISO Latin Greek + * + * ISO-8859-7 * - * - * MIME + * + * MIME * - * - * ISO-8859-7 + * + * ISO-8859-7 * * * - * ISO Latin Hebrew - * - * ISO-8859-8 + * ISO Latin Hebrew + * + * ISO-8859-8 * - * - * MIME + * + * MIME * - * - * ISO-8859-8 + * + * ISO-8859-8 * * * - * ISO Latin 5 - * - * ISO-8859-9 + * ISO Latin 5 + * + * ISO-8859-9 * - * - * MIME + * + * MIME * - * - * ISO-8859-9 + * + * ISO-8859-9 * * * - * EBCDIC: US - * - * ebcdic-cp-us + * EBCDIC: US + * + * ebcdic-cp-us * - * - * IANA + * + * IANA * - * - * cp037 + * + * cp037 * * * - * EBCDIC: Canada - * - * ebcdic-cp-ca + * EBCDIC: Canada + * + * ebcdic-cp-ca * - * - * IANA + * + * IANA * - * - * cp037 + * + * cp037 * * * - * EBCDIC: Netherlands - * - * ebcdic-cp-nl + * EBCDIC: Netherlands + * + * ebcdic-cp-nl * - * - * IANA + * + *
[14/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java index 1c84b31..c946d70 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkConverter.java @@ -344,6 +344,7 @@ public class XWorkConverter extends DefaultTypeConverter { * Looks for a TypeConverter in the default mappings. * * @param className name of the class the TypeConverter must handle + * @param isPrimitive is primitive? * @return a TypeConverter to handle the specified class or null if none can be found */ public TypeConverter lookup(String className, boolean isPrimitive) { @@ -521,10 +522,11 @@ public class XWorkConverter extends DefaultTypeConverter { /** * Looks for converter mappings for the specified class, traversing up its class hierarchy and interfaces and adding * any additional mappings it may find. Mappings lower in the hierarchy have priority over those higher in the - * hierarcy. + * hierarchy. * * @param clazz the class to look for converter mappings for * @return the converter mappings + * @throws Exception in case of any errors */ protected Map buildConverterMapping(Class clazz) throws Exception { Map mapping = new HashMap<>(); http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java b/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java index eeece95..3dc59dc 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/metadata/ConversionDescription.java @@ -61,7 +61,7 @@ public class ConversionDescription { /** * Creates an ConversionDescription with the specified property name. * - * @param property + * @param property property */ public ConversionDescription(String property) { this.property = property; @@ -90,10 +90,7 @@ public class ConversionDescription { } /** - * Sets the rule prefix for COLLECTION_PREFIX or MAP_PREFIX key. - * Defaults to en empty String. - * - * @param rule + * @param rule the rule prefix for COLLECTION_PREFIX or MAP_PREFIX key. Defaults to en empty String. */ public void setRule(String rule) { if (rule != null && rule.length() > 0) { @@ -167,7 +164,7 @@ public class ConversionDescription { /** * Returns the fullQualifiedClassName attribute is used to create the special conversion.properties file name. * - * @return fullQualifiedClassName + * @return full qualified class name */ public String getFullQualifiedClassName() { return fullQualifiedClassName; @@ -176,7 +173,7 @@ public class ConversionDescription { /** * The fullQualifiedClassName attribute is used to create the special conversion.properties file name. * - * @param fullQualifiedClassName + * @param fullQualifiedClassName a full qualified class name */ public void setFullQualifiedClassName(String fullQualifiedClassName) { this.fullQualifiedClassName = fullQualifiedClassName; http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java b/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java index d33cb1d..4cc41a9 100644 --- a/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java +++ b/core/src/main/java/com/opensymphony/xwork2/factory/ActionFactory.java @@ -11,6 +11,15 @@ public interface ActionFactory { /** * Builds action instance + * + * @param actionName name of the action + * @param namespace namespace for the action + * @param config action config + * @param extraContext extra context map + * + * @return action object + * + * @throws Exception in case of any errors */ Object buildAction(String actionName, String namespace, ActionConfig config, Map extraContext) throws Exception; http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/factory/Con
[05/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java index 1b4e21c..aa5b4c3 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/JspUtil.java @@ -17,19 +17,7 @@ package org.apache.struts2.jasper.compiler; -import java.io.CharArrayWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.util.Vector; -import java.util.jar.JarFile; -import java.util.zip.ZipEntry; - -import javax.el.FunctionMapper; -import javax.servlet.jsp.el.ExpressionEvaluator; - - +import org.apache.commons.lang3.BooleanUtils; import org.apache.struts2.el.ExpressionFactoryImpl; import org.apache.struts2.jasper.Constants; import org.apache.struts2.jasper.JasperException; @@ -37,7 +25,14 @@ import org.apache.struts2.jasper.JspCompilationContext; import org.apache.struts2.jasper.el.ExpressionEvaluatorImpl; import org.xml.sax.Attributes; -/** +import javax.el.FunctionMapper; +import javax.servlet.jsp.el.ExpressionEvaluator; +import java.io.*; +import java.util.Vector; +import java.util.jar.JarFile; +import java.util.zip.ZipEntry; + +/** * This class has all the utility method(s). * Ideally should move all the bean containers here. * @@ -54,39 +49,39 @@ public class JspUtil { private static final String META_INF_TAGS = "/META-INF/tags/"; // Delimiters for request-time expressions (JSP and XML syntax) -private static final String OPEN_EXPR = "<%="; +private static final String OPEN_EXPR = "<%="; private static final String CLOSE_EXPR = "%>"; -private static final String OPEN_EXPR_XML = "%="; +private static final String OPEN_EXPR_XML = "%="; private static final String CLOSE_EXPR_XML = "%"; private static int tempSequenceNumber = 0; - + //private static ExpressionEvaluatorImpl expressionEvaluator //= new ExpressionEvaluatorImpl(); - + //tc6 private final static ExpressionEvaluator expressionEvaluator = -new ExpressionEvaluatorImpl(new ExpressionFactoryImpl()); +new ExpressionEvaluatorImpl(new ExpressionFactoryImpl()); private static final String javaKeywords[] = { -"abstract", "assert", "boolean", "break", "byte", "case", -"catch", "char", "class", "const", "continue", -"default", "do", "double", "else", "enum", "extends", -"final", "finally", "float", "for", "goto", -"if", "implements", "import", "instanceof", "int", -"interface", "long", "native", "new", "package", -"private", "protected", "public", "return", "short", -"static", "strictfp", "super", "switch", "synchronized", -"this", "throws", "transient", "try", "void", -"volatile", "while" }; +"abstract", "assert", "boolean", "break", "byte", "case", +"catch", "char", "class", "const", "continue", +"default", "do", "double", "else", "enum", "extends", +"final", "finally", "float", "for", "goto", +"if", "implements", "import", "instanceof", "int", +"interface", "long", "native", "new", "package", +"private", "protected", "public", "return", "short", +"static", "strictfp", "super", "switch", "synchronized", +"this", "throws", "transient", "try", "void", +"volatile", "while"}; public static final int CHUNKSIZE = 1024; - -public static char[] removeQuotes(char []chars) { + +public static char[] removeQuotes(char[] chars) { CharArrayWriter caw = new CharArrayWriter(); for (int i = 0; i < chars.length; i++) { -if (chars[i] == '%' && chars[i+1] == '\\' && -chars[i+2] == '>') { +if (chars[i] == '%' && chars[i + 1] == '\\' && +chars[i + 2] == '>') { caw.write('%'); caw.write('>'); i = i + 2; @@ -97,7 +92,7 @@ public class JspUtil { return caw.toCharArray(); } -public static char[] escapeQuotes (char []chars) { +public static char[] escapeQuotes(char[] chars) { // Prescan to convert %\> to %> String s = new String(chars); while (true) { @@ -129,66 +124,72 @@ public class JspUtil { /** * Checks if the token is a runtime expression. - * In standard JSP syntax, a runtime expression starts with '<%' and - * ends with '%>'. When the JSP document is in XML syntax, a runtime + * In standard JSP syntax, a runtime expr
[12/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java b/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java index 1a5fb3b..614931c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/annotations/DoubleRangeFieldValidator.java @@ -36,7 +36,7 @@ import java.lang.annotation.Target; * Annotation parameters: * * - * + * * * Parameter * Required @@ -149,63 +149,71 @@ import java.lang.annotation.Target; public @interface DoubleRangeFieldValidator { /** - * Double property. The inclusive minimum the number must be. + * Double property. + * + * @return The inclusive minimum the number must be. */ String minInclusive() default ""; /** - * The inclusive minimum the number must be defined as an expression + * @return The inclusive minimum the number must be defined as an expression */ String minInclusiveExpression() default ""; /** - * Double property. The inclusive minimum the number must be. + * Double property. + * + * @return The inclusive minimum the number must be. */ String maxInclusive() default ""; /** - * The inclusive minimum the number must be defined as an expression + * @return The inclusive minimum the number must be defined as an expression */ String maxInclusiveExpression() default ""; /** - * Double property. The exclusive maximum number can be. + * Double property. + * + * @return The exclusive maximum number can be. */ String minExclusive() default ""; /** - * The exclusive maximum number can be defined as an expression + * @return The exclusive maximum number can be defined as an expression */ String minExclusiveExpression() default ""; /** - * Double property. The exclusive maximum number can be. + * Double property. + * + * @return The exclusive maximum number can be. */ String maxExclusive() default ""; /** - * The exclusive maximum number can be defined as an expression + * @return The exclusive maximum number can be defined as an expression */ String maxExclusiveExpression() default ""; /** - * The default error message for this validator. + * @return The default error message for this validator. * NOTE: It is required to set a message, if you are not using the message key for 18n lookup! */ String message() default ""; /** - * The message key to lookup for i18n. + * @return The message key to lookup for i18n. */ String key() default ""; /** - * Additional params to be used to customize message - will be evaluated against the Value Stack + * @return Additional params to be used to customize message - will be evaluated against the Value Stack */ String[] messageParams() default {}; /** - * The optional fieldName for SIMPLE validator types. + * @return The optional fieldName for SIMPLE validator types. */ String fieldName() default ""; @@ -214,11 +222,12 @@ public @interface DoubleRangeFieldValidator { * * Adds the short-circuit="true" attribute value if true. * + * @return true if validator will be used as short-circuit. Default is false. */ boolean shortCircuit() default false; /** - * The validation type for this field/method. + * @return The validation type for this field/method. */ ValidatorType type() default ValidatorType.FIELD; } http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java b/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java index ec54c05..a96ad6d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java +++ b/core/src/main/java/com/opensymphony/xwork2/validator/annotations/EmailValidator.java @@ -35,7 +35,7 @@ import java.lang.annotation.Target; * Annotation parameters: * * - * + * * * Parameter * Required @@ -96,23 +96,23 @@ import java.lang.annotation.Target; public @interface EmailValidator { /** - * The default error message for this validator. + * @return The default error message for this validator. * NOTE: It
[06/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java index 4e00266..6457904 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/compiler/ErrorDispatcher.java @@ -16,26 +16,32 @@ */ package org.apache.struts2.jasper.compiler; +import org.apache.struts2.jasper.JasperException; +import org.apache.struts2.jasper.JspCompilationContext; +import org.xml.sax.SAXException; + import java.io.BufferedReader; import java.io.IOException; import java.io.StringReader; import java.net.MalformedURLException; import java.util.ArrayList; -import org.apache.struts2.jasper.JasperException; -import org.apache.struts2.jasper.JspCompilationContext; -import org.xml.sax.SAXException; - /** + * * Class responsible for dispatching JSP parse and javac compilation errors * to the configured error handler. + * * + * * This class is also responsible for localizing any error codes before they * are passed on to the configured error handler. - * + * + * + * * In the case of a Java compilation error, the compiler error message is - * parsed into an array of JavacErrorDetail instances, which is passed on to + * parsed into an array of JavacErrorDetail instances, which is passed on to * the configured error handler. + * * * @author Jan Luehe * @author Kin-man Chung @@ -49,280 +55,354 @@ public class ErrorDispatcher { private boolean jspcMode = false; -/* +/** * Constructor. * - * @param jspcMode true if compilation has been initiated by JspC, false - * otherwise + * @param jspcMode true if compilation has been initiated by JspC, false otherwise */ public ErrorDispatcher(boolean jspcMode) { - // XXX check web.xml for custom error handler - errHandler = new DefaultErrorHandler(); +// XXX check web.xml for custom error handler +errHandler = new DefaultErrorHandler(); this.jspcMode = jspcMode; } -/* +/** + * * Dispatches the given JSP parse error to the configured error handler. + * * + * * The given error code is localized. If it is not found in the * resource bundle for localized error messages, it is used as the error * message. + * * * @param errCode Error code + * @throws JasperException in case of Jasper errors */ public void jspError(String errCode) throws JasperException { - dispatch(null, errCode, null, null); +dispatch(null, errCode, null, null); } -/* +/** + * * Dispatches the given JSP parse error to the configured error handler. + * * + * * The given error code is localized. If it is not found in the * resource bundle for localized error messages, it is used as the error * message. - * - * @param where Error location + * + * @param where Error location * @param errCode Error code + * @throws JasperException in case of Jasper errors */ public void jspError(Mark where, String errCode) throws JasperException { - dispatch(where, errCode, null, null); +dispatch(where, errCode, null, null); } -/* +/** + * * Dispatches the given JSP parse error to the configured error handler. + * * + * * The given error code is localized. If it is not found in the * resource bundle for localized error messages, it is used as the error * message. + * * - * @param n Node that caused the error + * @param n Node that caused the error * @param errCode Error code + * @throws JasperException in case of Jasper errors */ public void jspError(Node n, String errCode) throws JasperException { - dispatch(n.getStart(), errCode, null, null); +dispatch(n.getStart(), errCode, null, null); } -/* +/** + * * Dispatches the given JSP parse error to the configured error handler. + * * + * * The given error code is localized. If it is not found in the * resource bundle for localized error messages, it is used as the error * message. + * * * @param errCode Error code - * @param arg Argument for parametric replacement + * @param arg Argument for parametric replacement + * @throws JasperException in case of Jasper errors */ public void jspError(String errCode, String arg) throws JasperException { - dispatch(null, errCode, new Object[] {a
[02/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java index b251db8..01ecba3 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/xmlparser/XMLEncodingDetector.java @@ -25,21 +25,17 @@ package org.apache.struts2.jasper.xmlparser; -import java.io.EOFException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.IOException; -import java.io.Reader; -import java.util.Locale; -import java.util.jar.JarFile; - import org.apache.struts2.jasper.JasperException; import org.apache.struts2.jasper.JspCompilationContext; import org.apache.struts2.jasper.compiler.ErrorDispatcher; import org.apache.struts2.jasper.compiler.JspUtil; +import java.io.*; +import java.util.Locale; +import java.util.jar.JarFile; + public class XMLEncodingDetector { - + private InputStream stream; private String encoding; private boolean isEncodingSetInProlog; @@ -47,7 +43,7 @@ public class XMLEncodingDetector { private int skip; private Boolean isBigEndian; private Reader reader; - + // org.apache.xerces.impl.XMLEntityManager fields public static final int DEFAULT_BUFFER_SIZE = 2048; public static final int DEFAULT_XMLDECL_BUFFER_SIZE = 64; @@ -55,7 +51,7 @@ public class XMLEncodingDetector { private SymbolTable fSymbolTable; private XMLEncodingDetector fCurrentEntity; private int fBufferSize = DEFAULT_BUFFER_SIZE; - + // org.apache.xerces.impl.XMLEntityManager.ScannedEntity fields private int lineNumber = 1; private int columnNumber = 1; @@ -64,15 +60,15 @@ public class XMLEncodingDetector { private int position; private int count; private boolean mayReadChunks = false; - + // org.apache.xerces.impl.XMLScanner fields -private XMLString fString = new XMLString(); +private XMLString fString = new XMLString(); private XMLStringBuffer fStringBuffer = new XMLStringBuffer(); private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer(); private final static String fVersionSymbol = "version"; private final static String fEncodingSymbol = "encoding"; private final static String fStandaloneSymbol = "standalone"; - + // org.apache.xerces.impl.XMLDocumentFragmentScannerImpl fields private int fMarkupDepth = 0; private String[] fStrings = new String[3]; @@ -88,25 +84,34 @@ public class XMLEncodingDetector { } /** + * * Autodetects the encoding of the XML document supplied by the given * input stream. + * * + * * Encoding autodetection is done according to the XML 1.0 specification, * Appendix F.1: Detection Without External Encoding Information. + * * + * @param fname file name + * @param jarFile jar file + * @param ctxtcompilation context + * @param err error dispatcher * @return Two-element array, where the first element (of type * java.lang.String) contains the name of the (auto)detected encoding, and - * the second element (of type java.lang.Boolean) specifies whether the + * the second element (of type java.lang.Boolean) specifies whether the * encoding was specified using the 'encoding' attribute of an XML prolog * (TRUE) or autodetected (FALSE). + * @throws IOException in case of IO errors + * @throws JasperException in case of Jasper errors */ public static Object[] getEncoding(String fname, JarFile jarFile, JspCompilationContext ctxt, ErrorDispatcher err) -throws IOException, JasperException -{ +throws IOException, JasperException { InputStream inStream = JspUtil.getInputStream(fname, jarFile, ctxt, - err); +err); XMLEncodingDetector detector = new XMLEncodingDetector(); Object[] ret = detector.getEncoding(inStream, err); inStream.close(); @@ -115,92 +120,93 @@ public class XMLEncodingDetector { } private Object[] getEncoding(InputStream in, ErrorDispatcher err) -throws IOException, JasperException -{ +throws IOException, JasperException { this.stream = in; -this.err=err; +this.err = err; createInitialReader(); scanXMLDecl(); - -return new Object[] { this.encoding, - Boolean.v
[11/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/components/UrlRenderer.java -- diff --git a/core/src/main/java/org/apache/struts2/components/UrlRenderer.java b/core/src/main/java/org/apache/struts2/components/UrlRenderer.java index a9de852..389fb39 100644 --- a/core/src/main/java/org/apache/struts2/components/UrlRenderer.java +++ b/core/src/main/java/org/apache/struts2/components/UrlRenderer.java @@ -34,7 +34,7 @@ public interface UrlRenderer { /** * Preprocessing step -* @param provider +* @param provider The {@link UrlProvider} component that "owns" this renderer. */ void beforeRenderUrl(UrlProvider provider); http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java -- diff --git a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java index 52b76ab..f161b24 100644 --- a/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java +++ b/core/src/main/java/org/apache/struts2/config/DefaultBeanSelectionProvider.java @@ -84,7 +84,7 @@ import java.util.StringTokenizer; * The following is a list of the allowed extension points: * * - * + * * * Type * Property @@ -289,7 +289,7 @@ import java.util.StringTokenizer; * com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor * struts.converter.file.processor * singleton - * Process -conversion.properties file create converters + * Process-conversion.properties file create converters * * * com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor @@ -337,19 +337,22 @@ import java.util.StringTokenizer; * * * - * + * * * Implementations are selected using the value of its associated property. That property is * used to determine the implementation by: * + * * * Trying to find an existing bean by that name in the container * Trying to find a class by that name, then creating a new bean factory for it * Creating a new delegation bean factory that delegates to the configured ObjectFactory at runtime * + * * * Finally, this class overrides certain properties if dev mode is enabled: * + * * * struts.i18n.reload = true * struts.configuration.xml.reload = true http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java -- diff --git a/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java b/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java index 7a42232..a0e1928 100644 --- a/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java +++ b/core/src/main/java/org/apache/struts2/config/PropertiesConfigurationProvider.java @@ -50,8 +50,8 @@ public class PropertiesConfigurationProvider implements ConfigurationProvider { } /** - * @param props - * @param settings + * @param props properties + * @param settings settings */ protected void loadSettings(LocatableProperties props, final Settings settings) { for (Iterator i = settings.list(); i.hasNext(); ) { http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java index d072834..9fe3858 100644 --- a/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java +++ b/core/src/main/java/org/apache/struts2/dispatcher/DefaultStaticContentLoader.java @@ -274,7 +274,7 @@ public class DefaultStaticContentLoader implements StaticContentLoader { * @param name resource name * @param packagePrefix The package prefix to use to locate the resource * @return full path - * @throws UnsupportedEncodingException + * @throws UnsupportedEncodingException If there is a encoding problem */ protected String buildPath(String name, String packagePrefix) throws UnsupportedEncodingException { String resourcePath; http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java -- diff --git a/core/src/main/java/org/apache/struts2/dispatc
[04/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java -- diff --git a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java index dc0d520..5108a32 100644 --- a/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java +++ b/plugins/embeddedjsp/src/main/java/org/apache/struts2/jasper/runtime/JspRuntimeLibrary.java @@ -17,6 +17,18 @@ package org.apache.struts2.jasper.runtime; +import org.apache.struts2.jasper.Constants; +import org.apache.struts2.jasper.JasperException; +import org.apache.struts2.jasper.compiler.Localizer; + +import javax.servlet.RequestDispatcher; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.jsp.JspWriter; +import javax.servlet.jsp.PageContext; +import javax.servlet.jsp.tagext.BodyContent; import java.beans.PropertyEditor; import java.beans.PropertyEditorManager; import java.io.ByteArrayOutputStream; @@ -28,207 +40,197 @@ import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.Enumeration; -import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.jsp.JspWriter; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.BodyContent; - -import org.apache.struts2.jasper.Constants; -import org.apache.struts2.jasper.JasperException; -import org.apache.struts2.jasper.compiler.Localizer; - /** + * * Bunch of util methods that are used by code generated for useBean, - * getProperty and setProperty. + * getProperty and setProperty. + * * + * * The __begin, __end stuff is there so that the JSP engine can * actually parse this file and inline them if people don't want * runtime dependencies on this class. However, I'm not sure if that * works so well right now. It got forgotten at some point. -akv + * * * @author Mandar Raje * @author Shawn Bayern */ public class JspRuntimeLibrary { - + private static final String SERVLET_EXCEPTION - = "javax.servlet.error.exception"; += "javax.servlet.error.exception"; private static final String JSP_EXCEPTION - = "javax.servlet.jsp.jspException"; += "javax.servlet.jsp.jspException"; protected static class PrivilegedIntrospectHelper - implements PrivilegedExceptionAction { +implements PrivilegedExceptionAction { - private Object bean; - private String prop; - private String value; - private ServletRequest request; - private String param; - private boolean ignoreMethodNF; +private Object bean; +private String prop; +private String value; +private ServletRequest request; +private String param; +private boolean ignoreMethodNF; PrivilegedIntrospectHelper(Object bean, String prop, String value, ServletRequest request, - String param, boolean ignoreMethodNF) -{ - this.bean = bean; - this.prop = prop; - this.value = value; + String param, boolean ignoreMethodNF) { +this.bean = bean; +this.prop = prop; +this.value = value; this.request = request; - this.param = param; - this.ignoreMethodNF = ignoreMethodNF; +this.param = param; +this.ignoreMethodNF = ignoreMethodNF; } - + public Object run() throws JasperException { - internalIntrospecthelper( -bean,prop,value,request,param,ignoreMethodNF); +internalIntrospecthelper( +bean, prop, value, request, param, ignoreMethodNF); return null; } } /** - * Returns the value of the javax.servlet.error.exception request - * attribute value, if present, otherwise the value of the - * javax.servlet.jsp.jspException request attribute value. - * * This method is called at the beginning of the generated servlet code * for a JSP error page, when the "exception" implicit scripting language * variable is initialized. + * + * @param request servlet request + * @return the value of the javax.servlet.error.exception request + * attribute value, if present, otherwise the value of the + * javax.servlet.jsp.jspException request attribute value.
[13/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
http://git-wip-us.apache.org/repos/asf/struts/blob/775c82a7/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java -- diff --git a/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java b/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java index 2372499..fa5a178 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java @@ -60,13 +60,13 @@ import java.util.concurrent.ConcurrentMap; * * * To clarify #5, while traversing the package hierarchy, Struts 2 will look for a file package.properties: - * com/ - * acme/ - * package.properties - * actions/ - * package.properties - * FooAction.java - * FooAction.properties + * com/ + * acme/ + * package.properties + * actions/ + * package.properties + * FooAction.java + * FooAction.properties * * If FooAction.properties does not exist, com/acme/action/package.properties will be searched for, if * not found com/acme/package.properties, if not found com/package.properties, etc. @@ -291,7 +291,7 @@ public class LocalizedTextUtil { } /** - * Sets a {@link ClassLoader} to look up the bundle from if none can be found on the current thread's classloader + * @param classLoader a {@link ClassLoader} to look up the bundle from if none can be found on the current thread's classloader */ public static void setDelegatedClassLoader(final ClassLoader classLoader) { synchronized (bundlesMap) { @@ -300,7 +300,7 @@ public class LocalizedTextUtil { } /** - * Removes the bundle from any cached "misses" + * @param bundleName Removes the bundle from any cached "misses" */ public static void clearBundle(final String bundleName) { bundlesMap.remove(getCurrentThreadContextClassLoader().hashCode() + bundleName); @@ -323,6 +323,11 @@ public class LocalizedTextUtil { * Calls {@link #findText(Class aClass, String aTextName, Locale locale, String defaultMessage, Object[] args)} * with aTextName as the default message. * + * @param aClass class name + * @param aTextName text name + * @param locale the locale + * + * @return the localized text, or null if none can be found and no defaultMessage is provided * @see #findText(Class aClass, String aTextName, Locale locale, String defaultMessage, Object[] args) */ public static String findText(Class aClass, String aTextName, Locale locale) { @@ -610,6 +615,11 @@ public class LocalizedTextUtil { * will be treated as an OGNL expression and evaluated as such. * * + * @param bundle a resource bundle name + * @param aTextName text name + * @param locale the locale + * + * @return the localized text, or null if none can be found and no defaultMessage is provided * @see #findText(java.util.ResourceBundle, String, java.util.Locale, String, Object[]) */ public static String findText(ResourceBundle bundle, String aTextName, Locale locale) { @@ -636,6 +646,7 @@ public class LocalizedTextUtil { * @param locale the locale * @param defaultMessage the default message to use if no message was found in the bundle * @param args arguments for the message formatter. + * @return the localized text, or null if none can be found and no defaultMessage is provided */ public static String findText(ResourceBundle bundle, String aTextName, Locale locale, String defaultMessage, Object[] args) { ValueStack valueStack = ActionContext.getContext().getValueStack(); @@ -663,6 +674,7 @@ public class LocalizedTextUtil { * @param defaultMessage the default message to use if no message was found in the bundle * @param args arguments for the message formatter. * @param valueStack the OGNL value stack. + * @return the localized text, or null if none can be found and no defaultMessage is provided */ public static String findText(ResourceBundle bundle, String aTextName, Locale locale, String defaultMessage, Object[] args, ValueStack valueStack) { @@ -689,7 +701,7 @@ public class LocalizedTextUtil { } /** - * Gets the default message. + * @return the default message. */ private static GetDefaultMessageReturnArg getDefaultMessage(String key, Locale locale, ValueStack valueStack, Object[] args, String defaultMessage) { @@ -717,7 +729,7 @@ public class LocalizedTextUtil { } /** - * Gets the message from the named resource bundle. + * @return the message from the named resource bundle. */ private static String getMessage(String bundleName,
[15/15] struts git commit: WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard
WW-4531- Improve javadoc to be compatible with more strict JDK8 javadoc standard Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/775c82a7 Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/775c82a7 Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/775c82a7 Branch: refs/heads/master Commit: 775c82a74306918f9f333a2947375c09582a9198 Parents: 98d7756 Author: Johannes Geppert Authored: Fri Jul 24 20:27:30 2015 +0200 Committer: Johannes Geppert Committed: Fri Jul 24 20:27:31 2015 +0200 -- .../opensymphony/xwork2/ActionChainResult.java |2 + .../com/opensymphony/xwork2/ActionContext.java |2 +- .../xwork2/CompositeTextProvider.java | 107 +- .../xwork2/DefaultActionInvocation.java |2 +- .../opensymphony/xwork2/DefaultActionProxy.java |8 +- .../xwork2/DefaultTextProvider.java |2 +- .../xwork2/DefaultUnknownHandlerManager.java| 14 +- .../com/opensymphony/xwork2/ObjectFactory.java | 34 +- .../com/opensymphony/xwork2/UnknownHandler.java |4 +- .../xwork2/config/Configuration.java|7 +- .../xwork2/config/ConfigurationException.java |8 + .../xwork2/config/ConfigurationManager.java |2 +- .../xwork2/config/PackageProvider.java |8 +- .../xwork2/config/entities/ActionConfig.java|6 +- .../config/entities/InterceptorStackConfig.java | 19 +- .../xwork2/config/entities/PackageConfig.java | 12 +- .../xwork2/config/impl/AbstractMatcher.java |5 +- .../xwork2/config/impl/ActionConfigMatcher.java |1 + .../config/impl/DefaultConfiguration.java | 10 +- .../xwork2/config/impl/NamespaceMatch.java |2 +- .../xwork2/config/impl/NamespaceMatcher.java|2 +- .../config/providers/InterceptorBuilder.java| 17 +- .../providers/XmlConfigurationProvider.java | 40 +- .../xwork2/config/providers/XmlHelper.java | 33 +- .../xwork2/conversion/NullHandler.java | 37 +- .../conversion/TypeConversionException.java |4 +- .../conversion/annotations/Conversion.java |4 +- .../conversion/annotations/TypeConversion.java | 24 +- .../conversion/impl/DefaultTypeConverter.java |2 + .../impl/InstantiatingNullHandler.java | 15 +- .../xwork2/conversion/impl/XWorkConverter.java |4 +- .../metadata/ConversionDescription.java | 11 +- .../xwork2/factory/ActionFactory.java |9 + .../xwork2/factory/ConverterFactory.java|3 + .../xwork2/factory/InterceptorFactory.java |4 + .../xwork2/factory/UnknownHandlerFactory.java |3 + .../xwork2/factory/ValidatorFactory.java|6 +- .../opensymphony/xwork2/inject/Container.java | 24 +- .../xwork2/inject/ContainerBuilder.java | 98 +- .../com/opensymphony/xwork2/inject/Context.java | 10 +- .../com/opensymphony/xwork2/inject/Inject.java |5 +- .../com/opensymphony/xwork2/inject/Scope.java | 33 + .../com/opensymphony/xwork2/inject/Scoped.java |2 +- .../xwork2/inject/util/ReferenceCache.java | 15 + .../xwork2/interceptor/ChainingInterceptor.java | 12 +- .../interceptor/DefaultWorkflowInterceptor.java | 37 +- .../ExceptionMappingInterceptor.java|4 +- .../xwork2/interceptor/I18nInterceptor.java |2 + .../xwork2/interceptor/Interceptor.java |2 +- .../xwork2/interceptor/LoggingInterceptor.java |2 +- .../interceptor/MethodFilterInterceptor.java|4 +- .../interceptor/ParameterFilterInterceptor.java |3 +- .../xwork2/interceptor/ParameterNameAware.java |8 +- .../interceptor/PrefixMethodInvocationUtil.java |6 +- .../xwork2/interceptor/ScopedModelDriven.java |4 +- .../StaticParametersInterceptor.java|2 +- .../xwork2/interceptor/annotations/After.java |2 +- .../xwork2/interceptor/annotations/Before.java |4 +- .../interceptor/annotations/BeforeResult.java |2 +- .../interceptor/annotations/InputConfig.java|2 +- .../xwork2/mock/MockObjectTypeDeterminer.java |8 +- .../com/opensymphony/xwork2/ognl/OgnlUtil.java | 16 +- .../xwork2/spring/SpringObjectFactory.java | 26 +- .../spring/SpringProxyableObjectFactory.java|3 +- .../ActionAutowiringInterceptor.java| 20 +- .../xwork2/util/AnnotationUtils.java| 23 +- .../xwork2/util/ClassLoaderUtil.java| 19 + .../xwork2/util/ClassPathFinder.java| 12 +- .../opensymphony/xwork2/util/CreateIfNull.java |7 +- .../com/opensymphony/xwork2/util/DomHelper.java | 13 + .../com/opensymphony/xwork2/util/Element.java |9 +- .../java/com/opensymphony/xwork2/util/Key.java |7 +- .../opensymphony/xwork2/util/KeyProperty.java |7 +- .../xwork2/util/LocalizedTextUtil.java | 36 +