diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java b/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java index 8d2803ff5..0fc012427 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/ConversionFileProcessor.java @@ -3,7 +3,7 @@ package com.opensymphony.xwork2.conversion; import java.util.Map; /** - * Used to process -conversion.properties file to read defined Converters + * Used to process <clazz>-conversion.properties file to read defined Converters */ public interface ConversionFileProcessor { diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java b/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java index fe2b74840..dee9b152b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/ObjectTypeDeterminer.java @@ -18,8 +18,9 @@ package com.opensymphony.xwork2.conversion; /** * Determines what the key and and element class of a Map or Collection should be. For Maps, the elements are the * values. For Collections, the elements are the elements of the collection. - *

+ *

* See the implementations for javadoc description for the methods as they are dependent on the concrete implementation. + *

* * @author Gabriel Zimmerman */ diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java b/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java index 07a50d17c..45bad80b6 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/Conversion.java @@ -25,13 +25,15 @@ import java.lang.annotation.Target; * A marker annotation for type conversions at Type level. * * - *

Annotation usage: + *

+ * Annotation usage: + *

* * * The Conversion annotation must be applied at Type level. * * - *

Annotation parameters: + *

Annotation parameters:

* * * @@ -54,7 +56,7 @@ import java.lang.annotation.Target; *
* * - *

Example code: + *

Example code:

* *
  * 
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java b/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java
index d54bd2f85..d7037bfae 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/annotations/TypeConversion.java
@@ -22,27 +22,29 @@ import java.lang.annotation.Target;
 
 /**
  * 
- * 

This annotation is used for class and application wide conversion rules. + *

This annotation is used for class and application wide conversion rules.

+ * *

* Class wide conversion:
* The conversion rules will be assembled in a file called XXXAction-conversion.properties * within the same package as the related action class. * Set type to: type = ConversionType.CLASS *

+ * *

- * Allication wide conversion:
+ * Application wide conversion:
* The conversion rules will be assembled within the xwork-conversion.properties file within the classpath root. * Set type to: type = ConversionType.APPLICATION - *

+ *

* * - *

Annotation usage: + *

Annotation usage:

* * * The TypeConversion annotation can be applied at property and method level. * * - *

Annotation parameters: + *

Annotation parameters:

* * * @@ -90,7 +92,7 @@ import java.lang.annotation.Target; * * * - *

Example code: + *

Example code:

* *
  * 
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
index 3b35102c0..1b77f7c5a 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
@@ -44,8 +44,8 @@ import java.util.Map;
  * Maps, both the key and the value may be specified by using the pattern Key_xxx and Element_xxx,
  * respectively.
  *
- * 

From WebWork 2.1.x, the Collection_xxx format is still supported and honored, although it is deprecated - * and will be removed eventually. + *

From WebWork 2.1.x, the Collection_xxx format is still supported and honored, although it is deprecated + * and will be removed eventually.

* * * diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverterHolder.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverterHolder.java index 2acaf96ac..c05ed8f30 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverterHolder.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultTypeConverterHolder.java @@ -50,7 +50,7 @@ public class DefaultTypeConverterHolder implements TypeConverterHolder { /** * Record classes that doesn't have conversion mapping defined. *
-     * - String -> classname as String
+     * - String -> classname as String
      * 
*/ protected HashSet unknownMappings = new HashSet<>(); // non-action (eg. returned value) diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java index 4f749ef48..308d5e1b1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/InstantiatingNullHandler.java @@ -36,7 +36,7 @@ import java.util.*; * that have caused a NullPointerException will be temporarily stopped for evaluation while the system automatically * tries to solve the null references by automatically creating the object. * - *

The following rules are used when handling null references: + *

The following rules are used when handling null references:

* *
    * diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java index 69e78b7ea..8f4a74b82 100644 --- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java +++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/XWorkBasicConverter.java @@ -30,10 +30,11 @@ import java.util.Map; /** * - *

    + *

    * XWork will automatically handle the most common type conversion for you. This includes support for converting to * and from Strings for each of the following: - *

    + *

    + * *
      *
    • String
    • *
    • boolean / Boolean
    • @@ -44,9 +45,12 @@ import java.util.Map; *
    • collections - if not object type can be determined, it is assumed to be a String and a new ArrayList is * created
    • *
    - *

    Note that with arrays the type conversion will defer to the type of the array elements and try to convert each + * + *

    Note that with arrays the type conversion will defer to the type of the array elements and try to convert each * item individually. As with any other type conversion, if the conversion can't be performed the standard type * conversion error reporting is used to indicate a problem occurred while processing the type conversion. + *

    + * * * * @author Pat Lightbody 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 c0086eec8..1c84b3131 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 @@ -40,74 +40,85 @@ import java.util.regex.Pattern; /** - * XWorkConverter is a singleton used by many of the Struts 2's Ognl extention points, + *

    + * XWorkConverter is a singleton used by many of the Struts 2's Ognl extension points, * such as InstantiatingNullHandler, XWorkListPropertyAccessor etc to do object * conversion. - *

    + *

    + * * - *

    + * + *

    * Type conversion is great for situations where you need to turn a String in to a more complex object. Because the web * is type-agnostic (everything is a string in HTTP), Struts 2's type conversion features are very useful. For instance, * if you were prompting a user to enter in coordinates in the form of a string (such as "3, 22"), you could have * Struts 2 do the conversion both from String to Point and from Point to String. - *

    - *

    Using this "point" example, if your action (or another compound object in which you are setting properties on) + *

    + * + *

    + * Using this "point" example, if your action (or another compound object in which you are setting properties on) * has a corresponding ClassName-conversion.properties file, Struts 2 will use the configured type converters for * conversion to and from strings. So turning "3, 22" in to new Point(3, 22) is done by merely adding the following * entry to ClassName-conversion.properties (Note that the PointConverter should impl the TypeConverter * interface): - *

    - *

    point = com.acme.PointConverter - *

    - *

    Your type converter should be sure to check what class type it is being requested to convert. Because it is used + *

    + *

    point = com.acme.PointConverter

    + * + *

    + * Your type converter should be sure to check what class type it is being requested to convert. Because it is used * for both to and from strings, you will need to split the conversion method in to two parts: one that turns Strings in * to Points, and one that turns Points in to Strings. - *

    - *

    After this is done, you can now reference your point (using <s:property value="point"/> in JSP or ${point} + *

    + * + *

    + * After this is done, you can now reference your point (using <s:property value="point"/> in JSP or ${point} * in FreeMarker) and it will be printed as "3, 22" again. As such, if you submit this back to an action, it will be * converted back to a Point once again. - *

    - *

    In some situations you may wish to apply a type converter globally. This can be done by editing the file + *

    + * + *

    + * In some situations you may wish to apply a type converter globally. This can be done by editing the file * xwork-conversion.properties in the root of your class path (typically WEB-INF/classes) and providing a * property in the form of the class name of the object you wish to convert on the left hand side and the class name of * the type converter on the right hand side. For example, providing a type converter for all Point objects would mean * adding the following entry: - *

    - *

    com.acme.Point = com.acme.PointConverter - *

    + *

    + * + *

    com.acme.Point = com.acme.PointConverter

    + * * - *

    - *

    - *

    + * + * * - *

    + *

    * Type conversion should not be used as a substitute for i18n. It is not recommended to use this feature to print out * properly formatted dates. Rather, you should use the i18n features of Struts 2 (and consult the JavaDocs for JDK's * MessageFormat object) to see how a properly formatted date should be displayed. - *

    + *

    * - *

    - *

    - *

    + * + * * - *

    + *

    * Any error that occurs during type conversion may or may not wish to be reported. For example, reporting that the - * input "abc" could not be converted to a number might be important. On the other hand, reporting that an empty string, - * "", cannot be converted to a number might not be important - especially in a web environment where it is hard to + * input "abc" could not be converted to a number might be important. On the other hand, reporting that an empty string, + * "", cannot be converted to a number might not be important - especially in a web environment where it is hard to * distinguish between a user not entering a value vs. entering a blank value. - *

    - *

    By default, all conversion errors are reported using the generic i18n key xwork.default.invalid.fieldvalue, + *

    + *

    By default, all conversion errors are reported using the generic i18n key xwork.default.invalid.fieldvalue, * which you can override (the default text is Invalid field value for field "xxx", where xxx is the field name) * in your global i18n resource bundle. - *

    - *

    However, sometimes you may wish to override this message on a per-field basis. You can do this by adding an i18n + *

    + * + *

    However, sometimes you may wish to override this message on a per-field basis. You can do this by adding an i18n * key associated with just your action (Action.properties) using the pattern invalid.fieldvalue.xxx, where xxx * is the field name. - *

    - *

    It is important to know that none of these errors are actually reported directly. Rather, they are added to a map + *

    + * + *

    It is important to know that none of these errors are actually reported directly. Rather, they are added to a map * called conversionErrors in the ActionContext. There are several ways this map can then be accessed and the * errors can be reported accordingly. - *

    + *

    * * * @author Pat Lightbody 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 340dc849d..eeece953f 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 @@ -70,7 +70,7 @@ public class ConversionDescription { /** *

    - * Sets the property name to be inserted into the related conversion.properties file.
    + * Sets the property name to be inserted into the related conversion.properties file.
    * Note: Do not add COLLECTION_PREFIX or MAP_PREFIX keys to property names. *

    * @@ -91,7 +91,7 @@ public class ConversionDescription { /** * Sets the rule prefix for COLLECTION_PREFIX or MAP_PREFIX key. - * Defaults to en emtpy String. + * Defaults to en empty String. * * @param rule */ @@ -131,9 +131,9 @@ public class ConversionDescription { /** * Returns the conversion description as property entry. *

    - * Example:
    - * property.name = converter.className
    - * Collection_property.name = converter.className
    + * Example:
    + * property.name = converter.className
    + * Collection_property.name = converter.className
    * Map_property.name = converter.className * KeyProperty_name = id *

    diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java b/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java index c37f6c7a3..ccc1e1061 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java +++ b/core/src/main/java/com/opensymphony/xwork2/inject/ContainerBuilder.java @@ -25,7 +25,7 @@ import java.util.logging.Logger; * dependency type and name uniquely identifies a dependency mapping; you can * use the same name for two different types. Not safe for concurrent use. * - *

    Adds the following factories by default: + *

    Adds the following factories by default:

    * *
      *
    • Injects the current {@link Container}. diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java index 08d7c4922..c79176b6d 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java +++ b/core/src/main/java/com/opensymphony/xwork2/inject/Scope.java @@ -1,17 +1,18 @@ /** * Copyright (C) 2006 Google Inc. - *

      + *

      * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *

      + *

      * http://www.apache.org/licenses/LICENSE-2.0 - *

      + *

      * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. + *

      */ package com.opensymphony.xwork2.inject; diff --git a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java b/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java index 9ebf54558..964b7279c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java +++ b/core/src/main/java/com/opensymphony/xwork2/inject/util/ReferenceCache.java @@ -95,10 +95,11 @@ public abstract class ReferenceCache extends ReferenceMap { /** * {@inheritDoc} - *

      + *

      * If this map does not contain an entry for the given key and {@link * #create(Object)} has been overridden, this method will create a new * value, put it in the map, and return it. + *

      * * @throws NullPointerException if {@link #create(Object)} returns null. * @throws java.util.concurrent.CancellationException if the creation is diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java index 45e9992d8..77f4a8b40 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java @@ -461,9 +461,10 @@ public class OgnlUtil { /** * Creates a Map with read properties for the given source object. - *

      + *

      * If the source object does not have a read property (i.e. write-only) then * the property is added to the map with the value here is no read method for property-name. + *

      * * @param source the source object. * @return a Map with (key = read property name, value = value of read property). diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java index 714acf714..f9f12719c 100644 --- a/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java +++ b/core/src/main/java/com/opensymphony/xwork2/ognl/accessor/ObjectProxyPropertyAccessor.java @@ -27,8 +27,9 @@ import java.util.Map; /** * Is able to access (set/get) properties on a given object. - *

      + *

      * Uses Ognl internal. + *

      * * @author Gabe */ diff --git a/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java b/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java index b59bceedb..3bfe0ff9b 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java +++ b/core/src/main/java/com/opensymphony/xwork2/util/ValueStack.java @@ -44,9 +44,10 @@ public interface ValueStack { public abstract void setDefaultType(Class defaultType); /** - * Set a override map containing key -> values that takes precedent when doing find operations on the ValueStack. - *

      + * Set a override map containing key -> values that takes precedent when doing find operations on the ValueStack. + *

      * See the unit test for ValueStackTest for examples. + *

      * * @param overrides overrides map. */ diff --git a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java b/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java index c48292f8e..5e40fd3d1 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java +++ b/core/src/main/java/com/opensymphony/xwork2/util/reflection/ReflectionProvider.java @@ -98,10 +98,11 @@ public interface ReflectionProvider { /** * Creates a Map with read properties for the given source object. - *

      + *

      * If the source object does not have a read property (i.e. write-only) then * the property is added to the map with the value here is no read method for property-name. - * + *

      + * * @param source the source object. * @return a Map with (key = read property name, value = value of read property). * @throws IntrospectionException is thrown if an exception occurs during introspection.