diff --git a/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java b/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java index 0b078eb736..1992b13ce2 100644 --- a/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/AbstractConfiguration.java @@ -78,7 +78,7 @@ * {@link org.apache.commons.configuration2.convert.DefaultListDelimiterHandler DefaultListDelimiterHandler} configured * with the desired list delimiter character. *
  • Allows specifying how missing properties are treated. Per default the get methods returning an object will return - * null if the searched property key is not found (and no default value is provided). With the + * null if the searched property key is not found (and no default value is provided). With the * {@code setThrowExceptionOnMissing()} method this behavior can be changed to throw an exception when a requested * property cannot be found.
  • *
  • Basic event support. Whenever this configuration is modified registered event listeners are notified. Refer to @@ -115,14 +115,14 @@ private static void checkDefaultValueArray(final Class cls, final Object defa } /** - * Checks whether the specified value is null and throws an exception in this case. This method is used by - * conversion methods returning primitive Java types. Here values to be returned must not be null. + * Checks whether the specified value is null and throws an exception in this case. This method is used by + * conversion methods returning primitive Java types. Here values to be returned must not be null. * * @param the type of the object to be checked * @param key the key which caused the problem * @param value the value to be checked * @return the passed in value for chaining this method call - * @throws NoSuchElementException if the value is null + * @throws NoSuchElementException if the value is null */ private static T checkNonNullValue(final String key, final T value) { if (value == null) { @@ -137,7 +137,7 @@ private static T checkNonNullValue(final String key, final T value) { * * @param ci the {@code ConfigurationInterpolator} in question * @param targetConf the target configuration of the searched lookup - * @return the found {@code Lookup} object or null + * @return the found {@code Lookup} object or null */ private static Lookup findConfigurationLookup(final ConfigurationInterpolator ci, final ImmutableConfiguration targetConf) { for (final Lookup l : ci.getDefaultLookups()) { @@ -150,7 +150,7 @@ private static Lookup findConfigurationLookup(final ConfigurationInterpolator ci /** * Handles the default collection for a collection conversion. This method fills the target collection with the content - * of the default collection. Both collections may be null. + * of the default collection. Both collections may be null. * * @param target the target collection * @param defaultValue the default collection @@ -264,7 +264,7 @@ protected void addPropertyInternal(final String key, final Object value) { * structure (i.e. the parent-child-relationships will get lost). So when dealing with hierarchical configuration * objects their {@link BaseHierarchicalConfiguration#clone() clone()} methods should be used. * - * @param configuration the configuration to be appended (can be null, then this operation will have no effect) + * @param configuration the configuration to be appended (can be null, then this operation will have no effect) * @since 1.5 */ public void append(final Configuration configuration) { @@ -434,7 +434,7 @@ public final boolean containsKey(final String key) { * {@code containsKey()}. It has to be defined by concrete subclasses. * * @param key the key in question - * @return true if this key is contained in this configuration, false otherwise + * @return true if this key is contained in this configuration, false otherwise * @since 2.0 */ protected abstract boolean containsKeyInternal(String key); @@ -495,7 +495,7 @@ private T convert(final Class cls, final String key, final T defValue, fi /** * Performs a conversion to an array result class. This implementation delegates to the {@link ConversionHandler} to - * perform the actual type conversion. If this results in a null result (because the property is undefined), the + * perform the actual type conversion. If this results in a null result (because the property is undefined), the * default value is returned. It is checked whether the default value is an array with the correct component type. If * not, an exception is thrown. * @@ -518,7 +518,7 @@ private Object convertToArray(final Class cls, final String key, final Object * hierarchical configuration objects their {@link BaseHierarchicalConfiguration#clone() clone()} methods should be * used. * - * @param configuration the configuration to copy (can be null, then this operation will have no effect) + * @param configuration the configuration to copy (can be null, then this operation will have no effect) * @since 1.5 */ public void copy(final Configuration configuration) { @@ -588,7 +588,7 @@ protected void endWrite() { * this configuration. * * @param ci the {@code ConfigurationInterpolator} in question - * @return the found {@code Lookup} object or null + * @return the found {@code Lookup} object or null */ private Lookup findConfigurationLookup(final ConfigurationInterpolator ci) { return findConfigurationLookup(ci, this); @@ -635,7 +635,7 @@ public Object getArray(final Class cls, final String key) { /** * {@inheritDoc} This implementation delegates to the {@link ConversionHandler} to perform the actual type conversion. - * If this results in a null result (because the property is undefined), the default value is returned. It is + * If this results in a null result (because the property is undefined), the default value is returned. It is * checked whether the default value is an array with the correct component type. If not, an exception is thrown. * * @throws IllegalArgumentException if the default value is not a compatible array @@ -1137,7 +1137,7 @@ public String[] getStringArray(final String key) { /** * Gets the object responsible for synchronizing this configuration. All access to this configuration - both read and - * write access - is controlled by this object. This implementation never returns null. If no + * write access - is controlled by this object. This implementation never returns null. If no * {@code Synchronizer} has been set, a {@link NoOpSynchronizer} is returned. So, per default, instances of * {@code AbstractConfiguration} are not thread-safe unless a suitable {@code Synchronizer} is set! * @@ -1155,7 +1155,7 @@ public ImmutableConfiguration immutableSubset(final String prefix) { } /** - * Initializes the logger. Supports null input. This method can be called by derived classes in order to enable + * Initializes the logger. Supports null input. This method can be called by derived classes in order to enable * logging. * * @param log the logger @@ -1245,16 +1245,16 @@ public final boolean isEmpty() { * Actually checks whether this configuration contains data. This method is called by {@code isEmpty()}. It has to be * defined by concrete subclasses. * - * @return true if this configuration contains no data, false otherwise + * @return true if this configuration contains no data, false otherwise * @since 2.0 */ protected abstract boolean isEmptyInternal(); /** * Checks whether the specified object is a scalar value. This method is called by {@code getList()} and - * {@code getStringArray()} if the property requested is not a string, a list, or an array. If it returns true, + * {@code getStringArray()} if the property requested is not a string, a list, or an array. If it returns true, * the calling method transforms the value to a string and returns a list or an array with this single element. This - * implementation returns true if the value is of a wrapper type for a primitive type. + * implementation returns true if the value is of a wrapper type for a primitive type. * * @param value the value to be checked * @return a flag whether the value is a scalar @@ -1279,7 +1279,7 @@ public boolean isThrowExceptionOnMissing() { * configuration is locked. * * @since 2.0 - * @throws NullPointerException if the argument is null + * @throws NullPointerException if the argument is null */ @Override public final void lock(final LockMode mode) { @@ -1312,8 +1312,8 @@ public void setConfigurationDecoder(final ConfigurationDecoder configurationDeco * newly created configuration uses a default {@code ConversionHandler} implementation. This can be changed while * initializing the configuration (e.g. via a builder). Note that access to this property is not synchronized. * - * @param conversionHandler the {@code ConversionHandler} to be used (must not be null) - * @throws IllegalArgumentException if the {@code ConversionHandler} is null + * @param conversionHandler the {@code ConversionHandler} to be used (must not be null) + * @throws IllegalArgumentException if the {@code ConversionHandler} is null * @since 2.0 */ public void setConversionHandler(final ConversionHandler conversionHandler) { @@ -1353,7 +1353,7 @@ public void setDefaultLookups(final Collection lookups) { } /** - * {@inheritDoc} This implementation sets the passed in object without further modifications. A null argument is + * {@inheritDoc} This implementation sets the passed in object without further modifications. A null argument is * allowed; this disables interpolation. * * @since 2.0 @@ -1378,8 +1378,8 @@ public final void setInterpolator(final ConfigurationInterpolator ci) { * exceptions. *

    * - * @param listDelimiterHandler the {@code ListDelimiterHandler} to be used (must not be null) - * @throws IllegalArgumentException if the {@code ListDelimiterHandler} is null + * @param listDelimiterHandler the {@code ListDelimiterHandler} to be used (must not be null) + * @throws IllegalArgumentException if the {@code ListDelimiterHandler} is null * @since 2.0 */ public void setListDelimiterHandler(final ListDelimiterHandler listDelimiterHandler) { @@ -1393,7 +1393,7 @@ public void setListDelimiterHandler(final ListDelimiterHandler listDelimiterHand * Allows setting the logger to be used by this configuration object. This method makes it possible for clients to * exactly control logging behavior. Per default a logger is set that will ignore all log messages. Derived classes that * want to enable logging should call this method during their initialization with the logger to be used. It is legal to - * pass a null logger; in this case, logging will be disabled. + * pass a null logger; in this case, logging will be disabled. * * @param log the new logger * @since 2.0 @@ -1429,7 +1429,7 @@ public void setParentInterpolator(final ConfigurationInterpolator parent) { * should better call {@link #installInterpolator(Map, Collection)} to define the {@code ConfigurationInterpolator} in a * single step. * - * @param lookups a map with new {@code Lookup} objects and their prefixes (may be null) + * @param lookups a map with new {@code Lookup} objects and their prefixes (may be null) * @since 2.0 */ public void setPrefixLookups(final Map lookups) { @@ -1476,7 +1476,7 @@ protected void setPropertyInternal(final String key, final Object value) { * Sets the object responsible for synchronizing this configuration. This method has to be called with a suitable * {@code Synchronizer} object when initializing this configuration instance in order to make it thread-safe. * - * @param synchronizer the new {@code Synchronizer}; can be null, then this instance uses a + * @param synchronizer the new {@code Synchronizer}; can be null, then this instance uses a * {@link NoOpSynchronizer} * @since 2.0 */ @@ -1487,8 +1487,8 @@ public final void setSynchronizer(final Synchronizer synchronizer) { /** * Allows to set the {@code throwExceptionOnMissing} flag. This flag controls the behavior of property getter methods - * that return objects if the requested property is missing. If the flag is set to false (which is the default - * value), these methods will return null. If set to true, they will throw a + * that return objects if the requested property is missing. If the flag is set to false (which is the default + * value), these methods will return null. If set to true, they will throw a * {@code NoSuchElementException} exception. Note that getter methods for primitive data types are not affected by this * flag. * @@ -1567,7 +1567,7 @@ void syncWrite(final FailableRunnable runnable, final b * {@code LockMode} argument. Subclasses can override these protected methods to perform additional steps when a * configuration's lock is released. * - * @throws NullPointerException if the argument is null + * @throws NullPointerException if the argument is null */ @Override public final void unlock(final LockMode mode) { diff --git a/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java b/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java index 6e34434d5a..3b25df97af 100644 --- a/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java @@ -291,7 +291,7 @@ protected AbstractHierarchicalConfiguration(final NodeModel nodeModel) { * hierarchy. Implementation node: This method performs some book-keeping and then delegates to * {@code addNodesInternal()}. * - * @param key the key where the nodes are to be added; can be null, then they are added to the root node + * @param key the key where the nodes are to be added; can be null, then they are added to the root node * @param nodes a collection with the {@code Node} objects to be added */ @Override @@ -310,7 +310,7 @@ public final void addNodes(final String key, final Collection nodes * Actually adds a collection of new nodes to this configuration. This method is called by {@code addNodes()}. It can be * overridden by subclasses that need to adapt this operation. * - * @param key the key where the nodes are to be added; can be null, then they are added to the root node + * @param key the key where the nodes are to be added; can be null, then they are added to the root node * @param nodes a collection with the {@code Node} objects to be added * @since 2.0 */ @@ -436,7 +436,7 @@ public Object clone() { /** * Checks if the specified key is contained in this configuration. Note that for this configuration the term * "contained" means that the key has an associated value. If there is a node for this key that has no value - * but children (either defined or undefined), this method will still return false . + * but children (either defined or undefined), this method will still return false . * * @param key the key to be checked * @return a flag if this key is contained in this configuration @@ -468,7 +468,7 @@ protected List> fetchNodeList(final String key) { } /** - * Gets the expression engine used by this configuration. This method will never return null; if no specific + * Gets the expression engine used by this configuration. This method will never return null; if no specific * expression engine was set, the default expression engine will be returned. * * @return the current expression engine @@ -729,7 +729,7 @@ public NodeUpdateData resolveUpdateKey(final T root, final String key, final * Sets the expression engine to be used by this configuration. All property keys this configuration has to deal with * will be interpreted by this engine. * - * @param expressionEngine the new expression engine; can be null, then the default expression engine will be + * @param expressionEngine the new expression engine; can be null, then the default expression engine will be * used * @since 1.3 */ @@ -769,7 +769,7 @@ public String toString() { * * @param result the {@code QueryResult} * @param handler the {@code NodeHandler} - * @return the value of this result (may be null) + * @return the value of this result (may be null) */ private Object valueFromResult(final QueryResult result, final NodeHandler handler) { return result.isAttributeResult() ? result.getAttributeValue(handler) : handler.getValue(result.getNode()); diff --git a/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java b/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java index 75bbd17781..51fdbdce6e 100644 --- a/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/BaseHierarchicalConfiguration.java @@ -69,9 +69,9 @@ protected abstract static class BuilderVisitor extends ConfigurationNodeVisitorA * * @param newNode the node to be inserted * @param parent the parent node - * @param sibling1 the sibling after which the node is to be inserted; can be null if the new node is going to be + * @param sibling1 the sibling after which the node is to be inserted; can be null if the new node is going to be * the first child node - * @param sibling2 the sibling before which the node is to be inserted; can be null if the new node is going to + * @param sibling2 the sibling before which the node is to be inserted; can be null if the new node is going to * be the last child node * @param refHandler the {@code ReferenceNodeHandler} */ @@ -362,7 +362,7 @@ public BaseHierarchicalConfiguration() { * Creates a new instance of {@code BaseHierarchicalConfiguration} and copies all data contained in the specified * configuration into the new one. * - * @param c the configuration that is to be copied (if null, this constructor will behave like the standard + * @param c the configuration that is to be copied (if null, this constructor will behave like the standard * constructor) * @since 1.4 */ @@ -419,7 +419,7 @@ protected NodeModel cloneNodeModel() { /** * {@inheritDoc} This is a short form for {@code configurationAt(key, - * false)}. + * false)}. * * @throws ConfigurationRuntimeException if the key does not select a single node */ @@ -429,11 +429,11 @@ public HierarchicalConfiguration configurationAt(final String key } /** - * {@inheritDoc} The result of this implementation depends on the {@code supportUpdates} flag: If it is false, a + * {@inheritDoc} The result of this implementation depends on the {@code supportUpdates} flag: If it is false, a * plain {@code BaseHierarchicalConfiguration} is returned using the selected node as root node. This is suitable for * read-only access to properties. Because the configuration returned in this case is not connected to the parent * configuration, updates on properties made by one configuration are not reflected by the other one. A value of - * true for this parameter causes a tracked node to be created, and result is a {@link SubnodeConfiguration} + * true for this parameter causes a tracked node to be created, and result is a {@link SubnodeConfiguration} * based on this tracked node. This configuration is really connected to its parent, so that updated properties are * visible on both. * diff --git a/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java b/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java index 6f10b17dd4..433f78cbfd 100644 --- a/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/CombinedConfiguration.java @@ -109,7 +109,7 @@ * cc.clearProperty("gui.background"); * * - * Will a {@code cc.containsKey("gui.background")} now return false? No, it won't! The {@code clearProperty()} + * Will a {@code cc.containsKey("gui.background")} now return false? No, it won't! The {@code clearProperty()} * operation is executed on the node set of the combined configuration, which was constructed from the nodes of the two * child configurations. It causes the value of the background node to be cleared, which is also part of the * first child configuration. This modification of one of its child configurations causes the @@ -355,7 +355,7 @@ public CombinedConfiguration() { /** * Creates a new instance of {@code CombinedConfiguration} and initializes the combiner to be used. * - * @param comb the node combiner (can be null, then a union combiner is used as default) + * @param comb the node combiner (can be null, then a union combiner is used as default) */ public CombinedConfiguration(final NodeCombiner comb) { nodeCombiner = comb != null ? comb : DEFAULT_COMBINER; @@ -366,7 +366,7 @@ public CombinedConfiguration(final NodeCombiner comb) { * Adds a new configuration to this combined configuration. The new configuration is not given a name. Its properties * will be added under the root of the combined node structure. * - * @param config the configuration to add (must not be null) + * @param config the configuration to add (must not be null) */ public void addConfiguration(final Configuration config) { addConfiguration(config, null, null); @@ -376,8 +376,8 @@ public void addConfiguration(final Configuration config) { * Adds a new configuration to this combined configuration with an optional name. The new configuration's properties * will be added under the root of the combined node structure. * - * @param config the configuration to add (must not be null) - * @param name the name of this configuration (can be null) + * @param config the configuration to add (must not be null) + * @param name the name of this configuration (can be null) */ public void addConfiguration(final Configuration config, final String name) { addConfiguration(config, name, null); @@ -391,9 +391,9 @@ public void addConfiguration(final Configuration config, final String name) { * expression engine). For instance if you pass in the string {@code "database.tables"}, all properties of the added * configuration will occur in this branch. * - * @param config the configuration to add (must not be null) - * @param name the name of this configuration (can be null) - * @param at the position of this configuration in the combined tree (can be null) + * @param config the configuration to add (must not be null) + * @param name the name of this configuration (can be null) + * @param at the position of this configuration in the combined tree (can be null) */ public void addConfiguration(final Configuration config, final String name, final String at) { if (config == null) { @@ -570,7 +570,7 @@ public Configuration getConfiguration(final int index) { } /** - * Gets the configuration with the given name. This can be null if no such configuration exists. + * Gets the configuration with the given name. This can be null if no such configuration exists. * * @param name the name of the configuration * @return the configuration with this name @@ -604,7 +604,7 @@ public List getConfigurationNameList() { * Gets a set with the names of all configurations contained in this combined configuration. Of course here are only * these configurations listed, for which a name was specified when they were added. * - * @return a set with the names of the contained configurations (never null) + * @return a set with the names of the contained configurations (never null) */ public Set getConfigurationNames() { beginRead(true); @@ -687,7 +687,7 @@ private int getNumberOfConfigurationsInternal() { * Gets the configuration source, in which the specified key is defined. This method will determine the configuration * node that is identified by the given key. The following constellations are possible: *
      - *
    • If no node object is found for this key, null is returned.
    • + *
    • If no node object is found for this key, null is returned.
    • *
    • If the key maps to multiple nodes belonging to different configuration sources, a * {@code IllegalArgumentException} is thrown (in this case no unique source can be determined).
    • *
    • If exactly one node is found for the key, the (child) configuration object, to which the node belongs is @@ -697,9 +697,9 @@ private int getNumberOfConfigurationsInternal() { *
    * * @param key the key of a configuration property - * @return the configuration, to which this property belongs or null if the key cannot be resolved + * @return the configuration, to which this property belongs or null if the key cannot be resolved * @throws IllegalArgumentException if the key maps to multiple properties and the source cannot be determined, or if - * the key is null + * the key is null * @since 1.5 */ public Configuration getSource(final String key) { @@ -842,7 +842,7 @@ public boolean removeConfiguration(final Configuration config) { * Removes the configuration with the specified name. * * @param name the name of the configuration to be removed - * @return the removed configuration (null if this configuration was not found) + * @return the removed configuration (null if this configuration was not found) */ public Configuration removeConfiguration(final String name) { final Configuration conf = getConfiguration(name); @@ -891,7 +891,7 @@ public void setConversionExpressionEngine(final ExpressionEngine conversionExpre /** * Sets the node combiner. This object will be used when the combined node structure is to be constructed. It must not - * be null, otherwise an {@code IllegalArgumentException} exception is thrown. Changing the node combiner causes + * be null, otherwise an {@code IllegalArgumentException} exception is thrown. Changing the node combiner causes * an invalidation of this combined configuration, so that the new combiner immediately takes effect. * * @param nodeCombiner the node combiner diff --git a/src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java b/src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java index 66cb97487d..b349e7be0e 100644 --- a/src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/CompositeConfiguration.java @@ -95,7 +95,7 @@ public CompositeConfiguration(final Collection configur * Creates a CompositeConfiguration object with a specified in-memory configuration. This configuration will * store any changes made to the {@code CompositeConfiguration}. Note: Use this constructor if you want to set a special * type of in-memory configuration. If you have a configuration which should act as both a child configuration and as - * in-memory configuration, use {@link #addConfiguration(Configuration, boolean)} with a value of true instead. + * in-memory configuration, use {@link #addConfiguration(Configuration, boolean)} with a value of true instead. * * @param inMemoryConfiguration the in memory configuration to use */ @@ -137,7 +137,7 @@ public void addConfiguration(final Configuration config) { * its role as in-memory configuration to the new one. * * @param config the configuration to be added - * @param asInMemory true if this configuration becomes the new in-memory configuration, false + * @param asInMemory true if this configuration becomes the new in-memory configuration, false * otherwise * @since 1.8 */ @@ -184,7 +184,7 @@ public void addConfigurationFirst(final Configuration config) { * configurations at its current position, but it passes its role as in-memory configuration to the new one. * * @param config the configuration to be added - * @param asInMemory true if this configuration becomes the new in-memory configuration, false + * @param asInMemory true if this configuration becomes the new in-memory configuration, false * otherwise * @since 2.3 */ @@ -397,8 +397,8 @@ protected Object getPropertyInternal(final String key) { *
      *
    • If exactly one child configuration contains the key, this configuration is returned as the source configuration. * This may be the in memory configuration (this has to be explicitly checked by the calling application).
    • - *
    • If none of the child configurations contain the key, null is returned.
    • - *
    • If the key is contained in multiple child configurations or if the key is null, a + *
    • If none of the child configurations contain the key, null is returned.
    • + *
    • If the key is contained in multiple child configurations or if the key is null, a * {@code IllegalArgumentException} is thrown. In this case the source configuration cannot be determined.
    • *
    * diff --git a/src/main/java/org/apache/commons/configuration2/Configuration.java b/src/main/java/org/apache/commons/configuration2/Configuration.java index 76e4fe11d3..18dbf6e982 100644 --- a/src/main/java/org/apache/commons/configuration2/Configuration.java +++ b/src/main/java/org/apache/commons/configuration2/Configuration.java @@ -39,7 +39,7 @@ * will be returned if the queried property cannot be found in the configuration. The behavior of the methods that do * not take a default value in case of a missing property is not defined by this interface and depends on a concrete * implementation. E.g. the {@link AbstractConfiguration} class, which is the base class of most configuration - * implementations provided by this package, per default returns null if a property is not found, but provides + * implementations provided by this package, per default returns null if a property is not found, but provides * the {@link AbstractConfiguration#setThrowExceptionOnMissing(boolean) setThrowExceptionOnMissing()} method, with which * it can be configured to throw a {@code NoSuchElementException} exception in that case. (Note that getter methods for * primitive types in {@code AbstractConfiguration} always throw an exception for missing properties because there is no @@ -93,7 +93,7 @@ public interface Configuration extends ImmutableConfiguration, SynchronizerSuppo * Gets the {@code ConfigurationInterpolator} object used by this {@code Configuration}. This object is responsible * for variable substitution. * - * @return the {@code ConfigurationInterpolator} (can be null) + * @return the {@code ConfigurationInterpolator} (can be null) */ ConfigurationInterpolator getInterpolator(); @@ -105,8 +105,8 @@ public interface Configuration extends ImmutableConfiguration, SynchronizerSuppo * to the {@link #setInterpolator(ConfigurationInterpolator)} method which sets the passed in object as is without * adding this special lookup. * - * @param prefixLookups the map with {@code Lookup} objects associated with specific prefixes (can be null) - * @param defLookups a collection with default {@code Lookup} objects (can be null) + * @param prefixLookups the map with {@code Lookup} objects associated with specific prefixes (can be null) + * @param defLookups a collection with default {@code Lookup} objects (can be null) * @see ConfigurationInterpolator */ void installInterpolator(Map prefixLookups, Collection defLookups); @@ -114,7 +114,7 @@ public interface Configuration extends ImmutableConfiguration, SynchronizerSuppo /** * Sets the {@code ConfigurationInterpolator} object to be used by this {@code Configuration}. This object is invoked * for each access of a string property in order to substitute variables which may be contained. The argument can be - * null to disable interpolation at all. + * null to disable interpolation at all. * * @param ci the new {@code ConfigurationInterpolator} */ diff --git a/src/main/java/org/apache/commons/configuration2/ConfigurationDecoder.java b/src/main/java/org/apache/commons/configuration2/ConfigurationDecoder.java index 07eb50d307..558233a5b4 100644 --- a/src/main/java/org/apache/commons/configuration2/ConfigurationDecoder.java +++ b/src/main/java/org/apache/commons/configuration2/ConfigurationDecoder.java @@ -39,7 +39,7 @@ public interface ConfigurationDecoder { * implementation has to be perform an appropriate decoding and return the result. This result is passed to the calling * application; so it should be in a readable form. * - * @param s the string to be decoded (not null) + * @param s the string to be decoded (not null) * @return the decoded string */ String decode(String s); diff --git a/src/main/java/org/apache/commons/configuration2/ConfigurationLookup.java b/src/main/java/org/apache/commons/configuration2/ConfigurationLookup.java index c88d1e744c..2895549fff 100644 --- a/src/main/java/org/apache/commons/configuration2/ConfigurationLookup.java +++ b/src/main/java/org/apache/commons/configuration2/ConfigurationLookup.java @@ -38,8 +38,8 @@ public class ConfigurationLookup implements Lookup { /** * Creates a new instance of {@code ConfigurationLookup} and sets the associated {@code ImmutableConfiguration}. * - * @param config the configuration to use for lookups (must not be null) - * @throws IllegalArgumentException if the configuration is null + * @param config the configuration to use for lookups (must not be null) + * @throws IllegalArgumentException if the configuration is null */ public ConfigurationLookup(final ImmutableConfiguration config) { if (config == null) { diff --git a/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java b/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java index f086cf2ae5..85c8753d1b 100644 --- a/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java +++ b/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java @@ -180,7 +180,7 @@ public Configuration getConfiguration() { * * @param key the key (will be converted to a string) * @param value the value - * @return the old value of this key or null if it is new + * @return the old value of this key or null if it is new * @see java.util.Map#put(Object, Object) */ @Override diff --git a/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java b/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java index 2b5d9458a2..96f2e1df0b 100644 --- a/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java +++ b/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java @@ -115,15 +115,15 @@ public static void append(final ImmutableConfiguration source, final Configurati /** * Casts the specified object to an {@code EventSource} if possible. The boolean argument determines the method's - * behavior if the object does not implement the {@code EventSource} event: if set to false, a - * {@code ConfigurationRuntimeException} is thrown; if set to true, a dummy {@code EventSource} is returned; on + * behavior if the object does not implement the {@code EventSource} event: if set to false, a + * {@code ConfigurationRuntimeException} is thrown; if set to true, a dummy {@code EventSource} is returned; on * this object all methods can be called, but they do not have any effect. * * @param obj the object to be cast as {@code EventSource} * @param mockIfUnsupported a flag whether a mock object should be returned if necessary * @return an {@code EventSource} * @throws ConfigurationRuntimeException if the object cannot be cast to {@code EventSource} and the mock flag is - * false + * false * @since 2.0 */ public static EventSource asEventSource(final Object obj, final boolean mockIfUnsupported) { @@ -165,8 +165,8 @@ static Object clone(final Object obj) throws CloneNotSupportedException { * Clones the given configuration object if this is possible. If the passed in configuration object implements the * {@code Cloneable} interface, its {@code clone()} method will be invoked. Otherwise an exception will be thrown. * - * @param config the configuration object to be cloned (can be null) - * @return the cloned configuration (null if the argument was null, too) + * @param config the configuration object to be cloned (can be null) + * @return the cloned configuration (null if the argument was null, too) * @throws ConfigurationRuntimeException if cloning is not supported for this object * @since 1.3 */ @@ -213,7 +213,7 @@ public static Object cloneIfPossible(final Object obj) { * @param sync the {@code Synchronizer} object to be cloned * @return the clone of this {@code Synchronizer} * @throws ConfigurationRuntimeException if no clone can be created - * @throws IllegalArgumentException if null is passed in + * @throws IllegalArgumentException if null is passed in */ public static Synchronizer cloneSynchronizer(final Synchronizer sync) { if (sync == null) { @@ -241,8 +241,8 @@ public static Synchronizer cloneSynchronizer(final Synchronizer sync) { * directly returned. Otherwise all properties are copied into a new hierarchical configuration. * * @param conf the configuration to convert - * @return the new hierarchical configuration (the result is null if and only if the passed in configuration is - * null) + * @return the new hierarchical configuration (the result is null if and only if the passed in configuration is + * null) * @since 1.3 */ public static HierarchicalConfiguration convertToHierarchical(final Configuration conf) { @@ -255,14 +255,14 @@ public static HierarchicalConfiguration convertToHierarchical(final Configura * hierarchical configuration. When adding new keys to a hierarchical configuration the keys are interpreted by its * {@code ExpressionEngine}. If they contain special characters (e.g. brackets) that are treated in a special way by the * default expression engine, it may be necessary using a specific engine that can deal with such characters. Otherwise - * null can be passed in for the {@code ExpressionEngine}; then the default expression engine is used. If the + * null can be passed in for the {@code ExpressionEngine}; then the default expression engine is used. If the * passed in configuration is already hierarchical, it is directly returned. (However, the {@code ExpressionEngine} is - * set if it is not null.) Otherwise all properties are copied into a new hierarchical configuration. + * set if it is not null.) Otherwise all properties are copied into a new hierarchical configuration. * * @param conf the configuration to convert - * @param engine the {@code ExpressionEngine} for the hierarchical configuration or null for the default - * @return the new hierarchical configuration (the result is null if and only if the passed in configuration is - * null) + * @param engine the {@code ExpressionEngine} for the hierarchical configuration or null for the default + * @return the new hierarchical configuration (the result is null if and only if the passed in configuration is + * null) * @since 1.6 */ public static HierarchicalConfiguration convertToHierarchical(final Configuration conf, final ExpressionEngine engine) { @@ -334,7 +334,7 @@ public static void copy(final ImmutableConfiguration source, final Configuration * @param ifcs an array with the interface classes the proxy must implement * @param c the configuration object to be wrapped * @return a proxy object for an immutable configuration - * @throws NullPointerException if the configuration is null + * @throws NullPointerException if the configuration is null */ private static ImmutableConfiguration createUnmodifiableConfiguration(final Class[] ifcs, final Configuration c) { return (ImmutableConfiguration) Proxy.newProxyInstance(ConfigurationUtils.class.getClassLoader(), ifcs, new ImmutableConfigurationInvocationHandler(c)); @@ -490,9 +490,9 @@ public static String toString(final ImmutableConfiguration configuration) { * interface. Through this interface the configuration cannot be manipulated. It is also not possible to cast the * returned object back to a {@code Configuration} instance to circumvent this protection. * - * @param c the {@code Configuration} to be wrapped (must not be null) + * @param c the {@code Configuration} to be wrapped (must not be null) * @return an {@code ImmutableConfiguration} view on the specified {@code Configuration} object - * @throws NullPointerException if the passed in {@code Configuration} is null + * @throws NullPointerException if the passed in {@code Configuration} is null * @since 2.0 */ public static ImmutableConfiguration unmodifiableConfiguration(final Configuration c) { @@ -503,9 +503,9 @@ public static ImmutableConfiguration unmodifiableConfiguration(final Configurati * Creates an {@code ImmutableHierarchicalConfiguration} from the given {@code HierarchicalConfiguration} object. This * method works exactly like the method with the same name, but it operates on hierarchical configurations. * - * @param c the {@code HierarchicalConfiguration} to be wrapped (must not be null) + * @param c the {@code HierarchicalConfiguration} to be wrapped (must not be null) * @return an {@code ImmutableHierarchicalConfiguration} view on the specified {@code HierarchicalConfiguration} object - * @throws NullPointerException if the passed in {@code HierarchicalConfiguration} is null + * @throws NullPointerException if the passed in {@code HierarchicalConfiguration} is null * @since 2.0 */ public static ImmutableHierarchicalConfiguration unmodifiableConfiguration(final HierarchicalConfiguration c) { diff --git a/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java b/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java index baca4d9393..499773074e 100644 --- a/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java +++ b/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java @@ -100,7 +100,7 @@ protected void fireElementEnd(final String name) { * Fires a SAX element start event. * * @param name the name of the actual element - * @param attribs the attributes of this element (can be null) + * @param attribs the attributes of this element (can be null) */ protected void fireElementStart(final String name, final Attributes attribs) { if (getException() == null) { @@ -124,7 +124,7 @@ public ContentHandler getContentHandler() { } /** - * Gets the DTD handler. This class does not support DTD handlers, so this method always returns null. + * Gets the DTD handler. This class does not support DTD handlers, so this method always returns null. * * @return the DTD handler */ @@ -135,7 +135,7 @@ public DTDHandler getDTDHandler() { /** * Gets the entity resolver. This class does not support an entity resolver, so this method always returns - * null. + * null. * * @return the entity resolver */ @@ -145,7 +145,7 @@ public EntityResolver getEntityResolver() { } /** - * Gets the error handler. This class does not support an error handler, so this method always returns null. + * Gets the error handler. This class does not support an error handler, so this method always returns null. * * @return the error handler */ @@ -157,7 +157,7 @@ public ErrorHandler getErrorHandler() { /** * Gets a reference to an exception that occurred during parsing. * - * @return a SAXExcpetion or null if none occurred + * @return a SAXExcpetion or null if none occurred */ public SAXException getException() { return exception; @@ -167,7 +167,7 @@ public SAXException getException() { * Dummy implementation of the interface method. * * @param name the name of the feature - * @return always false (no features are supported) + * @return always false (no features are supported) */ @Override public boolean getFeature(final String name) { @@ -182,7 +182,7 @@ public boolean getFeature(final String name) { public abstract Configuration getParsedConfiguration(); /** - * Dummy implementation of the interface method. No properties are supported, so this method always returns null. + * Dummy implementation of the interface method. No properties are supported, so this method always returns null. * * @param name the name of the requested property * @return the property value diff --git a/src/main/java/org/apache/commons/configuration2/DataConfiguration.java b/src/main/java/org/apache/commons/configuration2/DataConfiguration.java index f07ff8d33a..3c8622b47d 100644 --- a/src/main/java/org/apache/commons/configuration2/DataConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/DataConfiguration.java @@ -1208,9 +1208,9 @@ public List getLongList(final String key, final List defaultValue) { /** * Gets the original conversion handler set for this configuration. If this is not a - * {@code DefaultConversionHandler}, result is null. + * {@code DefaultConversionHandler}, result is null. * - * @return the original conversion handler or null + * @return the original conversion handler or null */ private DefaultConversionHandler getOriginalConversionHandler() { final ConversionHandler handler = super.getConversionHandler(); diff --git a/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java b/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java index 84632e1d19..0642359d4b 100644 --- a/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java @@ -106,7 +106,7 @@ * * * The configuration can be instructed to perform commits after database updates. This is achieved by setting the - * {@code commits} parameter of the constructors to true. If commits should not be performed (which is the + * {@code commits} parameter of the constructors to true. If commits should not be performed (which is the * default behavior), it should be ensured that the connections returned by the {@code DataSource} are in auto-commit * mode. *

    @@ -212,7 +212,7 @@ public T execute() { } /** - * Gets the current connection. This method can be called while {@code execute()} is running. It returns null + * Gets the current connection. This method can be called while {@code execute()} is running. It returns null * otherwise. * * @return the current connection @@ -668,7 +668,7 @@ protected Integer performOperation() throws SQLException { } /** - * Sets the auto commit flag. If set to true, this configuration performs a commit after each database update. + * Sets the auto commit flag. If set to true, this configuration performs a commit after each database update. * * @param autoCommit the auto commit flag */ diff --git a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java index 14444a721a..f9662262c2 100644 --- a/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/DynamicCombinedConfiguration.java @@ -141,7 +141,7 @@ public CurrentConfigHolder(final String curKey) { * Decrements the lock counter and checks whether it has reached 0. In this cause, the operation is complete, and the * lock can be released. * - * @return true if the lock count reaches 0, false otherwise + * @return true if the lock count reaches 0, false otherwise */ public boolean decrementLockCountAndCheckRelease() { return --lockCount == 0; @@ -222,7 +222,7 @@ public DynamicCombinedConfiguration() { /** * Creates a new instance of {@code DynamicCombinedConfiguration} and initializes the combiner to be used. * - * @param comb the node combiner (can be null, then a union combiner is used as default) + * @param comb the node combiner (can be null, then a union combiner is used as default) */ public DynamicCombinedConfiguration(final NodeCombiner comb) { setNodeCombiner(comb); @@ -238,9 +238,9 @@ public DynamicCombinedConfiguration(final NodeCombiner comb) { * expression engine). For instance if you pass in the string {@code "database.tables"}, all properties of the added * configuration will occur in this branch. * - * @param config the configuration to add (must not be null) - * @param name the name of this configuration (can be null) - * @param at the position of this configuration in the combined tree (can be null) + * @param config the configuration to add (must not be null) + * @param name the name of this configuration (can be null) + * @param at the position of this configuration in the combined tree (can be null) */ @Override public void addConfiguration(final Configuration config, final String name, final String at) { @@ -482,7 +482,7 @@ public Configuration getConfiguration(final int index) { } /** - * Gets the configuration with the given name. This can be null if no such configuration exists. + * Gets the configuration with the given name. This can be null if no such configuration exists. * * @param name the name of the configuration * @return the configuration with this name @@ -501,7 +501,7 @@ public Configuration getConfiguration(final String name) { * Gets a set with the names of all configurations contained in this combined configuration. Of course here are only * these configurations listed, for which a name was specified when they were added. * - * @return a set with the names of the contained configurations (never null) + * @return a set with the names of the contained configurations (never null) */ @Override public Set getConfigurationNames() { @@ -680,7 +680,7 @@ public Short getShort(final String key, final Short defaultValue) { * Gets the configuration source, in which the specified key is defined. This method will determine the configuration * node that is identified by the given key. The following constellations are possible: *

      - *
    • If no node object is found for this key, null is returned.
    • + *
    • If no node object is found for this key, null is returned.
    • *
    • If the key maps to multiple nodes belonging to different configuration sources, a * {@code IllegalArgumentException} is thrown (in this case no unique source can be determined).
    • *
    • If exactly one node is found for the key, the (child) configuration object, to which the node belongs is @@ -690,9 +690,9 @@ public Short getShort(final String key, final Short defaultValue) { *
    * * @param key the key of a configuration property - * @return the configuration, to which this property belongs or null if the key cannot be resolved + * @return the configuration, to which this property belongs or null if the key cannot be resolved * @throws IllegalArgumentException if the key maps to multiple properties and the source cannot be determined, or if - * the key is null + * the key is null */ @Override public Configuration getSource(final String key) { @@ -815,7 +815,7 @@ public boolean removeConfiguration(final Configuration config) { * Removes the configuration with the specified name. * * @param name the name of the configuration to be removed - * @return the removed configuration (null if this configuration was not found) + * @return the removed configuration (null if this configuration was not found) */ @Override public Configuration removeConfiguration(final String name) { @@ -867,7 +867,7 @@ public void setLoggerName(final String name) { /** * Sets the node combiner. This object will be used when the combined node structure is to be constructed. It must not - * be null, otherwise an {@code IllegalArgumentException} exception is thrown. Changing the node combiner causes + * be null, otherwise an {@code IllegalArgumentException} exception is thrown. Changing the node combiner causes * an invalidation of this combined configuration, so that the new combiner immediately takes effect. * * @param nodeCombiner the node combiner diff --git a/src/main/java/org/apache/commons/configuration2/FindNodeVisitor.java b/src/main/java/org/apache/commons/configuration2/FindNodeVisitor.java index 618bfc649a..0df354174d 100644 --- a/src/main/java/org/apache/commons/configuration2/FindNodeVisitor.java +++ b/src/main/java/org/apache/commons/configuration2/FindNodeVisitor.java @@ -45,14 +45,14 @@ public FindNodeVisitor(final T node) { /** * Returns a flag whether the search node was found in the last search operation. * - * @return true if the search node was found; false otherwise + * @return true if the search node was found; false otherwise */ public boolean isFound() { return found; } /** - * Resets this visitor. This method sets the {@code found} property to false again, so that this instance can be + * Resets this visitor. This method sets the {@code found} property to false again, so that this instance can be * used to inspect another nodes hierarchy. */ public void reset() { @@ -60,7 +60,7 @@ public void reset() { } /** - * {@inheritDoc} This implementation returns true as soon as the node was found. + * {@inheritDoc} This implementation returns true as soon as the node was found. */ @Override public boolean terminate() { diff --git a/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java b/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java index d4075e01bf..b4e72637e8 100644 --- a/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/HierarchicalConfiguration.java @@ -48,7 +48,7 @@ public interface HierarchicalConfiguration extends Configuration, ImmutableHi * node, the new nodes are added to this node. Otherwise a new node will be created at the specified position in the * hierarchy. * - * @param key the key where the nodes are to be added; can be null , then they are added to the root node + * @param key the key where the nodes are to be added; can be null , then they are added to the root node * @param nodes a collection with the {@code Node} objects to be added */ void addNodes(String key, Collection nodes); @@ -85,7 +85,7 @@ public interface HierarchicalConfiguration extends Configuration, ImmutableHi /** * Returns a hierarchical subnode configuration for the node specified by the given key. This is a short form for * {@code configurationAt(key, - * false)}. + * false)}. * * @param key the key that selects the sub tree * @return a hierarchical configuration that contains this sub tree @@ -108,8 +108,8 @@ public interface HierarchicalConfiguration extends Configuration, ImmutableHi *

    *

    * With the {@code supportUpdate} flag the behavior of the returned sub configuration regarding updates of its parent - * configuration can be determined. If set to false, the configurations return on independent nodes structures. - * So changes made on one configuration cannot be seen by the other one. A value of true in contrast creates a + * configuration can be determined. If set to false, the configurations return on independent nodes structures. + * So changes made on one configuration cannot be seen by the other one. A value of true in contrast creates a * direct connection between both configurations - they are then using the same underlying data structures as much as * possible. There are however changes which break this connection; for instance, if the sub tree the sub configuration * belongs to is completely removed from the parent configuration. If such a change happens, the sub configuration @@ -169,7 +169,7 @@ public interface HierarchicalConfiguration extends Configuration, ImmutableHi * Sets the expression engine to be used by this configuration. All property keys this configuration has to deal with * will be interpreted by this engine. * - * @param expressionEngine the new expression engine; can be null, then the default expression engine will be + * @param expressionEngine the new expression engine; can be null, then the default expression engine will be * used */ void setExpressionEngine(ExpressionEngine expressionEngine); diff --git a/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java b/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java index 439fc4f415..0252e2cdf5 100644 --- a/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java +++ b/src/main/java/org/apache/commons/configuration2/HierarchicalConfigurationConverter.java @@ -80,7 +80,7 @@ protected void closeElements(final DefaultConfigurationKey keyLast, final Defaul * proper event handling. * * @param name the name of the new element - * @param value the element's value; can be null if the element does not have any value + * @param value the element's value; can be null if the element does not have any value */ protected abstract void elementStart(String name, Object value); diff --git a/src/main/java/org/apache/commons/configuration2/INIConfiguration.java b/src/main/java/org/apache/commons/configuration2/INIConfiguration.java index 6d2f7d1c5a..a2fb891a9f 100644 --- a/src/main/java/org/apache/commons/configuration2/INIConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/INIConfiguration.java @@ -68,11 +68,11 @@ * The format of ini files is fairly straight forward and is composed of three components: *

    *
      - *
    • Sections: Ini files are split into sections, each section starting with a section declaration. A section + *
    • Sections: Ini files are split into sections, each section starting with a section declaration. A section * declaration starts with a '[' and ends with a ']'. Sections occur on one line only.
    • - *
    • Parameters: Items in a section are known as parameters. Parameters have a typical {@code key = value} + *
    • Parameters: Items in a section are known as parameters. Parameters have a typical {@code key = value} * format.
    • - *
    • Comments: Lines starting with a ';' are assumed to be comments.
    • + *
    • Comments: Lines starting with a ';' are assumed to be comments.
    • *
    *

    * There are various implementations of the ini file format by various vendors which has caused a number of differences @@ -82,14 +82,14 @@ * Some of the differences supported are as follows: *

    *
      - *
    • Comments: The '#' character is also accepted as a comment signifier.
    • - *
    • Key value separator: The ':' character is also accepted in place of '=' to separate keys and values in + *
    • Comments: The '#' character is also accepted as a comment signifier.
    • + *
    • Key value separator: The ':' character is also accepted in place of '=' to separate keys and values in * parameters, for example {@code var1 : foo}.
    • - *
    • Duplicate sections: Typically duplicate sections are not allowed, this configuration does however support + *
    • Duplicate sections: Typically duplicate sections are not allowed, this configuration does however support * this feature. In the event of a duplicate section, the two section's values are merged so that there is only a single * section. Note: This also affects the internal data of the configuration. If it is saved, only a * single section is written!
    • - *
    • Duplicate parameters: Typically duplicate parameters are only allowed if they are in two different + *
    • Duplicate parameters: Typically duplicate parameters are only allowed if they are in two different * sections, thus they are local to sections; this configuration simply merges duplicates; if a section has a duplicate * parameter the values are then added to the key as a list.
    • *
    @@ -632,11 +632,11 @@ private SubnodeConfiguration getGlobalSection() { * initialized with the first occurrence of the section. (This can only happen if {@code addProperty()} has been used in * a way that does not conform to the storage scheme used by {@code INIConfiguration}. If used correctly, there will not * be duplicate sections.)
  • - *
  • There is special support for the global section: Passing in null as section name returns a configuration + *
  • There is special support for the global section: Passing in null as section name returns a configuration * with the content of the global section (which may also be empty).
  • * * - * @param name the name of the section in question; null represents the global section + * @param name the name of the section in question; null represents the global section * @return a configuration containing only the properties of the specified section */ public SubnodeConfiguration getSection(final String name) { diff --git a/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java b/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java index db80868692..913068d01d 100644 --- a/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/ImmutableConfiguration.java @@ -44,7 +44,7 @@ * will be returned if the queried property cannot be found in the configuration. The behavior of the methods that do * not take a default value in case of a missing property is not defined by this interface and depends on a concrete * implementation. E.g. the {@link AbstractConfiguration} class, which is the base class of most configuration - * implementations provided by this package, per default returns null if a property is not found, but provides + * implementations provided by this package, per default returns null if a property is not found, but provides * the {@link AbstractConfiguration#setThrowExceptionOnMissing(boolean) setThrowExceptionOnMissing()} method, with which * it can be configured to throw a {@code NoSuchElementException} exception in that case. (Note that getter methods for * primitive types in {@code AbstractConfiguration} always throw an exception for missing properties because there is no @@ -259,12 +259,12 @@ default boolean containsValue(final Object value) { /** * Gets a collection of typed objects associated with the given configuration key. This method works like - * {@link #getCollection(Class, String, Collection, Collection)} passing in null as default value. + * {@link #getCollection(Class, String, Collection, Collection)} passing in null as default value. * * @param the element type of the result list * @param cls the element class of the result list * @param key the configuration key - * @param target the target collection (may be null) + * @param target the target collection (may be null) * @return the collection to which data was added * @throws org.apache.commons.configuration2.ex.ConversionException if the conversion is not possible * @since 2.0 @@ -278,19 +278,19 @@ default boolean containsValue(final Object value) { * retrieved should be added to a specific kind of collection, e.g. a set to remove duplicates. The return value is as * follows: * * * @param the element type of the result list * @param cls the element class of the result list * @param key the configuration key - * @param target the target collection (may be null) - * @param defaultValue the default value (may be null) + * @param target the target collection (may be null) + * @param defaultValue the default value (may be null) * @return the collection to which data was added * @throws org.apache.commons.configuration2.ex.ConversionException if the conversion is not possible * @since 2.0 @@ -378,12 +378,12 @@ default Duration getDuration(final String key, final Duration defaultValue) { * value of the string property identified by the given key. This value is then passed to the provided * {@code ConfigurationDecoder}. The value returned by the {@code ConfigurationDecoder} is passed to the caller. If the * key is not associated with a value, the decoder is not invoked; depending on this configuration's settings either - * null is returned or an exception is thrown. + * null is returned or an exception is thrown. * * @param key the configuration key - * @param decoder the {@code ConfigurationDecoder} (must not be null) + * @param decoder the {@code ConfigurationDecoder} (must not be null) * @return the plain string value of the specified encoded property - * @throws IllegalArgumentException if a null decoder is passed + * @throws IllegalArgumentException if a null decoder is passed */ String getEncodedString(String key, ConfigurationDecoder decoder); diff --git a/src/main/java/org/apache/commons/configuration2/ImmutableConfigurationInvocationHandler.java b/src/main/java/org/apache/commons/configuration2/ImmutableConfigurationInvocationHandler.java index a2e7a2953c..480c01bfc5 100644 --- a/src/main/java/org/apache/commons/configuration2/ImmutableConfigurationInvocationHandler.java +++ b/src/main/java/org/apache/commons/configuration2/ImmutableConfigurationInvocationHandler.java @@ -105,8 +105,8 @@ private static Object handleResult(final Object result) { * Creates a new instance of {@code ImmutableConfigurationInvocationHandler} and initializes it with the wrapped * configuration object. * - * @param configuration the wrapped {@code Configuration} (must not be null) - * @throws NullPointerException if the {@code Configuration} is null + * @param configuration the wrapped {@code Configuration} (must not be null) + * @throws NullPointerException if the {@code Configuration} is null */ public ImmutableConfigurationInvocationHandler(final Configuration configuration) { wrappedConfiguration = Objects.requireNonNull(configuration, "configuration"); diff --git a/src/main/java/org/apache/commons/configuration2/ImmutableHierarchicalConfiguration.java b/src/main/java/org/apache/commons/configuration2/ImmutableHierarchicalConfiguration.java index 4c966b89a0..5c9424ed08 100644 --- a/src/main/java/org/apache/commons/configuration2/ImmutableHierarchicalConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/ImmutableHierarchicalConfiguration.java @@ -38,7 +38,7 @@ */ public interface ImmutableHierarchicalConfiguration extends ImmutableConfiguration { /** - * Gets the expression engine used by this configuration. This method will never return null; if no specific + * Gets the expression engine used by this configuration. This method will never return null; if no specific * expression engine was set, the default expression engine will be returned. * * @return the current expression engine @@ -78,7 +78,7 @@ public interface ImmutableHierarchicalConfiguration extends ImmutableConfigurati /** * Returns an immutable hierarchical configuration for the node specified by the given key. This is a short form for * {@code immutableConfigurationAt(key, - * false)}. + * false)}. * * @param key the key that selects the sub tree * @return a hierarchical configuration that contains this sub tree diff --git a/src/main/java/org/apache/commons/configuration2/MapConfiguration.java b/src/main/java/org/apache/commons/configuration2/MapConfiguration.java index 09c7c86cc1..33d40ccf34 100644 --- a/src/main/java/org/apache/commons/configuration2/MapConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/MapConfiguration.java @@ -214,7 +214,7 @@ protected boolean isEmptyInternal() { /** * Returns the flag whether trimming of property values is disabled. * - * @return true if trimming of property values is disabled; false otherwise + * @return true if trimming of property values is disabled; false otherwise * @since 1.7 */ public boolean isTrimmingDisabled() { diff --git a/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java b/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java index 8c13b568fd..10cb0bb480 100644 --- a/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/PropertiesConfiguration.java @@ -541,7 +541,7 @@ public List getCommentLines() { /** * Gets the name of the last read property. This method can be called after {@link #nextProperty()} was invoked and - * its return value was true. + * its return value was true. * * @return the name of the last read property * @since 1.3 @@ -563,7 +563,7 @@ public String getPropertySeparator() { /** * Gets the value of the last read property. This method can be called after {@link #nextProperty()} was invoked and - * its return value was true. + * its return value was true. * * @return the value of the last read property * @since 1.3 @@ -608,8 +608,8 @@ protected void initPropertyValue(final String value) { /** * Parses the next property from the input stream and stores the found name and value in internal fields. These fields - * can be obtained using the provided getter methods. The return value indicates whether EOF was reached (false) - * or whether further properties are available (true). + * can be obtained using the provided getter methods. The return value indicates whether EOF was reached (false) + * or whether further properties are available (true). * * @return a flag if further properties are available * @throws IOException if an error occurs @@ -900,7 +900,7 @@ public void writeComment(final String comment) throws IOException { /** * Helper method for writing a line with the platform specific line ending. * - * @param s the content of the line (may be null) + * @param s the content of the line (may be null) * @throws IOException if an error occurs * @since 1.3 */ @@ -1430,7 +1430,7 @@ private void loadIncludeFile(final String fileName, final boolean optional, fina * * @param basePath the base path * @param fileName the file name - * @return the URL of the include file or null if it cannot be resolved + * @return the URL of the include file or null if it cannot be resolved */ private URL locateIncludeFile(final String basePath, final String fileName) { final FileLocator includeLocator = FileLocatorUtils.fileLocator(locator).sourceURL(null).basePath(basePath).fileName(fileName).create(); @@ -1441,7 +1441,7 @@ private URL locateIncludeFile(final String basePath, final String fileName) { * This method is invoked by the associated {@link PropertiesConfigurationLayout} object for each property definition * detected in the parsed properties file. Its task is to check whether this is a special property definition (e.g. the * {@code include} property). If not, the property must be added to this configuration. The return value indicates - * whether the property should be treated as a normal property. If it is false, the layout object will ignore + * whether the property should be treated as a normal property. If it is false, the layout object will ignore * this property. * * @param key the property key @@ -1525,7 +1525,7 @@ public void setIncludeListener(final ConfigurationConsumer} statement or not. This is true + * Controls whether additional files can be loaded by the {@code include = } statement or not. This is true * per default. * * @param includesAllowed True if Includes are allowed. @@ -1541,8 +1541,8 @@ public void setIncludesAllowed(final boolean includesAllowed) { * you want to use a custom {@code IOFactory} for changing the {@code PropertiesReader}, you cannot load the * configuration data in the constructor. * - * @param ioFactory the new {@code IOFactory} (must not be null) - * @throws IllegalArgumentException if the {@code IOFactory} is null + * @param ioFactory the new {@code IOFactory} (must not be null) + * @throws IllegalArgumentException if the {@code IOFactory} is null * @since 1.7 */ public void setIOFactory(final IOFactory ioFactory) { @@ -1556,7 +1556,7 @@ public void setIOFactory(final IOFactory ioFactory) { /** * Sets the associated layout object. * - * @param layout the new layout object; can be null, then a new layout object will be created + * @param layout the new layout object; can be null, then a new layout object will be created * @since 1.3 */ public void setLayout(final PropertiesConfigurationLayout layout) { diff --git a/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java b/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java index 6fc866089e..24f8def7c9 100644 --- a/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java +++ b/src/main/java/org/apache/commons/configuration2/PropertiesConfigurationLayout.java @@ -94,7 +94,7 @@ * for {@code windowColors}, which has multiple values defined in one line using the separator character. *
  • The {@code AppVendor} property appears twice. The comment lines are concatenated, so that * {@code layout.getComment("AppVendor");} will result in {@code Application vendor<CR>Another vendor}, with - * {@code <CR>} meaning the line separator. In addition the "single line" flag is set to false + * {@code <CR>} meaning the line separator. In addition the "single line" flag is set to false * for this property. When the file is saved, two property definitions will be written (in series).
  • * * @@ -184,7 +184,7 @@ public int getBlankLines() { /** * Gets the comment for this property. The comment is returned as it is, without processing of comment characters. * - * @return the comment (can be null) + * @return the comment (can be null) */ public String getComment() { return Objects.toString(comment, null); @@ -232,7 +232,7 @@ public void setBlankLines(final int blankLines) { /** * Sets the comment for this property. * - * @param s the new comment (can be null) + * @param s the new comment (can be null) */ public void setComment(final String s) { if (s == null) { @@ -273,7 +273,7 @@ public void setSingleLine(final boolean singleLine) { * * @param comment the comment string to be processed * @param commentChar determines the presence of comment characters - * @return the canonical comment string (can be null) + * @return the canonical comment string (can be null) */ private static String constructCanonicalComment(final String comment, final boolean commentChar) { return comment == null ? null : trimComment(comment, commentChar); @@ -294,7 +294,7 @@ static boolean isCommentLine(final String line) { * character. * * @param s the comment line - * @param comment if true, a comment character will always be enforced; if false, it will be removed + * @param comment if true, a comment character will always be enforced; if false, it will be removed * @return the line without comment character */ static String stripCommentChar(final String s, final boolean comment) { @@ -324,7 +324,7 @@ static String stripCommentChar(final String s, final boolean comment) { * comment text or ensures that every line starts with a valid comment character. * * @param s the string to be processed - * @param comment if true, a comment character will always be enforced; if false, it will be removed + * @param comment if true, a comment character will always be enforced; if false, it will be removed * @return the trimmed comment */ static String trimComment(final String s, final boolean comment) { @@ -463,7 +463,7 @@ private void copyFrom(final PropertiesConfigurationLayout c) { * @param commentLines a list with comment lines * @param from the start index * @param to the end index (inclusive) - * @return the comment string (null if it is undefined) + * @return the comment string (null if it is undefined) */ private String extractComment(final List commentLines, final int from, final int to) { if (to < from) { @@ -517,14 +517,14 @@ public int getBlankLinesBefore(final String key) { /** * Gets the comment for the specified property key in a canonical form. "Canonical" means that either all - * lines start with a comment character or none. If the {@code commentChar} parameter is false, all comment + * lines start with a comment character or none. If the {@code commentChar} parameter is false, all comment * characters are removed, so that the result is only the plain text of the comment. Otherwise it is ensured that each * line of the comment starts with a comment character. Also, line breaks in the comment are normalized to the line * separator "\n". * * @param key the key of the property * @param commentChar determines whether all lines should start with comment characters or not - * @return the canonical comment for this key (can be null) + * @return the canonical comment for this key (can be null) */ public String getCanonicalComment(final String key, final boolean commentChar) { return constructCanonicalComment(getComment(key), commentChar); @@ -535,7 +535,7 @@ public String getCanonicalComment(final String key, final boolean commentChar) { * {@code getCanonicalHeaderComment()}, but reads the footer comment. * * @param commentChar determines the presence of comment characters - * @return the footer comment (can be null) + * @return the footer comment (can be null) * @see #getCanonicalHeaderComment(boolean) * @since 2.0 */ @@ -548,7 +548,7 @@ public String getCanonicalFooterCooment(final boolean commentChar) { * parameter it can be specified whether comment characters should be stripped or be always present. * * @param commentChar determines the presence of comment characters - * @return the header comment (can be null) + * @return the header comment (can be null) */ public String getCanonicalHeaderComment(final boolean commentChar) { return constructCanonicalComment(getHeaderComment(), commentChar); @@ -559,7 +559,7 @@ public String getCanonicalHeaderComment(final boolean commentChar) { * {@code setComment()} or when it was loaded from a properties file). No modifications are performed. * * @param key the key of the property - * @return the comment for this key (can be null) + * @return the comment for this key (can be null) */ public String getComment(final String key) { return fetchLayoutData(key).getComment(); @@ -569,7 +569,7 @@ public String getComment(final String key) { * Gets the footer comment of the represented properties file. This method returns the footer comment exactly as it * was set using {@code setFooterComment()} or extracted from the loaded properties file. * - * @return the footer comment (can be null) + * @return the footer comment (can be null) * @since 2.0 */ public String getFooterComment() { @@ -590,7 +590,7 @@ public String getGlobalSeparator() { * Gets the header comment of the represented properties file. This method returns the header comment exactly as it * was set using {@code setHeaderComment()} or extracted from the loaded properties file. * - * @return the header comment (can be null) + * @return the header comment (can be null) */ public String getHeaderComment() { return headerComment; @@ -794,7 +794,7 @@ public void setBlankLinesBefore(final String key, final int number) { * character is added automatically. * * @param key the key of the property - * @param comment the comment for this key (can be null, then the comment will be removed) + * @param comment the comment for this key (can be null, then the comment will be removed) */ public void setComment(final String key, final String comment) { fetchLayoutData(key).setComment(comment); @@ -826,7 +826,7 @@ public void setForceSingleLine(final boolean f) { * properties when writing the configuration. This is an easy way of determining the properties separator globally. To * be compatible with the properties format only the characters {@code =} and {@code :} (with or without whitespace) * should be used, but this method does not enforce this - it accepts arbitrary strings. If the global separator is set - * to null, property separators are not changed. This is the default behavior as it produces results that are + * to null, property separators are not changed. This is the default behavior as it produces results that are * closer to the original properties file. * * @param globalSeparator the separator to be used for all properties diff --git a/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java b/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java index fa0aed5f5a..97df81820e 100644 --- a/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java @@ -93,9 +93,9 @@ public void remove() { /** * Create a subset of the specified configuration * - * @param parent The parent configuration (must not be null) + * @param parent The parent configuration (must not be null) * @param prefix The prefix used to select the properties - * @throws IllegalArgumentException if the parent configuration is null + * @throws IllegalArgumentException if the parent configuration is null */ public SubsetConfiguration(final Configuration parent, final String prefix) { this(parent, prefix, null); @@ -104,10 +104,10 @@ public SubsetConfiguration(final Configuration parent, final String prefix) { /** * Create a subset of the specified configuration * - * @param parent The parent configuration (must not be null) + * @param parent The parent configuration (must not be null) * @param prefix The prefix used to select the properties * @param delimiter The prefix delimiter - * @throws NullPointerException if the parent configuration is null + * @throws NullPointerException if the parent configuration is null */ public SubsetConfiguration(final Configuration parent, final String prefix, final String delimiter) { this.parent = Objects.requireNonNull(parent, "parent"); diff --git a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java index 4f0d7f3cf0..5e68a7f9e3 100644 --- a/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java @@ -187,7 +187,7 @@ private static void clearAttributes(final Element elem) { /** * Returns the only text node of an element for update. This method is called when the element's text changes. Then all - * text nodes except for the first are removed. A reference to the first is returned or null if there is no text + * text nodes except for the first are removed. A reference to the first is returned or null if there is no text * node at all. * * @param elem the element @@ -559,7 +559,7 @@ public XMLConfiguration(final HierarchicalConfiguration c) { * @param node a builder for the current node * @param refValue stores the text value of the element * @param element the current XML element - * @param elemRefs a map for assigning references objects to nodes; can be null, then reference objects are + * @param elemRefs a map for assigning references objects to nodes; can be null, then reference objects are * irrelevant * @param trim a flag whether the text content of elements should be trimmed; this controls the whitespace handling * @param level the current level in the hierarchy @@ -618,7 +618,7 @@ private Map constructHierarchy(final ImmutableNode.Builder node, * @param value the value of the child element * @param trim flag whether texts of elements should be trimmed * @param attrmap a map with the attributes of the current node - * @param elemRefs a map for assigning references objects to nodes; can be null, then reference objects are + * @param elemRefs a map for assigning references objects to nodes; can be null, then reference objects are * irrelevant * @return the first child node added to the parent */ @@ -749,7 +749,7 @@ protected Transformer createTransformer() throws ConfigurationException { } /** - * Gets the XML document this configuration was loaded from. The return value is null if this configuration + * Gets the XML document this configuration was loaded from. The return value is null if this configuration * was not loaded from a XML document. * * @return the XML document this configuration was loaded from @@ -761,7 +761,7 @@ public Document getDocument() { /** * Gets the {@code DocumentBuilder} object that is used for loading documents. If no specific builder has been set, - * this method returns null. + * this method returns null. * * @return the {@code DocumentBuilder} for loading new documents * @since 1.2 @@ -791,7 +791,7 @@ public EntityResolver getEntityResolver() { } /** - * Gets the public ID of the DOCTYPE declaration from the loaded XML document. This is null if no document has + * Gets the public ID of the DOCTYPE declaration from the loaded XML document. This is null if no document has * been loaded yet or if the document does not contain a DOCTYPE declaration with a public ID. * * @return the public ID @@ -827,7 +827,7 @@ protected String getRootElementNameInternal() { } /** - * Gets the system ID of the DOCTYPE declaration from the loaded XML document. This is null if no document has + * Gets the system ID of the DOCTYPE declaration from the loaded XML document. This is null if no document has * been loaded yet or if the document does not contain a DOCTYPE declaration with a system ID. * * @return the system ID diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/BeanDeclaration.java b/src/main/java/org/apache/commons/configuration2/beanutils/BeanDeclaration.java index 9dfd3a96f8..a6213b9ecb 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/BeanDeclaration.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/BeanDeclaration.java @@ -51,7 +51,7 @@ public interface BeanDeclaration { /** * Gets the name of the {@code BeanFactory} that should be used for creating the bean instance. This can be - * null, then a default factory will be used. + * null, then a default factory will be used. * * @return the name of the bean factory */ @@ -68,7 +68,7 @@ public interface BeanDeclaration { /** * Gets a map with properties that should be initialized on the newly created bean. The map's keys are the names of - * the properties; the corresponding values are the properties' values. The return value can be null if no + * the properties; the corresponding values are the properties' values. The return value can be null if no * properties should be set. * * @return a map with properties to be initialized @@ -77,7 +77,7 @@ public interface BeanDeclaration { /** * Gets a collection with constructor arguments. This data is used to determine the constructor of the bean class to - * be invoked. The values of the arguments are passed to the constructor. An implementation can return null or an + * be invoked. The values of the arguments are passed to the constructor. An implementation can return null or an * empty collection; then the standard constructor of the bean class is called. * * @return a collection with the arguments to be passed to the bean class's constructor diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/BeanFactory.java b/src/main/java/org/apache/commons/configuration2/beanutils/BeanFactory.java index 295e0de28e..e2d70c4ad6 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/BeanFactory.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/BeanFactory.java @@ -44,18 +44,18 @@ public interface BeanFactory { * the bean. It is up to a concrete implementation how the bean is created and initialized. * * @param bcc the context object for the bean to be created - * @return the new bean instance (should not be null) + * @return the new bean instance (should not be null) * @throws Exception if an error occurs (the helper classes for creating beans will catch this generic exception and * wrap it in a configuration exception) */ Object createBean(BeanCreationContext bcc) throws Exception; /** - * Gets the default bean class of this bean factory. If an implementation here returns a non null value, bean + * Gets the default bean class of this bean factory. If an implementation here returns a non null value, bean * declarations using this factory do not need to provide the name of the bean class. In such a case an instance of the * default class will be created. * - * @return the default class of this factory or null if there is none + * @return the default class of this factory or null if there is none */ Class getDefaultBeanClass(); } diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/BeanHelper.java b/src/main/java/org/apache/commons/configuration2/beanutils/BeanHelper.java index 0f4cc1ac2f..58678637e2 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/BeanHelper.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/BeanHelper.java @@ -170,9 +170,9 @@ private static Collection createPropertyCollection(final String propName /** * Creates a {@code DynaBean} instance which wraps the passed in bean. * - * @param bean the bean to be wrapped (must not be null) + * @param bean the bean to be wrapped (must not be null) * @return a {@code DynaBean} wrapping the passed in bean - * @throws IllegalArgumentException if the bean is null + * @throws IllegalArgumentException if the bean is null * @since 2.0 */ public static DynaBean createWrapDynaBean(final Object bean) { @@ -285,7 +285,7 @@ private static void initProperty(final Object bean, final String propName, final * * @param bean the bean instance * @param propName the name of the property in question - * @return true if this property can be written, false otherwise + * @return true if this property can be written, false otherwise */ private static boolean isPropertyWriteable(final Object bean, final String propName) { return BEAN_UTILS_BEAN.getPropertyUtils().isWriteable(bean, propName); @@ -337,7 +337,7 @@ public BeanHelper() { /** * Constructs a new instance of {@code BeanHelper} and sets the specified default {@code BeanFactory}. * - * @param defaultBeanFactory the default {@code BeanFactory} (can be null, then a default instance is used) + * @param defaultBeanFactory the default {@code BeanFactory} (can be null, then a default instance is used) */ public BeanHelper(final BeanFactory defaultBeanFactory) { this.defaultBeanFactory = defaultBeanFactory != null ? defaultBeanFactory : DefaultBeanFactory.INSTANCE; @@ -372,7 +372,7 @@ public Object createBean(final BeanDeclaration data, final Class defaultClass * The main method for creating and initializing beans from a configuration. This method will return an initialized * instance of the bean class specified in the passed in bean declaration. If this declaration does not contain the * class of the bean, the passed in default class will be used. From the bean declaration the factory to be used for - * creating the bean is queried. The declaration may here return null, then a default factory is used. This + * creating the bean is queried. The declaration may here return null, then a default factory is used. This * factory is then invoked to perform the create operation. * * @param data the bean declaration @@ -417,7 +417,7 @@ private BeanCreationContext createBeanCreationContext(final BeanDeclaration data * Deregisters the bean factory with the given name. After that this factory cannot be used any longer. * * @param name the name of the factory to be deregistered - * @return the factory that was registered under this name; null if there was no such factory + * @return the factory that was registered under this name; null if there was no such factory */ public BeanFactory deregisterBeanFactory(final String name) { return beanFactories.remove(name); diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/CombinedBeanDeclaration.java b/src/main/java/org/apache/commons/configuration2/beanutils/CombinedBeanDeclaration.java index 56609a0fca..f37053277b 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/CombinedBeanDeclaration.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/CombinedBeanDeclaration.java @@ -53,7 +53,7 @@ public class CombinedBeanDeclaration implements BeanDeclaration { * Constructs a new instance of {@code CombinedBeanDeclaration} and initializes it with the given child declarations. * * @param decl the child declarations - * @throws NullPointerException if the array with child declarations is null + * @throws NullPointerException if the array with child declarations is null */ public CombinedBeanDeclaration(final BeanDeclaration... decl) { childDeclarations = new ArrayList<>(Arrays.asList(decl)); @@ -72,8 +72,8 @@ private Map get(final Functionnull value is returned. If none of the child declarations have a defined bean class, result is - * null. + * The first non-null value is returned. If none of the child declarations have a defined bean class, result is + * null. */ @Override public String getBeanClassName() { @@ -82,8 +82,8 @@ public String getBeanClassName() { /** * {@inheritDoc} This implementation iterates over the list of child declarations and asks them for a bean factory name. - * The first non-null value is returned. If none of the child declarations have a defined bean factory name, - * result is null. + * The first non-null value is returned. If none of the child declarations have a defined bean factory name, + * result is null. */ @Override public String getBeanFactoryName() { @@ -92,8 +92,8 @@ public String getBeanFactoryName() { /** * {@inheritDoc} This implementation iterates over the list of child declarations and asks them for a bean factory - * parameter. The first non-null value is returned. If none of the child declarations have a defined bean factory - * parameter, result is null. + * parameter. The first non-null value is returned. If none of the child declarations have a defined bean factory + * parameter, result is null. */ @Override public Object getBeanFactoryParameter() { @@ -112,7 +112,7 @@ public Map getBeanProperties() { /** * {@inheritDoc} This implementation iterates over the list of child declarations and asks them for constructor - * arguments. The first non-null and non empty collection is returned. If none of the child declarations provide + * arguments. The first non-null and non empty collection is returned. If none of the child declarations provide * constructor arguments, result is an empty collection. */ @Override diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/ConstructorArg.java b/src/main/java/org/apache/commons/configuration2/beanutils/ConstructorArg.java index 0aec1c8611..6ed0619cde 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/ConstructorArg.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/ConstructorArg.java @@ -42,7 +42,7 @@ public final class ConstructorArg { * * @param decl the {@code BeanDeclaration} * @return the newly created instance of this class - * @throws NullPointerException if the {@code BeanDeclaration} is null + * @throws NullPointerException if the {@code BeanDeclaration} is null */ public static ConstructorArg forBeanDeclaration(final BeanDeclaration decl) { return forBeanDeclaration(decl, null); @@ -56,7 +56,7 @@ public static ConstructorArg forBeanDeclaration(final BeanDeclaration decl) { * @param beanDeclaration the {@code BeanDeclaration} * @param typeName the name of the data type of this argument * @return the newly created instance of this class - * @throws NullPointerException if the {@code BeanDeclaration} is null + * @throws NullPointerException if the {@code BeanDeclaration} is null */ public static ConstructorArg forBeanDeclaration(final BeanDeclaration beanDeclaration, final String typeName) { Objects.requireNonNull(beanDeclaration, "beanDeclaration"); @@ -67,7 +67,7 @@ public static ConstructorArg forBeanDeclaration(final BeanDeclaration beanDeclar * Creates a new instance of {@code ConstructorArg} for the specified simple value. The value is passed to the * constructor invocation. * - * @param value the value of this constructor argument (may be null) + * @param value the value of this constructor argument (may be null) * @return the newly created instance of this class */ public static ConstructorArg forValue(final Object value) { @@ -78,7 +78,7 @@ public static ConstructorArg forValue(final Object value) { * Creates a new instance of {@code ConstructorArg} for the specified simple value and sets the type name explicitly. * The type name is used to match this argument against the parameter type of a constructor or the bean class. * - * @param value the value of this constructor argument (may be null) + * @param value the value of this constructor argument (may be null) * @param typeName the name of the data type of this argument * @return the newly created instance of this class */ @@ -109,11 +109,11 @@ private ConstructorArg(final BeanDeclaration decl, final Object val, final Strin } /** - * Gets the {@code BeanDeclaration} referenced by this constructor argument. A return value of null means that + * Gets the {@code BeanDeclaration} referenced by this constructor argument. A return value of null means that * this constructor argument does not have a bean declaration as value; in this case, the value can be queried using the * {@link #getValue()} method. * - * @return the referenced {@code BeanDeclaration} or null + * @return the referenced {@code BeanDeclaration} or null */ public BeanDeclaration getBeanDeclaration() { return beanDeclaration; @@ -124,7 +124,7 @@ public BeanDeclaration getBeanDeclaration() { * a specific constructor if there are ambiguities. Note that it does not necessarily has to match the data type of this * argument's value because a type conversion may be performed before invoking the constructor. * - * @return the data type name of this argument if defined or null otherwise + * @return the data type name of this argument if defined or null otherwise */ public String getTypeName() { return typeName; @@ -132,7 +132,7 @@ public String getTypeName() { /** * Gets the value of this constructor argument. This method can be queried if {@link #isNestedBeanDeclaration()} - * returns false. Note that a return value of null is legal (to pass null to a constructor + * returns false. Note that a return value of null is legal (to pass null to a constructor * argument). * * @return the simple value of this constructor argument @@ -143,7 +143,7 @@ public Object getValue() { /** * Tests whether this constructor argument represents a {@code BeanDeclaration}. If this method returns - * true, the actual value of this argument can be obtained by resolving the bean declaration returned by + * true, the actual value of this argument can be obtained by resolving the bean declaration returned by * {@link #getBeanDeclaration()}. Otherwise, this argument has a simple value which can be queried using * {@link #getValue()}. * @@ -156,13 +156,13 @@ public boolean isNestedBeanDeclaration() { /** * Checks whether this constructor argument is compatible with the given class. This method is called to determine a * matching constructor. It compares the argument's data type with the class name if it is defined. If no type name has - * been set, result is true as it is assumed that a type conversion can be performed when calling the + * been set, result is true as it is assumed that a type conversion can be performed when calling the * constructor. This means that per default only the number of constructor arguments is checked to find a matching * constructor. Only if there are multiple constructors with the same number of arguments, explicit type names have to * be provided to select a specific constructor. * * @param argCls the class of the constructor argument to compare with - * @return true if this constructor argument is compatible with this class, false otherwise + * @return true if this constructor argument is compatible with this class, false otherwise */ public boolean matches(final Class argCls) { if (argCls == null) { diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/DefaultBeanFactory.java b/src/main/java/org/apache/commons/configuration2/beanutils/DefaultBeanFactory.java index f105202fae..992fe625c0 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/DefaultBeanFactory.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/DefaultBeanFactory.java @@ -95,7 +95,7 @@ private static ConfigurationRuntimeException constructorMatchingException(final * @param the type of the bean to be created * @return the single matching constructor * @throws ConfigurationRuntimeException if no single matching constructor can be found - * @throws NullPointerException if the bean class or bean declaration are null + * @throws NullPointerException if the bean class or bean declaration are null */ protected static Constructor findMatchingConstructor(final Class beanClass, final BeanDeclaration data) { final List> matchingConstructors = findMatchingConstructors(beanClass, data); @@ -127,10 +127,10 @@ private static List> findMatchingConstructors(final Class } /** - * Gets constructor arguments from a bean declaration. Deals with null values. + * Gets constructor arguments from a bean declaration. Deals with null values. * * @param data the bean declaration - * @return the collection with constructor arguments (never null) + * @return the collection with constructor arguments (never null) */ private static Collection getConstructorArgs(final BeanDeclaration data) { Collection args = data.getConstructorArgs(); @@ -164,10 +164,10 @@ private static boolean matchesConstructor(final Constructor ctor, final Colle } /** - * Fetches constructor arguments from the given bean declaration. Handles null values safely. + * Fetches constructor arguments from the given bean declaration. Handles null values safely. * * @param data the bean declaration - * @return the collection with constructor arguments (never null) + * @return the collection with constructor arguments (never null) */ private static Collection nullSafeConstructorArgs(final BeanDeclaration data) { Collection args = data.getConstructorArgs(); @@ -191,7 +191,7 @@ public DefaultBeanFactory() { * Constructs a new instance of {@code DefaultBeanFactory} using the specified {@code ConversionHandler} for data type * conversions. * - * @param convHandler the {@code ConversionHandler}; can be null, then a default handler is used + * @param convHandler the {@code ConversionHandler}; can be null, then a default handler is used * @since 2.0 */ public DefaultBeanFactory(final ConversionHandler convHandler) { @@ -262,7 +262,7 @@ public ConversionHandler getConversionHandler() { } /** - * Gets the default bean class used by this factory. This is always null for this implementation. + * Gets the default bean class used by this factory. This is always null for this implementation. * * @return the default bean class */ diff --git a/src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java b/src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java index aa6f2729f0..13517805ae 100644 --- a/src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java +++ b/src/main/java/org/apache/commons/configuration2/beanutils/XMLBeanDeclaration.java @@ -297,7 +297,7 @@ public XMLBeanDeclaration(final HierarchicalConfiguration config) { * Constructs a new instance of {@code XMLBeanDeclaration} and initializes it from the given configuration. The passed in * key points to the bean declaration. * - * @param config the configuration (must not be null) + * @param config the configuration (must not be null) * @param key the key to the bean declaration (this key must point to exactly one bean declaration or a * {@code IllegalArgumentException} exception will be thrown) * @param the node type of the configuration @@ -311,9 +311,9 @@ public XMLBeanDeclaration(final HierarchicalConfiguration config, final S * Constructs a new instance of {@code XMLBeanDeclaration} and initializes it from the given configuration supporting * optional declarations. * - * @param config the configuration (must not be null) + * @param config the configuration (must not be null) * @param key the key to the bean declaration - * @param optional a flag whether this declaration is optional; if set to true, no exception will be thrown if + * @param optional a flag whether this declaration is optional; if set to true, no exception will be thrown if * the passed in key is undefined * @param the node type of the configuration * @throws IllegalArgumentException if required information is missing to construct the bean declaration @@ -325,15 +325,15 @@ public XMLBeanDeclaration(final HierarchicalConfiguration config, final S /** * Constructs a new instance of {@code XMLBeanDeclaration} and initializes it from the given configuration supporting * optional declarations and a default bean class name. The passed in key points to the bean declaration. If the key - * does not exist and the boolean argument is true, the declaration is initialized with an empty configuration. + * does not exist and the boolean argument is true, the declaration is initialized with an empty configuration. * It is possible to create objects from such an empty declaration if a default class is provided. If the key on the - * other hand has multiple values or is undefined and the boolean argument is false, a + * other hand has multiple values or is undefined and the boolean argument is false, a * {@code IllegalArgumentException} exception will be thrown. It is possible to set a default bean class name; this name * is used if the configuration does not contain a bean class. * - * @param config the configuration (must not be null) + * @param config the configuration (must not be null) * @param key the key to the bean declaration - * @param optional a flag whether this declaration is optional; if set to true, no exception will be thrown if + * @param optional a flag whether this declaration is optional; if set to true, no exception will be thrown if * the passed in key is undefined * @param defBeanClsName a default bean class name * @param the node type of the configuration @@ -398,7 +398,7 @@ private ConstructorArg createConstructorArg(final NodeData child) { * * @param nodeData the node * @param attribute the name of the attribute - * @return the string value of this attribute (can be null) + * @return the string value of this attribute (can be null) */ private String getAttribute(final NodeData nodeData, final String attribute) { final Object value = nodeData.getAttribute(attribute); @@ -478,7 +478,7 @@ public Collection getConstructorArgs() { /** * Gets the name of the default bean class. This class is used if no bean class is specified in the configuration. It - * may be null if no default class was set. + * may be null if no default class was set. * * @return the default bean class name * @since 2.0 diff --git a/src/main/java/org/apache/commons/configuration2/builder/AutoSaveListener.java b/src/main/java/org/apache/commons/configuration2/builder/AutoSaveListener.java index 7380300959..46bfc9cd6f 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/AutoSaveListener.java +++ b/src/main/java/org/apache/commons/configuration2/builder/AutoSaveListener.java @@ -70,7 +70,7 @@ public AutoSaveListener(final FileBasedConfigurationBuilder bldr) { * object. * * @param event the configuration change event - * @return true if a save operation should be performed, false otherwise + * @return true if a save operation should be performed, false otherwise */ private boolean autoSaveRequired(final ConfigurationEvent event) { return !event.isBeforeUpdate() && !inLoadOperation(); @@ -122,7 +122,7 @@ public void onEvent(final ConfigurationEvent event) { * which is associated with a new file handler. It updates the internal file handler reference and performs necessary * listener registrations. * - * @param fh the new {@code FileHandler} (can be null) + * @param fh the new {@code FileHandler} (can be null) */ public synchronized void updateFileHandler(final FileHandler fh) { if (handler != null) { diff --git a/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderParameters.java b/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderParameters.java index 9e42ced0a0..fdd0cba858 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderParameters.java +++ b/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderParameters.java @@ -85,7 +85,7 @@ public class BasicBuilderParameters implements Cloneable, BuilderParameters, Bas * Checks whether a map with parameters is present. Throws an exception if not. * * @param params the map with parameters to check - * @throws IllegalArgumentException if the map is null + * @throws IllegalArgumentException if the map is null */ private static void checkParameters(final Map params) { if (params == null) { @@ -115,7 +115,7 @@ private static void createDefensiveCopies(final HashMap params) * like {@link #fetchAndCheckPrefixLookups(Map)}, but tests the default lookups collection. * * @param params the map with parameters - * @return the collection with default lookups (may be null) + * @return the collection with default lookups (may be null) * @throws IllegalArgumentException if invalid data is found */ private static Collection fetchAndCheckDefaultLookups(final Map params) { @@ -155,11 +155,11 @@ private static Collection fetchAndCheckDefaultLookups(final Ma /** * Obtains the {@code BeanHelper} object from the specified map with parameters. This method can be used to obtain an * instance from a parameters map that has been set via the {@code setBeanHelper()} method. If no such instance is - * found, result is null. + * found, result is null. * - * @param params the map with parameters (must not be null) - * @return the {@code BeanHelper} stored in this map or null - * @throws IllegalArgumentException if the map is null + * @param params the map with parameters (must not be null) + * @return the {@code BeanHelper} stored in this map or null + * @throws IllegalArgumentException if the map is null */ public static BeanHelper fetchBeanHelper(final Map params) { checkParameters(params); @@ -170,7 +170,7 @@ public static BeanHelper fetchBeanHelper(final Map params) { * Obtains the collection with default lookups from the parameters map. * * @param params the map with parameters - * @return the collection with default lookups (may be null) + * @return the collection with default lookups (may be null) */ private static Collection fetchDefaultLookups(final Map params) { // This is safe to cast because we either have full control over the map @@ -185,9 +185,9 @@ private static Collection fetchDefaultLookups(final Mapnull) + * @param params the map with parameters (must not be null) * @return an {@code InterpolatorSpecification} object constructed with data from the map - * @throws IllegalArgumentException if the map is null or contains invalid data + * @throws IllegalArgumentException if the map is null or contains invalid data */ public static InterpolatorSpecification fetchInterpolatorSpecification(final Map params) { checkParameters(params); @@ -221,7 +221,7 @@ private static T fetchParameter(final Map params, final Stri * Obtains the map with prefix lookups from the parameters map. * * @param params the map with parameters - * @return the map with prefix lookups (may be null) + * @return the map with prefix lookups (may be null) */ private static Map fetchPrefixLookups(final Map params) { // This is safe to cast because we either have full control over the map @@ -282,10 +282,10 @@ protected void copyPropertiesFrom(final Map source, final String... k /** * Obtains the value of the specified property from the internal map. This method can be used by derived classes if a - * specific property is to be accessed. If the given key is not found, result is null. + * specific property is to be accessed. If the given key is not found, result is null. * * @param key the key of the property in question - * @return the value of the property with this key or null + * @return the value of the property with this key or null */ protected Object fetchProperty(final String key) { return properties.get(key); @@ -321,7 +321,7 @@ public Map getParameters() { * to take over. * * @param source the source properties to inherit from - * @throws IllegalArgumentException if the source map is null + * @throws IllegalArgumentException if the source map is null */ public void inheritFrom(final Map source) { if (source == null) { @@ -336,8 +336,8 @@ public void inheritFrom(final Map source) { * parameters object to the internal storage which are not already in. So properties already defined in this object take * precedence. Property names starting with the reserved parameter prefix are ignored. * - * @param p the object whose properties should be merged (must not be null) - * @throws IllegalArgumentException if the passed in object is null + * @param p the object whose properties should be merged (must not be null) + * @throws IllegalArgumentException if the passed in object is null */ public void merge(final BuilderParameters p) { if (p == null) { @@ -379,7 +379,7 @@ public BasicBuilderParameters setConversionHandler(final ConversionHandler handl } /** - * {@inheritDoc} A defensive copy of the passed in collection is created. A null argument causes all default + * {@inheritDoc} A defensive copy of the passed in collection is created. A null argument causes all default * lookups to be removed from the internal parameters map. */ @Override @@ -403,7 +403,7 @@ public BasicBuilderParameters setInterpolator(final ConfigurationInterpolator ci * Sets the value of the listDelimiterHandler property. This property defines the object responsible for * dealing with list delimiter and escaping characters. Note: * {@link org.apache.commons.configuration2.AbstractConfiguration AbstractConfiguration} does not allow setting this - * property to null. If the default {@code ListDelimiterHandler} is to be used, do not call this method. + * property to null. If the default {@code ListDelimiterHandler} is to be used, do not call this method. * * @param handler the {@code ListDelimiterHandler} * @return a reference to this object for method chaining @@ -435,7 +435,7 @@ public BasicBuilderParameters setParentInterpolator(final ConfigurationInterpola } /** - * {@inheritDoc} A defensive copy of the passed in map is created. A null argument causes all prefix lookups to + * {@inheritDoc} A defensive copy of the passed in map is created. A null argument causes all prefix lookups to * be removed from the internal parameters map. */ @Override @@ -469,8 +469,8 @@ public BasicBuilderParameters setSynchronizer(final Synchronizer sync) { /** * Sets the value of the throwExceptionOnMissing property. This property controls the configuration's behavior - * if missing properties are queried: a value of true causes the configuration to throw an exception, for a value - * of false it will return null values. (Note: Methods returning a primitive data type will always throw + * if missing properties are queried: a value of true causes the configuration to throw an exception, for a value + * of false it will return null values. (Note: Methods returning a primitive data type will always throw * an exception if the property is not defined.) * * @param b the value of the property @@ -483,7 +483,7 @@ public BasicBuilderParameters setThrowExceptionOnMissing(final boolean b) { /** * Sets a property for this parameters object. Properties are stored in an internal map. With this method a new entry - * can be added to this map. If the value is null, the key is removed from the internal map. This method can be + * can be added to this map. If the value is null, the key is removed from the internal map. This method can be * used by sub classes which also store properties in a map. * * @param key the key of the property diff --git a/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java b/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java index ac19e4e773..ec841717a0 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java +++ b/src/main/java/org/apache/commons/configuration2/builder/BasicBuilderProperties.java @@ -106,7 +106,7 @@ public interface BasicBuilderProperties { * Sets the value of the listDelimiterHandler property. This property defines the object responsible for * dealing with list delimiter and escaping characters. Note: * {@link org.apache.commons.configuration2.AbstractConfiguration AbstractConfiguration} does not allow setting this - * property to null. If the default {@code ListDelimiterHandler} is to be used, do not call this method. + * property to null. If the default {@code ListDelimiterHandler} is to be used, do not call this method. * * @param handler the {@code ListDelimiterHandler} * @return a reference to this object for method chaining @@ -150,7 +150,7 @@ public interface BasicBuilderProperties { * instance against concurrent access. The concrete {@code Synchronizer} implementation used determines whether a * configuration instance is thread-safe or not. * - * @param sync the {@code Synchronizer} to be used (a value of null means that a default {@code Synchronizer} is + * @param sync the {@code Synchronizer} to be used (a value of null means that a default {@code Synchronizer} is * used) * @return a reference to this object for method chaining */ @@ -158,8 +158,8 @@ public interface BasicBuilderProperties { /** * Sets the value of the throwExceptionOnMissing property. This property controls the configuration's behavior - * if missing properties are queried: a value of true causes the configuration to throw an exception, for a value - * of false it will return null values. (Note: Methods returning a primitive data type will always throw + * if missing properties are queried: a value of true causes the configuration to throw an exception, for a value + * of false it will return null values. (Note: Methods returning a primitive data type will always throw * an exception if the property is not defined.) * * @param b the value of the property diff --git a/src/main/java/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.java index 417e5208f9..d629a7d101 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/BasicConfigurationBuilder.java @@ -133,8 +133,8 @@ private static void removeListener(final EventSource evSrc, fi * Creates a new instance of {@code BasicConfigurationBuilder} and initializes it with the given result class. No * initialization properties are set. * - * @param resCls the result class (must not be null) - * @throws IllegalArgumentException if the result class is null + * @param resCls the result class (must not be null) + * @throws IllegalArgumentException if the result class is null */ public BasicConfigurationBuilder(final Class resCls) { this(resCls, null); @@ -144,9 +144,9 @@ public BasicConfigurationBuilder(final Class resCls) { * Creates a new instance of {@code BasicConfigurationBuilder} and initializes it with the given result class and an * initial set of builder parameters. The allowFailOnInit flag is set to false. * - * @param resCls the result class (must not be null) + * @param resCls the result class (must not be null) * @param params a map with initialization parameters - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public BasicConfigurationBuilder(final Class resCls, final Map params) { this(resCls, params, false); @@ -154,14 +154,14 @@ public BasicConfigurationBuilder(final Class resCls, final MapallowFailOnInit flag. The map with parameters may be null, + * initial set of builder parameters, and the allowFailOnInit flag. The map with parameters may be null, * in this case no initialization parameters are set. * - * @param resCls the result class (must not be null) + * @param resCls the result class (must not be null) * @param params a map with initialization parameters * @param allowFailOnInit a flag whether exceptions on initializing a newly created {@code ImmutableConfiguration} * object are allowed - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public BasicConfigurationBuilder(final Class resCls, final Map params, final boolean allowFailOnInit) { if (resCls == null) { @@ -178,7 +178,7 @@ public BasicConfigurationBuilder(final Class resCls, final Mapnull + * @throws IllegalArgumentException if the event type or the listener is null */ @Override public void addEventListener(final EventType eventType, final EventListener listener) { @@ -188,7 +188,7 @@ public void addEventListener(final EventType eventType, fin /** * Adds the content of the given map to the already existing initialization parameters. * - * @param params the map with additional initialization parameters; may be null, then this call has no effect + * @param params the map with additional initialization parameters; may be null, then this call has no effect * @return a reference to this builder for method chaining */ public synchronized BasicConfigurationBuilder addParameters(final Map params) { @@ -219,7 +219,7 @@ private void checkResultInstance(final Object inst) { * * @param params an arbitrary number of objects with builder parameters * @return a reference to this builder for method chaining - * @throws NullPointerException if a null array is passed + * @throws NullPointerException if a null array is passed */ public BasicConfigurationBuilder configure(final BuilderParameters... params) { final Map newParams = new HashMap<>(); @@ -241,8 +241,8 @@ public BasicConfigurationBuilder configure(final BuilderParameters... params) * detected again. * * - * @param controller the {@code ReloadingController} to connect to (must not be null) - * @throws IllegalArgumentException if the controller is null + * @param controller the {@code ReloadingController} to connect to (must not be null) + * @throws IllegalArgumentException if the controller is null */ public final void connectToReloadingController(final ReloadingController controller) { if (controller == null) { @@ -256,8 +256,8 @@ public final void connectToReloadingController(final ReloadingController control * This method is intended to be used by derived classes which support inheritance of their properties to other builder * objects. * - * @param target the target configuration builder (must not be null) - * @throws NullPointerException if the target builder is null + * @param target the target configuration builder (must not be null) + * @throws NullPointerException if the target builder is null */ protected synchronized void copyEventListeners(final BasicConfigurationBuilder target) { copyEventListeners(target, eventListeners); @@ -268,9 +268,9 @@ protected synchronized void copyEventListeners(final BasicConfigurationBuildernull) + * @param target the target configuration builder (must not be null) * @param listeners the event listeners to be copied over - * @throws NullPointerException if the target builder is null + * @throws NullPointerException if the target builder is null */ protected void copyEventListeners(final BasicConfigurationBuilder target, final EventListenerList listeners) { target.eventListeners.addAll(listeners); @@ -606,7 +606,7 @@ public void resetResult() { * Sets the initialization parameters of this builder. Already existing parameters are replaced by the content of the * given map. * - * @param params the new initialization parameters of this builder; can be null, then all initialization + * @param params the new initialization parameters of this builder; can be null, then all initialization * parameters are removed * @return a reference to this builder for method chaining */ @@ -618,7 +618,7 @@ public synchronized BasicConfigurationBuilder setParameters(final Mapnull) + * @param newParams the map with new parameters (may be null) */ private void updateParameters(final Map newParams) { final Map map = new HashMap<>(); diff --git a/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java b/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java index 7e068930e6..053709d101 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java +++ b/src/main/java/org/apache/commons/configuration2/builder/BuilderConfigurationWrapperFactory.java @@ -158,8 +158,8 @@ public enum EventSourceSupport { * * @param the type of the configuration objects returned by this method * @param ifcClass the class of the configuration objects returned by this method; this must be an interface class and - * must not be null - * @param builder the wrapped {@code ConfigurationBuilder} (must not be null) + * must not be null + * @param builder the wrapped {@code ConfigurationBuilder} (must not be null) * @param evSrcSupport the level of {@code EventSource} support * @return the wrapper configuration * @throws IllegalArgumentException if a required parameter is missing @@ -183,7 +183,7 @@ public static T createBuilderConfigurationWra * Gets an array with the classes the generated proxy has to support. * * @param ifcClass the class of the configuration objects returned by this method; this must be an interface class and - * must not be null + * must not be null * @param evSrcSupport the level of {@code EventSource} support * @return an array with the interface classes to implement */ @@ -219,8 +219,8 @@ public BuilderConfigurationWrapperFactory(final EventSourceSupport evSrcSupport) * * @param the type of the configuration objects returned by this method * @param ifcClass the class of the configuration objects returned by this method; this must be an interface class and - * must not be null - * @param builder the wrapped {@code ConfigurationBuilder} (must not be null) + * must not be null + * @param builder the wrapped {@code ConfigurationBuilder} (must not be null) * @return the wrapper configuration * @throws IllegalArgumentException if a required parameter is missing * @throws org.apache.commons.configuration2.ex.ConfigurationRuntimeException if an error occurs when creating the diff --git a/src/main/java/org/apache/commons/configuration2/builder/BuilderParameters.java b/src/main/java/org/apache/commons/configuration2/builder/BuilderParameters.java index c2cdc4ec9d..22e4b69168 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/BuilderParameters.java +++ b/src/main/java/org/apache/commons/configuration2/builder/BuilderParameters.java @@ -44,7 +44,7 @@ public interface BuilderParameters { /** * Gets a map with all parameters defined by this objects. The keys of the map correspond to concrete properties * supported by the {@code Configuration} implementation class the builder produces. The values are the corresponding - * property values. The return value must not be null. + * property values. The return value must not be null. * * @return a map with builder parameters */ diff --git a/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderEvent.java b/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderEvent.java index c5dc3eaabe..f3a2db6805 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderEvent.java +++ b/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderEvent.java @@ -58,8 +58,8 @@ public class ConfigurationBuilderEvent extends Event { /** * Creates a new instance of {@code ConfigurationBuilderEvent} and sets basic properties. * - * @param source the {@code ConfigurationBuilder} object which triggered this event (must not be null) - * @param evType the type of this event (must not be null) + * @param source the {@code ConfigurationBuilder} object which triggered this event (must not be null) + * @param evType the type of this event (must not be null) * @throws IllegalArgumentException if a required parameter is null */ public ConfigurationBuilderEvent(final ConfigurationBuilder source, final EventType evType) { diff --git a/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderResultCreatedEvent.java b/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderResultCreatedEvent.java index 5b4e0f0d89..01913b80cd 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderResultCreatedEvent.java +++ b/src/main/java/org/apache/commons/configuration2/builder/ConfigurationBuilderResultCreatedEvent.java @@ -58,9 +58,9 @@ public class ConfigurationBuilderResultCreatedEvent extends ConfigurationBuilder /** * Creates a new instance of {@code ConfigurationBuilderResultCreatedEvent} and initializes its properties. * - * @param source the {@code ConfigurationBuilder} object which triggered this event (must not be null) - * @param evType the type of this event (must not be null) - * @param createdConfiguration the newly created {@code ImmutableConfiguration} object (must not be null) + * @param source the {@code ConfigurationBuilder} object which triggered this event (must not be null) + * @param evType the type of this event (must not be null) + * @param createdConfiguration the newly created {@code ImmutableConfiguration} object (must not be null) * @throws IllegalArgumentException if a required parameter is null */ public ConfigurationBuilderResultCreatedEvent(final ConfigurationBuilder source, diff --git a/src/main/java/org/apache/commons/configuration2/builder/CopyObjectDefaultHandler.java b/src/main/java/org/apache/commons/configuration2/builder/CopyObjectDefaultHandler.java index 78ff60d1da..c72bfcb14e 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/CopyObjectDefaultHandler.java +++ b/src/main/java/org/apache/commons/configuration2/builder/CopyObjectDefaultHandler.java @@ -47,8 +47,8 @@ public class CopyObjectDefaultHandler implements DefaultParametersHandlernull) - * @throws IllegalArgumentException if the source object is null + * @param src the source object (must not be null) + * @throws IllegalArgumentException if the source object is null */ public CopyObjectDefaultHandler(final BuilderParameters src) { if (src == null) { diff --git a/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersManager.java b/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersManager.java index 952ca062f2..ea123a7a81 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersManager.java +++ b/src/main/java/org/apache/commons/configuration2/builder/DefaultParametersManager.java @@ -91,7 +91,7 @@ public void applyHandlerIfMatching(final BuilderParameters obj) { * * @param h the handler to be checked * @param startCls the start class - * @return true if this instance refers to this occurrence, false otherwise + * @return true if this instance refers to this occurrence, false otherwise */ public boolean isOccurrence(final DefaultParametersHandler h, final Class startCls) { return h == handler && (startCls == null || startCls.equals(startClass)); @@ -113,7 +113,7 @@ public DefaultParametersManager() { * objects registered at this instance. Using this method the passed in parameters object can be populated with default * values. * - * @param params the parameters object to be initialized (may be null, then this method has no effect) + * @param params the parameters object to be initialized (may be null, then this method has no effect) */ public void initializeParameters(final BuilderParameters params) { if (params != null) { @@ -129,8 +129,8 @@ public void initializeParameters(final BuilderParameters params) { * they were registered. So handlers registered later may override the values set by handlers registered earlier. * * @param the type of the parameters supported by this handler - * @param paramsClass the parameters class supported by this handler (must not be null) - * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) + * @param paramsClass the parameters class supported by this handler (must not be null) + * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) * @throws IllegalArgumentException if a required parameter is missing */ public void registerDefaultsHandler(final Class paramsClass, final DefaultParametersHandler handler) { @@ -155,13 +155,13 @@ public void registerDefaultsHandler(final Class paramsClass, final Defaul * {@link org.apache.commons.configuration2.builder.fluent.XMLBuilderParameters XMLBuilderParameters}). This can be * achieved by passing in {@code PropertiesBuilderParameters} as start class. In this case, * {@code DefaultParametersManager} ensures that the handler is only called on parameter objects having both the start - * class and the actual type supported by the handler as base interfaces. The passed in start class can be null; + * class and the actual type supported by the handler as base interfaces. The passed in start class can be null; * then the parameter class supported by the handler is used (which is the default behavior of the * {@link #registerDefaultsHandler(Class, DefaultParametersHandler)} method). * * @param the type of the parameters supported by this handler - * @param paramsClass the parameters class supported by this handler (must not be null) - * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) + * @param paramsClass the parameters class supported by this handler (must not be null) + * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) * @param startClass an optional start class in the hierarchy of parameter objects for which this handler should be * applied * @throws IllegalArgumentException if a required parameter is missing @@ -189,7 +189,7 @@ public void unregisterDefaultsHandler(final DefaultParametersHandler handler) /** * Removes the specified {@code DefaultParametersHandler} from this instance if it is in combination with the given * start class. If this handler has been registered multiple times for different start classes, only occurrences for the - * given start class are removed. The {@code startClass} parameter can be null, then all occurrences of the + * given start class are removed. The {@code startClass} parameter can be null, then all occurrences of the * handler are removed. * * @param handler the {@code DefaultParametersHandler} to be removed diff --git a/src/main/java/org/apache/commons/configuration2/builder/EventListenerProvider.java b/src/main/java/org/apache/commons/configuration2/builder/EventListenerProvider.java index 8ef50f73ef..b926b5e864 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/EventListenerProvider.java +++ b/src/main/java/org/apache/commons/configuration2/builder/EventListenerProvider.java @@ -38,7 +38,7 @@ public interface EventListenerProvider { * Gets an {@code EventListenerList} object with information about event listener registrations. All listeners * contained in this object are added to the processing {@code ConfigurationBuilder}. * - * @return the {@code EventListenerList} with event listener registrations (must not be null) + * @return the {@code EventListenerList} with event listener registrations (must not be null) */ EventListenerList getListeners(); } diff --git a/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java b/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java index d0b0f91bb8..39018e60f7 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java +++ b/src/main/java/org/apache/commons/configuration2/builder/FileBasedBuilderParametersImpl.java @@ -57,10 +57,10 @@ public class FileBasedBuilderParametersImpl extends BasicBuilderParameters imple * Creates a new {@code FileBasedBuilderParametersImpl} object from the content of the given map. While * {@code fromParameters()} expects that an object already exists and is stored in the given map, this method creates a * new instance based on the content of the map. The map can contain properties of a {@code FileHandler} and some - * additional settings which are stored directly in the newly created object. If the map is null, an + * additional settings which are stored directly in the newly created object. If the map is null, an * uninitialized instance is returned. * - * @param map the map with properties (must not be null) + * @param map the map with properties (must not be null) * @return the newly created instance * @throws ClassCastException if the map contains invalid data */ @@ -77,9 +77,9 @@ public static FileBasedBuilderParametersImpl fromMap(final Map map) { * Looks up an instance of this class in the specified parameters map. This is equivalent to * {@code fromParameters(params, false};} * - * @param params the map with parameters (must not be null - * @return the instance obtained from the map or null - * @throws IllegalArgumentException if the map is null + * @param params the map with parameters (must not be null + * @return the instance obtained from the map or null + * @throws IllegalArgumentException if the map is null */ public static FileBasedBuilderParametersImpl fromParameters(final Map params) { return fromParameters(params, false); @@ -90,11 +90,11 @@ public static FileBasedBuilderParametersImpl fromParameters(final Map * This method can be used to obtain an instance of this class which has been stored in a parameters map. It is * compatible with the {@code getParameters()} method. * - * @param params the map with parameters (must not be null - * @param createIfMissing determines the behavior if no instance is found in the map; if true, a new instance - * with default settings is created; if false, null is returned - * @return the instance obtained from the map or null - * @throws IllegalArgumentException if the map is null + * @param params the map with parameters (must not be null + * @param createIfMissing determines the behavior if no instance is found in the map; if true, a new instance + * with default settings is created; if false, null is returned + * @return the instance obtained from the map or null + * @throws IllegalArgumentException if the map is null */ public static FileBasedBuilderParametersImpl fromParameters(final Map params, final boolean createIfMissing) { if (params == null) { @@ -128,9 +128,9 @@ public FileBasedBuilderParametersImpl() { /** * Creates a new instance of {@code FileBasedBuilderParametersImpl} and associates it with the given {@code FileHandler} - * object. If the handler is null, a new handler instance is created. + * object. If the handler is null, a new handler instance is created. * - * @param handler the associated {@code FileHandler} (can be null) + * @param handler the associated {@code FileHandler} (can be null) */ public FileBasedBuilderParametersImpl(final FileHandler handler) { fileHandler = handler != null ? handler : new FileHandler(); @@ -169,7 +169,7 @@ public Map getParameters() { } /** - * Gets the {@code ReloadingDetectorFactory}. Result may be null which means that the default factory is to be + * Gets the {@code ReloadingDetectorFactory}. Result may be null which means that the default factory is to be * used. * * @return the {@code ReloadingDetectorFactory} @@ -179,7 +179,7 @@ public ReloadingDetectorFactory getReloadingDetectorFactory() { } /** - * Gets the refresh delay for reload operations. Result may be null if this value has not been set. + * Gets the refresh delay for reload operations. Result may be null if this value has not been set. * * @return the reloading refresh delay */ diff --git a/src/main/java/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.java index 6383e98df1..6f570c63eb 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/FileBasedConfigurationBuilder.java @@ -56,10 +56,10 @@ public class FileBasedConfigurationBuilder ext /** * Gets the default encoding for the specified configuration class. If an encoding has been set for the specified - * class (or one of its super classes), it is returned. Otherwise, result is null. + * class (or one of its super classes), it is returned. Otherwise, result is null. * * @param configClass the configuration class in question - * @return the default encoding for this class (may be null) + * @return the default encoding for this class (may be null) */ public static String getDefaultEncoding(final Class configClass) { String enc = DEFAULT_ENCODINGS.get(configClass); @@ -100,11 +100,11 @@ private static Map, String> initializeDefaultEncodings() { * Sets a default encoding for a specific configuration class. This encoding is used if an instance of this * configuration class is to be created and no encoding has been set in the parameters object for this builder. The * encoding passed here not only applies to the specified class but also to its sub classes. If the encoding is - * null, it is removed. + * null, it is removed. * - * @param configClass the name of the configuration class (must not be null) + * @param configClass the name of the configuration class (must not be null) * @param encoding the default encoding for this class - * @throws IllegalArgumentException if the class is null + * @throws IllegalArgumentException if the class is null */ public static void setDefaultEncoding(final Class configClass, final String encoding) { if (configClass == null) { @@ -130,8 +130,8 @@ public static void setDefaultEncoding(final Class configClass, final String e /** * Creates a new instance of {@code FileBasedConfigurationBuilder} which produces result objects of the specified class. * - * @param resCls the result class (must not be null - * @throws IllegalArgumentException if the result class is null + * @param resCls the result class (must not be null + * @throws IllegalArgumentException if the result class is null */ public FileBasedConfigurationBuilder(final Class resCls) { super(resCls); @@ -141,9 +141,9 @@ public FileBasedConfigurationBuilder(final Class resCls) { * Creates a new instance of {@code FileBasedConfigurationBuilder} which produces result objects of the specified class * and sets initialization parameters. * - * @param resCls the result class (must not be null + * @param resCls the result class (must not be null * @param params a map with initialization parameters - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public FileBasedConfigurationBuilder(final Class resCls, final Map params) { super(resCls, params); @@ -153,10 +153,10 @@ public FileBasedConfigurationBuilder(final Class resCls, final Map< * Creates a new instance of {@code FileBasedConfigurationBuilder} which produces result objects of the specified class * and sets initialization parameters and the allowFailOnInit flag. * - * @param resCls the result class (must not be null + * @param resCls the result class (must not be null * @param params a map with initialization parameters * @param allowFailOnInit the allowFailOnInit flag - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public FileBasedConfigurationBuilder(final Class resCls, final Map params, final boolean allowFailOnInit) { super(resCls, params, allowFailOnInit); @@ -190,7 +190,7 @@ private FileHandler fetchFileHandlerFromParameters() { /** * Gets the {@code FileHandler} associated with this builder. If already a result object has been created, this * {@code FileHandler} can be used to save it. Otherwise, the {@code FileHandler} from the initialization parameters is - * returned (which is not associated with a {@code FileBased} object). Result is never null. + * returned (which is not associated with a {@code FileBased} object). Result is never null. * * @return the {@code FileHandler} associated with this builder */ @@ -260,7 +260,7 @@ private void installAutoSaveListener() { /** * Gets a flag whether auto save mode is currently active. * - * @return true if auto save is enabled, false otherwise + * @return true if auto save is enabled, false otherwise */ public synchronized boolean isAutoSave() { return autoSaveListener != null; @@ -292,7 +292,7 @@ public void save() throws ConfigurationException { * Enables or disables auto save mode. If auto save mode is enabled, every update of the managed configuration causes it * to be saved automatically; so changes are directly written to disk. * - * @param enabled true if auto save mode is to be enabled, false otherwise + * @param enabled true if auto save mode is to be enabled, false otherwise */ public synchronized void setAutoSave(final boolean enabled) { if (enabled) { diff --git a/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.java b/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.java index b79ab4d39a..b336894cc8 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.java +++ b/src/main/java/org/apache/commons/configuration2/builder/PropertiesBuilderProperties.java @@ -50,7 +50,7 @@ default T setIncludeListener(final ConfigurationConsumer } /** - * Sets a flag whether include files are supported by the properties configuration object. If set to true, files + * Sets a flag whether include files are supported by the properties configuration object. If set to true, files * listed by an include property are loaded automatically. * * @param f the value of the flag diff --git a/src/main/java/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.java index 61ac0014c5..9dc70f4b39 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/ReloadingFileBasedConfigurationBuilder.java @@ -81,8 +81,8 @@ private static ReloadingDetectorFactory fetchDetectorFactory(final FileBasedBuil * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the * specified class. * - * @param resCls the result class (must not be null - * @throws IllegalArgumentException if the result class is null + * @param resCls the result class (must not be null + * @throws IllegalArgumentException if the result class is null */ public ReloadingFileBasedConfigurationBuilder(final Class resCls) { super(resCls); @@ -93,9 +93,9 @@ public ReloadingFileBasedConfigurationBuilder(final Class resCls) { * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the * specified class and sets initialization parameters. * - * @param resCls the result class (must not be null + * @param resCls the result class (must not be null * @param params a map with initialization parameters - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public ReloadingFileBasedConfigurationBuilder(final Class resCls, final Map params) { super(resCls, params); @@ -106,10 +106,10 @@ public ReloadingFileBasedConfigurationBuilder(final Class resCls, f * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the * specified class and sets initialization parameters and the allowFailOnInit flag. * - * @param resCls the result class (must not be null + * @param resCls the result class (must not be null * @param params a map with initialization parameters * @param allowFailOnInit the allowFailOnInit flag - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public ReloadingFileBasedConfigurationBuilder(final Class resCls, final Map params, final boolean allowFailOnInit) { super(resCls, params, allowFailOnInit); diff --git a/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderParametersImpl.java b/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderParametersImpl.java index f5b65de82e..8db159eda2 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderParametersImpl.java +++ b/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderParametersImpl.java @@ -57,10 +57,10 @@ public class XMLBuilderParametersImpl extends HierarchicalBuilderParametersImpl private static final String PROP_SCHEMA_VALIDATION = "schemaValidation"; /** - * Gets the {@code EntityResolver} stored in this parameters object. Result is null if no such object has been + * Gets the {@code EntityResolver} stored in this parameters object. Result is null if no such object has been * set. * - * @return the {@code EntityResolver} or null + * @return the {@code EntityResolver} or null */ public EntityResolver getEntityResolver() { return (EntityResolver) fetchProperty(PROP_ENTITY_RESOLVER); diff --git a/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderProperties.java b/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderProperties.java index a7bf485098..6c329b56a6 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderProperties.java +++ b/src/main/java/org/apache/commons/configuration2/builder/XMLBuilderProperties.java @@ -64,7 +64,7 @@ public interface XMLBuilderProperties { /** * Sets the value of the schemaValidation flag. This flag determines whether DTD or Schema validation should be used. * - * @param f the flag value, true for schema validation, false for DTD validation + * @param f the flag value, true for schema validation, false for DTD validation * @return a reference to this object for method chaining */ T setSchemaValidation(boolean f); diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/BaseConfigurationBuilderProvider.java b/src/main/java/org/apache/commons/configuration2/builder/combined/BaseConfigurationBuilderProvider.java index 041ec740b5..0a1dbfae6a 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/BaseConfigurationBuilderProvider.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/BaseConfigurationBuilderProvider.java @@ -100,10 +100,10 @@ private static Collection initParameterClasses(final Collection /** * Creates a new instance of {@code BaseConfigurationBuilderProvider} and initializes all its properties. * - * @param bldrCls the name of the builder class (must not be null) - * @param reloadBldrCls the name of a builder class to be used if reloading support is required (null if + * @param bldrCls the name of the builder class (must not be null) + * @param reloadBldrCls the name of a builder class to be used if reloading support is required (null if * reloading is not supported) - * @param configCls the name of the configuration class (must not be null) + * @param configCls the name of the configuration class (must not be null) * @param paramCls a collection with the names of parameters classes * @throws IllegalArgumentException if a required parameter is missing */ @@ -256,7 +256,7 @@ public Collection getParameterClasses() { /** * Gets the name of the class of the builder created by this provider if the reload flag is set. If this method - * returns null, reloading builders are not supported by this provider. + * returns null, reloading builders are not supported by this provider. * * @return the reloading builder class */ diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderParametersImpl.java b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderParametersImpl.java index b6159e7616..fbc47e6932 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderParametersImpl.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderParametersImpl.java @@ -55,9 +55,9 @@ public class CombinedBuilderParametersImpl extends BasicBuilderParameters implem * Looks up an instance of this class in the specified parameters map. This is equivalent to * {@code fromParameters(params, false);} * - * @param params the map with parameters (must not be null - * @return the instance obtained from the map or null - * @throws NullPointerException if the map is null + * @param params the map with parameters (must not be null + * @return the instance obtained from the map or null + * @throws NullPointerException if the map is null */ public static CombinedBuilderParametersImpl fromParameters(final Map params) { return fromParameters(params, false); @@ -68,11 +68,11 @@ public static CombinedBuilderParametersImpl fromParameters(final Map * This method can be used to obtain an instance of this class which has been stored in a parameters map. It is * compatible with the {@code getParameters()} method. * - * @param params the map with parameters (must not be null - * @param createIfMissing determines the behavior if no instance is found in the map; if true, a new instance - * with default settings is created; if false, null is returned - * @return the instance obtained from the map or null - * @throws NullPointerException if the map is null + * @param params the map with parameters (must not be null + * @param createIfMissing determines the behavior if no instance is found in the map; if true, a new instance + * with default settings is created; if false, null is returned + * @return the instance obtained from the map or null + * @throws NullPointerException if the map is null */ public static CombinedBuilderParametersImpl fromParameters(final Map params, final boolean createIfMissing) { CombinedBuilderParametersImpl result = (CombinedBuilderParametersImpl) params.get(PARAM_KEY); @@ -123,7 +123,7 @@ public CombinedBuilderParametersImpl clone() { } /** - * Gets the base path for relative names of configuration sources. Result may be null if no base path has been + * Gets the base path for relative names of configuration sources. Result may be null if no base path has been * set. * * @return the base path for resolving relative file names @@ -134,7 +134,7 @@ public String getBasePath() { /** * Gets the {@code DefaultParametersManager} object for initializing parameter objects for child configuration - * sources. This method never returns null. If no manager was set, a new instance is created right now. + * sources. This method never returns null. If no manager was set, a new instance is created right now. * * @return the {@code DefaultParametersManager} for child configuration sources */ @@ -168,7 +168,7 @@ public ConfigurationBuilder> getDefinitio /** * Gets the parameters object for the definition configuration builder if present. * - * @return the parameters object for the definition configuration builder or null + * @return the parameters object for the definition configuration builder or null */ public BuilderParameters getDefinitionBuilderParameters() { return definitionBuilderParameters; @@ -219,11 +219,11 @@ public boolean isInheritSettings() { } /** - * Returns the {@code ConfigurationBuilderProvider} which is registered for the specified tag name or null if + * Returns the {@code ConfigurationBuilderProvider} which is registered for the specified tag name or null if * there is no registration for this tag. * * @param tagName the tag name - * @return the provider registered for this tag or null + * @return the provider registered for this tag or null */ public ConfigurationBuilderProvider providerForTag(final String tagName) { return providers.get(tagName); @@ -255,9 +255,9 @@ public CombinedBuilderParametersImpl registerChildDefaultsHandler(final Clas * registered. This method works like the method with the same name, but the map with providers is obtained from the * passed in parameters object. * - * @param params the parameters object from which to copy providers(must not be null) + * @param params the parameters object from which to copy providers(must not be null) * @return a reference to this object for method chaining - * @throws IllegalArgumentException if the source parameters object is null + * @throws IllegalArgumentException if the source parameters object is null */ public CombinedBuilderParametersImpl registerMissingProviders(final CombinedBuilderParametersImpl params) { if (params == null) { @@ -272,10 +272,10 @@ public CombinedBuilderParametersImpl registerMissingProviders(final CombinedBuil * providers contained in a parameters object and adds all standard providers. This way it is possible to override a * standard provider by registering a provider object for the same tag name at the parameters object. * - * @param providers a map with tag names and corresponding providers (must not be null or contain null + * @param providers a map with tag names and corresponding providers (must not be null or contain null * entries) * @return a reference to this object for method chaining - * @throws IllegalArgumentException if the map with providers is null or contains null entries + * @throws IllegalArgumentException if the map with providers is null or contains null entries */ public CombinedBuilderParametersImpl registerMissingProviders(final Map providers) { if (providers == null) { @@ -293,8 +293,8 @@ public CombinedBuilderParametersImpl registerMissingProviders(final Mapnull) - * @param provider the {@code ConfigurationBuilderProvider} (must not be null) + * @param tagName the name of the tag (must not be null) + * @param provider the {@code ConfigurationBuilderProvider} (must not be null) * @return a reference to this object for method chaining * @throws IllegalArgumentException if a required parameter is missing */ diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderProperties.java b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderProperties.java index a215f676bc..124c18b5e3 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderProperties.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedBuilderProperties.java @@ -72,8 +72,8 @@ public interface CombinedBuilderProperties { * Registers the given {@code ConfigurationBuilderProvider} for the specified tag name. This means that whenever this * tag is encountered in a configuration definition file, the corresponding builder provider is invoked. * - * @param tagName the name of the tag (must not be null) - * @param provider the {@code ConfigurationBuilderProvider} (must not be null) + * @param tagName the name of the tag (must not be null) + * @param provider the {@code ConfigurationBuilderProvider} (must not be null) * @return a reference to this object for method chaining * @throws IllegalArgumentException if a required parameter is missing */ @@ -127,7 +127,7 @@ public interface CombinedBuilderProperties { /** * Sets a flag whether the child configurations created by a {@code CombinedConfigurationBuilder} should inherit the * settings defined for the builder. This is typically useful because for configurations coming from homogeneous sources - * often similar conventions are used. Therefore, this flag is true per default. + * often similar conventions are used. Therefore, this flag is true per default. * * @param f the flag whether settings should be inherited by child configurations * @return a reference to this object for method chaining diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.java index e80e3b1ac2..33dba55f56 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/CombinedConfigurationBuilder.java @@ -379,10 +379,10 @@ public Collection> getChildBuilder /** * Gets the {@code ConfigurationBuilder} with the given name. If no such builder is defined in the definition - * configuration, result is null. + * configuration, result is null. * * @param name the name of the builder in question - * @return the builder with this name or null + * @return the builder with this name or null */ public ConfigurationBuilder getNamedBuilder(final String name) { return namedBuilders.get(name); @@ -817,7 +817,7 @@ protected ConfigurationBuilder> createXML * Returns a map with the current prefix lookup objects. This map is obtained from the {@code ConfigurationInterpolator} * of the configuration under construction. * - * @return the map with current prefix lookups (may be null) + * @return the map with current prefix lookups (may be null) */ private Map fetchPrefixLookups() { final CombinedConfiguration cc = getConfigurationUnderConstruction(); @@ -1066,7 +1066,7 @@ private void initDefaultChildParameters(final BuilderParameters params) { * sources. * * @param config the definition configuration - * @return the default {@code FileSystem} (may be null) + * @return the default {@code FileSystem} (may be null) * @throws ConfigurationException if an error occurs */ protected FileSystem initFileSystem(final HierarchicalConfiguration config) throws ConfigurationException { @@ -1133,7 +1133,7 @@ protected void initResultInstance(final CombinedConfiguration result) throws Con * configured, all of its properties are added to the system properties. * * @param config the definition configuration - * @param basePath the base path defined for this builder (may be null) + * @param basePath the base path defined for this builder (may be null) * @throws ConfigurationException if an error occurs. */ protected void initSystemProperties(final HierarchicalConfiguration config, final String basePath) throws ConfigurationException { @@ -1153,7 +1153,7 @@ protected void initSystemProperties(final HierarchicalConfiguration config, f * supports all default providers and custom providers added through the parameters object as well. * * @param tagName the name of the tag - * @return the provider that was registered for this tag or null if there is none + * @return the provider that was registered for this tag or null if there is none */ protected ConfigurationBuilderProvider providerForTag(final String tagName) { return currentParameters.providerForTag(tagName); diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java b/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java index adb1e41035..b5dadd3395 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/ConfigurationDeclaration.java @@ -52,7 +52,7 @@ public ConfigurationDeclaration(final CombinedConfigurationBuilder builder, fina /** * Gets the value of the {@code at} attribute. * - * @return the value of the {@code at} attribute (can be null) + * @return the value of the {@code at} attribute (can be null) */ public String getAt() { final String result = getConfiguration().getString(CombinedConfigurationBuilder.ATTR_AT_RES); @@ -60,7 +60,7 @@ public String getAt() { } /** - * Gets the bean's class name. This implementation will always return null. + * Gets the bean's class name. This implementation will always return null. * * @return the name of the bean's class */ @@ -91,9 +91,9 @@ public CombinedConfigurationBuilder getConfigurationBuilder() { /** * Gets the name for the represented configuration source. The name is optional, so this method can return - * null. + * null. * - * @return the name of the associated configuration source or null + * @return the name of the associated configuration source or null */ public String getName() { return getConfiguration().getString(CombinedConfigurationBuilder.ATTR_NAME); diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/FileExtensionConfigurationBuilderProvider.java b/src/main/java/org/apache/commons/configuration2/builder/combined/FileExtensionConfigurationBuilderProvider.java index 02fbf9682e..4abf5f0d01 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/FileExtensionConfigurationBuilderProvider.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/FileExtensionConfigurationBuilderProvider.java @@ -47,10 +47,10 @@ public class FileExtensionConfigurationBuilderProvider extends BaseConfiguration private static final char EXT_SEPARATOR = '.'; /** - * Extracts the extension from the given file name. The name can be null. + * Extracts the extension from the given file name. The name can be null. * * @param fileName the file name - * @return the extension (null if there is none) + * @return the extension (null if there is none) */ private static String extractExtension(final String fileName) { if (fileName == null) { @@ -65,7 +65,7 @@ private static String extractExtension(final String fileName) { * Tries to obtain the current file name from the given list of parameter objects. * * @param params the parameter objects - * @return the file name or null if unspecified + * @return the file name or null if unspecified */ private static String fetchCurrentFileName(final Collection params) { for (final BuilderParameters p : params) { @@ -87,16 +87,16 @@ private static String fetchCurrentFileName(final Collection p * Creates a new instance of {@code FileExtensionConfigurationBuilderProvider}. * * @param bldrCls the name of the builder class - * @param reloadBldrCls the name of a builder class to be used if reloading support is required (null if + * @param reloadBldrCls the name of a builder class to be used if reloading support is required (null if * reloading is not supported) * @param matchingConfigCls the name of the configuration class to be used if the provided file extension matches (must - * not be null) + * not be null) * @param defConfigClass the name of the configuration class to be used if the provided file extension does not match - * (must not be null) - * @param ext the file extension to select the configuration class (must not be null) + * (must not be null) + * @param ext the file extension to select the configuration class (must not be null) * @param paramCls a collection with the names of parameters classes; an instance of a parameters object with basic * properties is created automatically and does not need to be contained in this list; the collection can be - * null if no additional parameter objects are needed + * null if no additional parameter objects are needed * @throws IllegalArgumentException if a required parameter is missing */ public FileExtensionConfigurationBuilderProvider(final String bldrCls, final String reloadBldrCls, final String matchingConfigCls, diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderParametersImpl.java b/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderParametersImpl.java index 2918005690..c63e5d9e33 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderParametersImpl.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileBuilderParametersImpl.java @@ -52,11 +52,11 @@ public class MultiFileBuilderParametersImpl extends BasicBuilderParameters imple /** * Obtains an instance of this class from the given map with parameters. If this map does not contain an instance, - * result is null. This is equivalent to {@code fromParameters(params, false)}. + * result is null. This is equivalent to {@code fromParameters(params, false)}. * - * @param params the map with parameters (must not be null) - * @return an instance of this class fetched from the map or null - * @throws NullPointerException if the map with parameters is null + * @param params the map with parameters (must not be null) + * @return an instance of this class fetched from the map or null + * @throws NullPointerException if the map with parameters is null */ public static MultiFileBuilderParametersImpl fromParameters(final Map params) { return fromParameters(params, false); @@ -66,12 +66,12 @@ public static MultiFileBuilderParametersImpl fromParameters(final Maptrue, a new instance is created. Otherwise, result is null. + * {@code createIfMissing} parameter is true, a new instance is created. Otherwise, result is null. * - * @param params the map with parameters (must not be null) + * @param params the map with parameters (must not be null) * @param createIfMissing a flag whether a new instance should be created if necessary - * @return an instance of this class fetched from the map or null - * @throws NullPointerException if the map with parameters is null + * @return an instance of this class fetched from the map or null + * @throws NullPointerException if the map with parameters is null */ public static MultiFileBuilderParametersImpl fromParameters(final Map params, final boolean createIfMissing) { MultiFileBuilderParametersImpl instance = (MultiFileBuilderParametersImpl) params.get(PARAM_KEY); diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.java index e0b84b8e56..10331f68e9 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/MultiFileConfigurationBuilder.java @@ -131,7 +131,7 @@ private static boolean isEventTypeForManagedBuilders(final EventType eventTyp * Creates a new instance of {@code MultiFileConfigurationBuilder} without setting initialization parameters. * * @param resCls the result configuration class - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public MultiFileConfigurationBuilder(final Class resCls) { super(resCls); @@ -142,7 +142,7 @@ public MultiFileConfigurationBuilder(final Class resCls) { * * @param resCls the result configuration class * @param params a map with initialization parameters - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public MultiFileConfigurationBuilder(final Class resCls, final Map params) { super(resCls, params); @@ -155,7 +155,7 @@ public MultiFileConfigurationBuilder(final Class resCls, final Map< * @param resCls the result configuration class * @param params a map with initialization parameters * @param allowFailOnInit a flag whether initialization errors should be ignored - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public MultiFileConfigurationBuilder(final Class resCls, final Map params, final boolean allowFailOnInit) { super(resCls, params, allowFailOnInit); diff --git a/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingMultiFileConfigurationBuilder.java b/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingMultiFileConfigurationBuilder.java index 9cfdd4a738..3b631457a9 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingMultiFileConfigurationBuilder.java +++ b/src/main/java/org/apache/commons/configuration2/builder/combined/ReloadingMultiFileConfigurationBuilder.java @@ -64,7 +64,7 @@ public class ReloadingMultiFileConfigurationBuildernull + * @throws IllegalArgumentException if the result class is null */ public ReloadingMultiFileConfigurationBuilder(final Class resCls) { super(resCls); @@ -75,7 +75,7 @@ public ReloadingMultiFileConfigurationBuilder(final Class resCls) { * * @param resCls the result configuration class * @param params a map with initialization parameters - * @throws IllegalArgumentException if the result class is null + * @throws IllegalArgumentException if the result class is null */ public ReloadingMultiFileConfigurationBuilder(final Class resCls, final Map params) { super(resCls, params); @@ -88,7 +88,7 @@ public ReloadingMultiFileConfigurationBuilder(final Class resCls, final Mapnull + * @throws IllegalArgumentException if the result class is null */ public ReloadingMultiFileConfigurationBuilder(final Class resCls, final Map params, final boolean allowFailOnInit) { super(resCls, params, allowFailOnInit); diff --git a/src/main/java/org/apache/commons/configuration2/builder/fluent/Configurations.java b/src/main/java/org/apache/commons/configuration2/builder/fluent/Configurations.java index c414e47bfb..dc85e7773d 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/fluent/Configurations.java +++ b/src/main/java/org/apache/commons/configuration2/builder/fluent/Configurations.java @@ -84,7 +84,7 @@ public Configurations() { /** * Creates a new instance of {@code Configurations} and initializes it with the specified {@code Parameters} object. * - * @param params the {@code Parameters} (may be null, then a default instance is created) + * @param params the {@code Parameters} (may be null, then a default instance is created) */ public Configurations(final Parameters params) { parameters = params != null ? params : new Parameters(); diff --git a/src/main/java/org/apache/commons/configuration2/builder/fluent/Parameters.java b/src/main/java/org/apache/commons/configuration2/builder/fluent/Parameters.java index b75ca475ea..3dec513982 100644 --- a/src/main/java/org/apache/commons/configuration2/builder/fluent/Parameters.java +++ b/src/main/java/org/apache/commons/configuration2/builder/fluent/Parameters.java @@ -131,7 +131,7 @@ public Parameters() { * Because {@code DefaultParametersManager} is thread-safe, it makes sense to share a single instance between multiple * {@code Parameters} objects; that way the same initialization is performed on newly created parameters objects. * - * @param manager the {@code DefaultParametersHandler} (may be null, then a new default instance is created) + * @param manager the {@code DefaultParametersHandler} (may be null, then a new default instance is created) */ public Parameters(final DefaultParametersManager manager) { defaultParametersManager = manager != null ? manager : new DefaultParametersManager(); @@ -252,8 +252,8 @@ public PropertiesBuilderParameters properties() { * method which just delegates to the associated {@code DefaultParametersManager}. * * @param the type of the parameters supported by this handler - * @param paramsClass the parameters class supported by this handler (must not be null) - * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) + * @param paramsClass the parameters class supported by this handler (must not be null) + * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) * @throws IllegalArgumentException if a required parameter is missing * @see DefaultParametersManager */ @@ -267,8 +267,8 @@ public void registerDefaultsHandler(final Class paramsClass, final Defaul * {@code DefaultParametersManager}. * * @param the type of the parameters supported by this handler - * @param paramsClass the parameters class supported by this handler (must not be null) - * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) + * @param paramsClass the parameters class supported by this handler (must not be null) + * @param handler the {@code DefaultParametersHandler} to be registered (must not be null) * @param startClass an optional start class in the hierarchy of parameter objects for which this handler should be * applied * @throws IllegalArgumentException if a required parameter is missing diff --git a/src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java b/src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java index 3f4de63f19..619a264670 100644 --- a/src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java +++ b/src/main/java/org/apache/commons/configuration2/convert/AbstractListDelimiterHandler.java @@ -31,7 +31,7 @@ *

    * This base class provides a fully functional implementation for parsing a value object which can deal with different * cases like collections, arrays, iterators, etc. This logic is typically needed by every concrete subclass. Other - * methods are partly implemented handling special corner cases like null values; concrete subclasses do not have + * methods are partly implemented handling special corner cases like null values; concrete subclasses do not have * do implement the corresponding checks. *

    * @@ -100,7 +100,7 @@ public Object escape(final Object value, final ValueTransformer transformer) { * subclasses have to implement their specific escaping logic here, so that the list delimiters they support are * properly escaped. * - * @param s the string to be escaped (not null) + * @param s the string to be escaped (not null) * @return the escaped string */ protected abstract String escapeString(String s); @@ -135,7 +135,7 @@ public Iterable parse(final Object value) { } /** - * {@inheritDoc} This implementation handles the case that the passed in string is null. In this case, an empty + * {@inheritDoc} This implementation handles the case that the passed in string is null. In this case, an empty * collection is returned. Otherwise, this method delegates to {@link #splitString(String, boolean)}. */ @Override @@ -144,10 +144,10 @@ public Collection split(final String s, final boolean trim) { } /** - * Actually splits the passed in string which is guaranteed to be not null. This method is called by the base + * Actually splits the passed in string which is guaranteed to be not null. This method is called by the base * implementation of the {@code split()} method. Here the actual splitting logic has to be implemented. * - * @param s the string to be split (not null) + * @param s the string to be split (not null) * @param trim a flag whether the single components have to be trimmed * @return a collection with the extracted components of the passed in string */ diff --git a/src/main/java/org/apache/commons/configuration2/convert/ConversionHandler.java b/src/main/java/org/apache/commons/configuration2/convert/ConversionHandler.java index dd83f5cada..3c9cd0a39a 100644 --- a/src/main/java/org/apache/commons/configuration2/convert/ConversionHandler.java +++ b/src/main/java/org/apache/commons/configuration2/convert/ConversionHandler.java @@ -50,8 +50,8 @@ public interface ConversionHandler { /** * Converts a single object to the specified target type. A concrete implementation has to attempt a conversion. If this - * is not possible, a {@link ConversionException} is thrown. It is up to a concrete implementation how null - * values are handled; a default strategy would be to return null if the source object is null. + * is not possible, a {@link ConversionException} is thrown. It is up to a concrete implementation how null + * values are handled; a default strategy would be to return null if the source object is null. * * @param the type of the desired result * @param src the object to be converted diff --git a/src/main/java/org/apache/commons/configuration2/convert/DefaultConversionHandler.java b/src/main/java/org/apache/commons/configuration2/convert/DefaultConversionHandler.java index 5c17b79882..ef04235c4a 100644 --- a/src/main/java/org/apache/commons/configuration2/convert/DefaultConversionHandler.java +++ b/src/main/java/org/apache/commons/configuration2/convert/DefaultConversionHandler.java @@ -69,7 +69,7 @@ public Object interpolate(final Object value) { static final ListDelimiterHandler LIST_DELIMITER_HANDLER = DisabledListDelimiterHandler.INSTANCE; /** - * Obtains a {@code ConfigurationInterpolator}. If the passed in one is not null, it is used. Otherwise, a + * Obtains a {@code ConfigurationInterpolator}. If the passed in one is not null, it is used. Otherwise, a * default one is returned. * * @param ci the {@code ConfigurationInterpolator} provided by the caller @@ -89,7 +89,7 @@ private static ConfigurationInterpolator fetchInterpolator(final ConfigurationIn * Performs the conversion from the passed in source object to the specified target class. This method is called for * each conversion to be done. The source object has already been passed to the {@link ConfigurationInterpolator}, so * interpolation does not have to be done again. (The passed in {@code ConfigurationInterpolator} may still be necessary - * for extracting values from complex objects; it is guaranteed to be non null.) The source object may be a + * for extracting values from complex objects; it is guaranteed to be non null.) The source object may be a * complex object, e.g. a collection or an array. This base implementation checks whether the source object is complex. * If so, it delegates to {@link #extractConversionValue(Object, Class, ConfigurationInterpolator)} to obtain a single * value. Eventually, {@link #convertValue(Object, Class, ConfigurationInterpolator)} is called with the single value to @@ -98,7 +98,7 @@ private static ConfigurationInterpolator fetchInterpolator(final ConfigurationIn * @param the desired target type of the conversion * @param src the source object to be converted * @param targetCls the desired target class - * @param ci the {@code ConfigurationInterpolator} (not null) + * @param ci the {@code ConfigurationInterpolator} (not null) * @return the converted value * @throws ConversionException if conversion is not possible */ @@ -123,13 +123,13 @@ private void convertToCollection(final Object src, final Class elemClass, /** * Performs a conversion of a single value to the specified target class. The passed in source object is guaranteed to - * be a single value, but it can be null. Derived classes that want to extend the available conversions, but are + * be a single value, but it can be null. Derived classes that want to extend the available conversions, but are * happy with the handling of complex objects, just need to override this method. * * @param the desired target type of the conversion * @param src the source object (a single value) * @param targetCls the target class of the conversion - * @param ci the {@code ConfigurationInterpolator} (not null) + * @param ci the {@code ConfigurationInterpolator} (not null) * @return the converted value * @throws ConversionException if conversion is not possible */ @@ -151,8 +151,8 @@ protected T convertValue(final Object src, final Class targetCls, final C * * @param container the complex object * @param targetCls the target class of the conversion - * @param ci the {@code ConfigurationInterpolator} (not null) - * @return the value to be converted (may be null if no values are found) + * @param ci the {@code ConfigurationInterpolator} (not null) + * @return the value to be converted (may be null if no values are found) */ protected Object extractConversionValue(final Object container, final Class targetCls, final ConfigurationInterpolator ci) { final Collection values = extractValues(container, 1); @@ -212,7 +212,7 @@ public ListDelimiterHandler getListDelimiterHandler() { * * * @param src the source object - * @return true if this is a complex object, false otherwise + * @return true if this is a complex object, false otherwise */ protected boolean isComplexObject(final Object src) { return src instanceof Iterator || src instanceof Iterable || src != null && src.getClass().isArray(); @@ -220,8 +220,8 @@ protected boolean isComplexObject(final Object src) { /** * Tests whether the passed in object represents an empty element. This method is called by conversion methods to arrays - * or collections. If it returns true, the resulting array or collection will be empty. This implementation - * returns true if and only if the passed in object is an empty string. With this method it can be controlled if + * or collections. If it returns true, the resulting array or collection will be empty. This implementation + * returns true if and only if the passed in object is an empty string. With this method it can be controlled if * and how empty elements in configurations are handled. * * @param src the object to be tested @@ -263,7 +263,7 @@ public T to(final Object src, final Class targetCls, final ConfigurationI /** * {@inheritDoc} This implementation extracts all values stored in the passed in source object, converts them to the * target type, and adds them to a result array. Arrays of objects and of primitive types are supported. If the source - * object is null, result is null, too. + * object is null, result is null, too. */ @Override public Object toArray(final Object src, final Class elemClass, final ConfigurationInterpolator ci) { @@ -280,10 +280,10 @@ public Object toArray(final Object src, final Class elemClass, final Configur /** * {@inheritDoc} This implementation extracts all values stored in the passed in source object, converts them to the - * target type, and adds them to the target collection. The target collection must not be null. If the source - * object is null, nothing is added to the collection. + * target type, and adds them to the target collection. The target collection must not be null. If the source + * object is null, nothing is added to the collection. * - * @throws IllegalArgumentException if the target collection is null + * @throws IllegalArgumentException if the target collection is null */ @Override public void toCollection(final Object src, final Class elemClass, final ConfigurationInterpolator ci, final Collection dest) { diff --git a/src/main/java/org/apache/commons/configuration2/convert/ListDelimiterHandler.java b/src/main/java/org/apache/commons/configuration2/convert/ListDelimiterHandler.java index 61b2407b9a..dae120b8d6 100644 --- a/src/main/java/org/apache/commons/configuration2/convert/ListDelimiterHandler.java +++ b/src/main/java/org/apache/commons/configuration2/convert/ListDelimiterHandler.java @@ -64,7 +64,7 @@ public interface ListDelimiterHandler { * value contains list delimiter characters and - if so - escape them accordingly. * * @param value the value to be escaped - * @param transformer a {@code ValueTransformer} for an additional encoding (must not be null) + * @param transformer a {@code ValueTransformer} for an additional encoding (must not be null) * @return the escaped value */ Object escape(Object value, ValueTransformer transformer); @@ -75,7 +75,7 @@ public interface ListDelimiterHandler { * configuration representation. This may require an advanced escaping in some cases. * * @param values the list with all the values to be converted to a single value - * @param transformer a {@code ValueTransformer} for an additional encoding (must not be null) + * @param transformer a {@code ValueTransformer} for an additional encoding (must not be null) * @return the resulting escaped value */ Object escapeList(List values, ValueTransformer transformer); diff --git a/src/main/java/org/apache/commons/configuration2/convert/PropertyConverter.java b/src/main/java/org/apache/commons/configuration2/convert/PropertyConverter.java index d7b1fba875..eae4d730d4 100644 --- a/src/main/java/org/apache/commons/configuration2/convert/PropertyConverter.java +++ b/src/main/java/org/apache/commons/configuration2/convert/PropertyConverter.java @@ -207,7 +207,7 @@ public static BigInteger toBigInteger(final Object value) throws ConversionExcep /** * Converts the specified object into a Boolean. Internally the {@code org.apache.commons.lang.BooleanUtils} class from * the Commons Lang project is used to perform this conversion. This - * class accepts some more tokens for the boolean value of true, e.g. {@code yes} and {@code on}. Please refer to + * class accepts some more tokens for the boolean value of true, e.g. {@code yes} and {@code on}. Please refer to * the documentation of this class for more details. * * @param value the value to convert @@ -585,7 +585,7 @@ public static Long toLong(final Object value) throws ConversionException { * types. Note that the return value is not in always of the specified target class, but only if a new object has to be * created. * - * @param value the value to be converted (must not be null) + * @param value the value to be converted (must not be null) * @param targetClass the target class of the conversion (must be derived from {@link Number}) * @return the converted number * @throws ConversionException if the object cannot be converted diff --git a/src/main/java/org/apache/commons/configuration2/event/BaseEventSource.java b/src/main/java/org/apache/commons/configuration2/event/BaseEventSource.java index 3a1f023abc..ab39cccc9b 100644 --- a/src/main/java/org/apache/commons/configuration2/event/BaseEventSource.java +++ b/src/main/java/org/apache/commons/configuration2/event/BaseEventSource.java @@ -38,7 +38,7 @@ * With the {@code detailEvents} property the number of detail events can be controlled. Some methods in configuration * classes are implemented in a way that they call other methods that can generate their own events. One example is the * {@code setProperty()} method that can be implemented as a combination of {@code clearProperty()} and - * {@code addProperty()}. With {@code detailEvents} set to true, all involved methods will generate events (i.e. + * {@code addProperty()}. With {@code detailEvents} set to true, all involved methods will generate events (i.e. * listeners will receive property set events, property clear events, and property add events). If this mode is turned * off (which is the default), detail events are suppressed, so only property set events will be received. Note that the * number of received detail events may differ for different configuration implementations. @@ -82,7 +82,7 @@ public void addEventListener(final EventType eventType, fin * than the passed in limit. * * @param limit the limit to be compared to - * @return true if the counter is greater than the limit, false otherwise + * @return true if the counter is greater than the limit, false otherwise */ private boolean checkDetailEvents(final int limit) { synchronized (lockDetailEventsCount) { @@ -125,8 +125,8 @@ protected Object clone() throws CloneNotSupportedException { /** * Copies all event listener registrations maintained by this object to the specified {@code BaseEventSource} object. * - * @param source the target source for the copy operation (must not be null) - * @throws IllegalArgumentException if the target source is null + * @param source the target source for the copy operation (must not be null) + * @throws IllegalArgumentException if the target source is null * @since 2.0 */ public void copyEventListeners(final BaseEventSource source) { @@ -142,8 +142,8 @@ public void copyEventListeners(final BaseEventSource source) { * * @param type the event's type * @param opType the operation type related to this error - * @param propName the name of the affected property (can be null) - * @param propValue the value of the affected property (can be null) + * @param propName the name of the affected property (can be null) + * @param propValue the value of the affected property (can be null) * @param ex the {@code Throwable} object that caused this error event * @return the event object */ @@ -157,8 +157,8 @@ protected ConfigurationErrorEvent createErrorEvent(final EventTypenull) - * @param propValue the value of the affected property (can be null) + * @param propName the name of the affected property (can be null) + * @param propValue the value of the affected property (can be null) * @param before the before update flag * @param the type of the event to be created * @return the newly created event object @@ -173,8 +173,8 @@ protected ConfigurationEvent createEvent(final Ev * * @param eventType the event's type * @param operationType the type of the failed operation - * @param propertyName the name of the affected property (can be null) - * @param propertyValue the value of the affected property (can be null) + * @param propertyName the name of the affected property (can be null) + * @param propertyValue the value of the affected property (can be null) * @param cause the {@code Throwable} object that caused this error event * @param the event type */ @@ -194,8 +194,8 @@ public void fireError(final EventType eve * event is allowed (making use of the {@code detailEvents} property), and if listeners are registered. * * @param type the event's type - * @param propName the name of the affected property (can be null) - * @param propValue the value of the affected property (can be null) + * @param propName the name of the affected property (can be null) + * @param propValue the value of the affected property (can be null) * @param before the before update flag * @param the type of the event to be fired */ diff --git a/src/main/java/org/apache/commons/configuration2/event/ConfigurationErrorEvent.java b/src/main/java/org/apache/commons/configuration2/event/ConfigurationErrorEvent.java index e1822c2609..6b3aaa61eb 100644 --- a/src/main/java/org/apache/commons/configuration2/event/ConfigurationErrorEvent.java +++ b/src/main/java/org/apache/commons/configuration2/event/ConfigurationErrorEvent.java @@ -122,7 +122,7 @@ public EventType getErrorOperationType() { /** * Gets the name of the property that was accessed when this error occurred. * - * @return the property name related to this error (may be null) + * @return the property name related to this error (may be null) */ public String getPropertyName() { return propertyName; @@ -131,7 +131,7 @@ public String getPropertyName() { /** * Gets the value of the property that was accessed when this error occurred. * - * @return the property value related this error (may be null) + * @return the property value related this error (may be null) */ public Object getPropertyValue() { return propertyValue; diff --git a/src/main/java/org/apache/commons/configuration2/event/ConfigurationEvent.java b/src/main/java/org/apache/commons/configuration2/event/ConfigurationEvent.java index f02ec93da7..dd208b0946 100644 --- a/src/main/java/org/apache/commons/configuration2/event/ConfigurationEvent.java +++ b/src/main/java/org/apache/commons/configuration2/event/ConfigurationEvent.java @@ -52,7 +52,7 @@ *
    CLEAR_PROPERTY
    *
    If a property is removed from a configuration (by calling the {@code clearProperty()} method), an event of this * type is fired. In this case the event object only stores the name of the removed property, the value is - * null.
    + * null. *
    CLEAR
    *
    This event is fired when the whole configuration is cleared. The corresponding event object contains no * additional data.
    @@ -157,7 +157,7 @@ public ConfigurationEvent(final Object source, final EventTypenull if no property change has lead to this event. + * Gets the name of the affected property. This can be null if no property change has lead to this event. * * @return the name of the property */ @@ -168,7 +168,7 @@ public String getPropertyName() { /** * Gets the value of the affected property if available. * - * @return the value of the property; can be null + * @return the value of the property; can be null */ public Object getPropertyValue() { return propertyValue; @@ -177,7 +177,7 @@ public Object getPropertyValue() { /** * Returns a flag if this event was generated before or after an update. * - * @return true if this event was generated before an update; false otherwise + * @return true if this event was generated before an update; false otherwise */ public boolean isBeforeUpdate() { return beforeUpdate; diff --git a/src/main/java/org/apache/commons/configuration2/event/Event.java b/src/main/java/org/apache/commons/configuration2/event/Event.java index 7016a34d50..b8b7c7e3f6 100644 --- a/src/main/java/org/apache/commons/configuration2/event/Event.java +++ b/src/main/java/org/apache/commons/configuration2/event/Event.java @@ -57,8 +57,8 @@ public class Event extends EventObject { /** * Creates a new instance of {@code Event} and sets basic properties. * - * @param source the object on which the Event initially occurred (must not be null) - * @param evType the type of this event (must not be null) + * @param source the object on which the Event initially occurred (must not be null) + * @param evType the type of this event (must not be null) * @throws IllegalArgumentException if a required parameter is null */ public Event(final Object source, final EventType evType) { diff --git a/src/main/java/org/apache/commons/configuration2/event/EventListenerList.java b/src/main/java/org/apache/commons/configuration2/event/EventListenerList.java index 7c78946bd5..c9d901df49 100644 --- a/src/main/java/org/apache/commons/configuration2/event/EventListenerList.java +++ b/src/main/java/org/apache/commons/configuration2/event/EventListenerList.java @@ -190,8 +190,8 @@ public EventListenerList() { /** * Adds all event listener registrations stored in the specified {@code EventListenerList} to this list. * - * @param c the list to be copied (must not be null) - * @throws IllegalArgumentException if the list to be copied is null + * @param c the list to be copied (must not be null) + * @throws IllegalArgumentException if the list to be copied is null */ public void addAll(final EventListenerList c) { if (c == null) { @@ -204,9 +204,9 @@ public void addAll(final EventListenerList c) { * Adds the specified listener registration data object to the internal list of event listeners. This is an alternative * registration method; the event type and the listener are passed as a single data object. * - * @param regData the registration data object (must not be null) + * @param regData the registration data object (must not be null) * @param the type of events processed by this listener - * @throws IllegalArgumentException if the registration data object is null + * @throws IllegalArgumentException if the registration data object is null */ public void addEventListener(final EventListenerRegistrationData regData) { if (regData == null) { @@ -219,10 +219,10 @@ public void addEventListener(final EventListenerRegistrationDa * Adds an event listener for the specified event type. This listener is notified about events of this type and all its * sub types. * - * @param type the event type (must not be null) - * @param listener the listener to be registered (must not be null) + * @param type the event type (must not be null) + * @param listener the listener to be registered (must not be null) * @param the type of events processed by this listener - * @throws IllegalArgumentException if a required parameter is null + * @throws IllegalArgumentException if a required parameter is null */ public void addEventListener(final EventType type, final EventListener listener) { listeners.add(new EventListenerRegistrationData<>(type, listener)); @@ -238,8 +238,8 @@ public void clear() { /** * Fires an event to all registered listeners matching the event type. * - * @param event the event to be fired (must not be null) - * @throws IllegalArgumentException if the event is null + * @param event the event to be fired (must not be null) + * @throws IllegalArgumentException if the event is null */ public void fire(final Event event) { if (event == null) { @@ -330,7 +330,7 @@ public boolean removeEventListener(final EventListenerRegistra * Removes the event listener registration for the given event type and listener. An event listener instance may be * registered multiple times for different event types. Therefore, when removing a listener the event type of the * registration in question has to be specified. The return value indicates whether a registration was removed. A value - * of false means that no such combination of event type and listener was found. + * of false means that no such combination of event type and listener was found. * * @param eventType the event type * @param listener the event listener to be removed diff --git a/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java b/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java index d5cf224a64..81f20f86fb 100644 --- a/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java +++ b/src/main/java/org/apache/commons/configuration2/event/EventListenerRegistrationData.java @@ -46,9 +46,9 @@ public final class EventListenerRegistrationData { /** * Creates a new instance of {@code EventListenerRegistrationData}. * - * @param type the event type (must not be null) - * @param lstnr the event listener (must not be null) - * @throws IllegalArgumentException if a required parameter is null + * @param type the event type (must not be null) + * @param lstnr the event listener (must not be null) + * @throws IllegalArgumentException if a required parameter is null */ public EventListenerRegistrationData(final EventType type, final EventListener lstnr) { if (type == null) { diff --git a/src/main/java/org/apache/commons/configuration2/event/EventSource.java b/src/main/java/org/apache/commons/configuration2/event/EventSource.java index 0b81f50009..93d6f67c63 100644 --- a/src/main/java/org/apache/commons/configuration2/event/EventSource.java +++ b/src/main/java/org/apache/commons/configuration2/event/EventSource.java @@ -33,10 +33,10 @@ public interface EventSource { * Adds an event listener for the specified event type. This listener is notified about events of this type and all its * sub types. * - * @param eventType the event type (must not be null) - * @param listener the listener to be registered (must not be null) + * @param eventType the event type (must not be null) + * @param listener the listener to be registered (must not be null) * @param the type of events processed by this listener - * @throws IllegalArgumentException if a required parameter is null + * @throws IllegalArgumentException if a required parameter is null */ void addEventListener(EventType eventType, EventListener listener); @@ -44,7 +44,7 @@ public interface EventSource { * Removes the event listener registration for the given event type and listener. An event listener instance may be * registered multiple times for different event types. Therefore, when removing a listener the event type of the * registration in question has to be specified. The return value indicates whether a registration was removed. A value - * of false means that no such combination of event type and listener was found. + * of false means that no such combination of event type and listener was found. * * @param eventType the event type * @param listener the event listener to be removed diff --git a/src/main/java/org/apache/commons/configuration2/event/EventType.java b/src/main/java/org/apache/commons/configuration2/event/EventType.java index 027e668905..40cc1990eb 100644 --- a/src/main/java/org/apache/commons/configuration2/event/EventType.java +++ b/src/main/java/org/apache/commons/configuration2/event/EventType.java @@ -48,7 +48,7 @@ public class EventType implements Serializable { /** * Returns a set with all event types that are super types of the specified type. This set contains the direct and - * indirect super types and also includes the given type itself. The passed in type may be null, then an empty + * indirect super types and also includes the given type itself. The passed in type may be null, then an empty * set is returned. * * @param eventType the event type in question @@ -66,11 +66,11 @@ public static Set> fetchSuperEventTypes(final EventType eventTyp /** * Checks whether an event type is derived from another type. This implementation tests whether {@code baseType} is a - * direct or indirect super type of {@code derivedType}. If one of the types is null, result is false. + * direct or indirect super type of {@code derivedType}. If one of the types is null, result is false. * * @param derivedType the derived event type * @param baseType the base event type - * @return true if the derived type is an instance of the base type, false otherwise + * @return true if the derived type is an instance of the base type, false otherwise */ public static boolean isInstanceOf(final EventType derivedType, final EventType baseType) { EventType currentType = derivedType; @@ -112,7 +112,7 @@ public String getName() { } /** - * Gets the super event type. Result is null for the root event type. + * Gets the super event type. Result is null for the root event type. * * @return the super event type */ diff --git a/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java b/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java index 19a84e32e1..bd1252a00b 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/ConfigurationInterpolator.java @@ -52,7 +52,7 @@ * for it. Then the name of the variable is passed to this object to obtain the actual value. It is also possible to * define an arbitrary number of default lookup objects, which are used for variables that do not have a prefix or that * cannot be resolved by their associated lookup object. When adding default lookup objects their order matters; they - * are queried in this order, and the first non-null variable value is used. + * are queried in this order, and the first non-null variable value is used. *

    *

    * After an instance has been created it does not contain any {@code Lookup} objects. The current set of lookup objects @@ -285,9 +285,9 @@ private static String extractVariableName(final String strValue) { * {@code InterpolatorSpecification} already contains a {@code ConfigurationInterpolator} object, it is used directly. * Otherwise, a new instance is created and initialized with the properties stored in the specification. * - * @param spec the {@code InterpolatorSpecification} (must not be null) + * @param spec the {@code InterpolatorSpecification} (must not be null) * @return the {@code ConfigurationInterpolator} obtained or created based on the given specification - * @throws IllegalArgumentException if the specification is null + * @throws IllegalArgumentException if the specification is null * @since 2.0 */ public static ConfigurationInterpolator fromSpecification(final InterpolatorSpecification spec) { @@ -407,12 +407,12 @@ public static Map getDefaultPrefixLookups() { } /** - * Utility method for obtaining a {@code Lookup} object in a safe way. This method always returns a non-null - * {@code Lookup} object. If the passed in {@code Lookup} is not null, it is directly returned. Otherwise, result + * Utility method for obtaining a {@code Lookup} object in a safe way. This method always returns a non-null + * {@code Lookup} object. If the passed in {@code Lookup} is not null, it is directly returned. Otherwise, result * is a dummy {@code Lookup} which does not provide any values. * * @param lookup the {@code Lookup} to check - * @return a non-null {@code Lookup} object + * @return a non-null {@code Lookup} object * @since 2.0 */ public static Lookup nullSafeLookup(Lookup lookup) { @@ -451,19 +451,19 @@ public ConfigurationInterpolator() { * all variables without a special prefix. If no default {@code Lookup} objects are present, such variables won't be * processed. * - * @param defaultLookup the default {@code Lookup} object to be added (must not be null) - * @throws IllegalArgumentException if the {@code Lookup} object is null + * @param defaultLookup the default {@code Lookup} object to be added (must not be null) + * @throws IllegalArgumentException if the {@code Lookup} object is null */ public void addDefaultLookup(final Lookup defaultLookup) { defaultLookups.add(defaultLookup); } /** - * Adds all {@code Lookup} objects in the given collection as default lookups. The collection can be null, then - * this method has no effect. It must not contain null entries. + * Adds all {@code Lookup} objects in the given collection as default lookups. The collection can be null, then + * this method has no effect. It must not contain null entries. * * @param lookups the {@code Lookup} objects to be added as default lookups - * @throws IllegalArgumentException if the collection contains a null entry + * @throws IllegalArgumentException if the collection contains a null entry */ public void addDefaultLookups(final Collection lookups) { if (lookups != null) { @@ -484,8 +484,8 @@ public boolean deregisterLookup(final String prefix) { /** * Obtains the lookup object for the specified prefix. This method is called by the {@code lookup()} method. This - * implementation will check whether a lookup object is registered for the given prefix. If not, a null lookup - * object will be returned (never null). + * implementation will check whether a lookup object is registered for the given prefix. If not, a null lookup + * object will be returned (never null). * * @param prefix the prefix * @return the lookup object to be used for this prefix @@ -518,7 +518,7 @@ public Map getLookups() { /** * Gets the parent {@code ConfigurationInterpolator}. * - * @return the parent {@code ConfigurationInterpolator} (can be null) + * @return the parent {@code ConfigurationInterpolator} (can be null) */ public ConfigurationInterpolator getParentInterpolator() { return this.parentInterpolator; @@ -626,9 +626,9 @@ public Set prefixSet() { * Registers the given {@code Lookup} object for the specified prefix at this instance. From now on this lookup object * will be used for variables that have the specified prefix. * - * @param prefix the variable prefix (must not be null) - * @param lookup the {@code Lookup} object to be used for this prefix (must not be null) - * @throws IllegalArgumentException if either the prefix or the {@code Lookup} object is null + * @param prefix the variable prefix (must not be null) + * @param lookup the {@code Lookup} object to be used for this prefix (must not be null) + * @throws IllegalArgumentException if either the prefix or the {@code Lookup} object is null */ public void registerLookup(final String prefix, final Lookup lookup) { if (prefix == null) { @@ -642,11 +642,11 @@ public void registerLookup(final String prefix, final Lookup lookup) { /** * Registers all {@code Lookup} objects in the given map with their prefixes at this {@code ConfigurationInterpolator}. - * Using this method multiple {@code Lookup} objects can be registered at once. If the passed in map is null, + * Using this method multiple {@code Lookup} objects can be registered at once. If the passed in map is null, * this method does not have any effect. * - * @param lookups the map with lookups to register (may be null) - * @throws IllegalArgumentException if the map contains entries + * @param lookups the map with lookups to register (may be null) + * @throws IllegalArgumentException if the map contains entries */ public void registerLookups(final Map lookups) { if (lookups != null) { @@ -672,7 +672,7 @@ public boolean removeDefaultLookup(final Lookup lookup) { * {@code ConfigurationInterpolator} is available, this object is asked to resolve the variable. * * @param var the name of the variable whose value is to be looked up which may contain a prefix. - * @return the value of this variable or null if it cannot be resolved + * @return the value of this variable or null if it cannot be resolved */ public Object resolve(final String var) { if (var == null) { @@ -707,7 +707,7 @@ public Object resolve(final String var) { * Interpolates a string value that consists of a single variable. * * @param strValue the string to be interpolated - * @return the resolved value or null if resolving failed + * @return the resolved value or null if resolving failed */ private Object resolveSingleVariable(final String strValue) { return resolve(extractVariableName(strValue)); @@ -727,7 +727,7 @@ public void setEnableSubstitutionInVariables(final boolean f) { * Sets the parent {@code ConfigurationInterpolator}. This object is used if the {@code Lookup} objects registered at * this object cannot resolve a variable. * - * @param parentInterpolator the parent {@code ConfigurationInterpolator} object (can be null) + * @param parentInterpolator the parent {@code ConfigurationInterpolator} object (can be null) */ public void setParentInterpolator(final ConfigurationInterpolator parentInterpolator) { this.parentInterpolator = parentInterpolator; diff --git a/src/main/java/org/apache/commons/configuration2/interpol/ConstantLookup.java b/src/main/java/org/apache/commons/configuration2/interpol/ConstantLookup.java index b2289588d3..2d8816c479 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/ConstantLookup.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/ConstantLookup.java @@ -73,12 +73,12 @@ protected Class fetchClass(final String className) throws ClassNotFoundExcept } /** - * Looks up a variable. The passed in variable name is interpreted as the name of a static final member field of + * Looks up a variable. The passed in variable name is interpreted as the name of a static final member field of * a class. If the value has already been obtained, it can be retrieved from an internal cache. Otherwise this method * will invoke the {@code resolveField()} method and pass in the name of the class and the field. * * @param var the name of the variable to be resolved - * @return the value of this variable or null if it cannot be resolved + * @return the value of this variable or null if it cannot be resolved */ @Override public Object lookup(final String var) { diff --git a/src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java b/src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java index 479995b90d..5369f0f1f8 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/DummyLookup.java @@ -21,7 +21,7 @@ * A simple dummy {@code Lookup} implementation. *

    *

    - * This implementation always returns null for a passed in variable indicating that it cannot resolve that + * This implementation always returns null for a passed in variable indicating that it cannot resolve that * variable. This is useful for instance as an application of the null object pattern. *

    *

    @@ -36,7 +36,7 @@ public enum DummyLookup implements Lookup { INSTANCE; /** - * {@inheritDoc} This implementation always returns null. + * {@inheritDoc} This implementation always returns null. */ @Override public Object lookup(final String variable) { diff --git a/src/main/java/org/apache/commons/configuration2/interpol/EnvironmentLookup.java b/src/main/java/org/apache/commons/configuration2/interpol/EnvironmentLookup.java index c664ea735e..eec447c638 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/EnvironmentLookup.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/EnvironmentLookup.java @@ -42,7 +42,7 @@ public class EnvironmentLookup implements Lookup { * Performs a lookup for the specified variable. This implementation directly delegates to a {@code System.getenv()}. * * @param key the key to lookup - * @return the value of this key or null if it cannot be resolved + * @return the value of this key or null if it cannot be resolved */ @Override public String lookup(final String key) { diff --git a/src/main/java/org/apache/commons/configuration2/interpol/ExprLookup.java b/src/main/java/org/apache/commons/configuration2/interpol/ExprLookup.java index 0ef31ba011..1ad2351532 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/ExprLookup.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/ExprLookup.java @@ -297,7 +297,7 @@ public String lookup(final String var) { /** * Sets the {@code ConfigurationInterpolator} to be used by this object. * - * @param interpolator the {@code ConfigurationInterpolator} (may be null) + * @param interpolator the {@code ConfigurationInterpolator} (may be null) * @since 2.0 */ public void setInterpolator(final ConfigurationInterpolator interpolator) { diff --git a/src/main/java/org/apache/commons/configuration2/interpol/InterpolatorSpecification.java b/src/main/java/org/apache/commons/configuration2/interpol/InterpolatorSpecification.java index 012ba60165..497e90ccb5 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/InterpolatorSpecification.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/InterpolatorSpecification.java @@ -63,10 +63,10 @@ public final class InterpolatorSpecification { */ public static class Builder { /** - * Helper method for checking a lookup. Throws an exception if the lookup is null. + * Helper method for checking a lookup. Throws an exception if the lookup is null. * * @param lookup the lookup to be checked - * @throws IllegalArgumentException if the lookup is null + * @throws IllegalArgumentException if the lookup is null */ private static void checkLookup(final Lookup lookup) { if (lookup == null) { @@ -121,9 +121,9 @@ public void reset() { /** * Adds the given {@code Lookup} object to the list of default lookups. * - * @param lookup the {@code Lookup} (must not be null) + * @param lookup the {@code Lookup} (must not be null) * @return a reference to this builder for method chaining - * @throws IllegalArgumentException if the {@code Lookup} is null + * @throws IllegalArgumentException if the {@code Lookup} is null */ public Builder withDefaultLookup(final Lookup lookup) { checkLookup(lookup); @@ -133,11 +133,11 @@ public Builder withDefaultLookup(final Lookup lookup) { /** * Adds the content of the given collection to the default lookups managed by this builder. The collection can be - * null, then this method has no effect. + * null, then this method has no effect. * * @param lookups the collection with lookups to be added * @return a reference to this builder for method chaining - * @throws IllegalArgumentException if the collection contains null entries + * @throws IllegalArgumentException if the collection contains null entries */ public Builder withDefaultLookups(final Collection lookups) { if (lookups != null) { @@ -150,7 +150,7 @@ public Builder withDefaultLookups(final Collection lookups) { * Sets the {@code ConfigurationInterpolator} instance for the {@code InterpolatorSpecification}. This means that a * {@code ConfigurationInterpolator} has been created and set up externally and can be used directly. * - * @param ci the {@code ConfigurationInterpolator} (can be null) + * @param ci the {@code ConfigurationInterpolator} (can be null) * @return a reference to this builder for method chaining */ public Builder withInterpolator(final ConfigurationInterpolator ci) { @@ -162,7 +162,7 @@ public Builder withInterpolator(final ConfigurationInterpolator ci) { * Sets an optional parent {@code ConfigurationInterpolator}. If defined, this object is set as parent of a newly * created {@code ConfigurationInterpolator} instance. * - * @param parent the parent {@code ConfigurationInterpolator} (can be null) + * @param parent the parent {@code ConfigurationInterpolator} (can be null) * @return a reference to this builder for method chaining */ public Builder withParentInterpolator(final ConfigurationInterpolator parent) { @@ -173,8 +173,8 @@ public Builder withParentInterpolator(final ConfigurationInterpolator parent) { /** * Adds a {@code Lookup} object for a given prefix. * - * @param prefix the prefix (must not be null) - * @param lookup the {@code Lookup} (must not be null) + * @param prefix the prefix (must not be null) + * @param lookup the {@code Lookup} (must not be null) * @return a reference to this builder for method chaining * @throws IllegalArgumentException if a required parameter is missing */ @@ -188,12 +188,12 @@ public Builder withPrefixLookup(final String prefix, final Lookup lookup) { } /** - * Adds the content of the given map to the prefix lookups managed by this builder. The map can be null, then + * Adds the content of the given map to the prefix lookups managed by this builder. The map can be null, then * this method has no effect. * * @param lookups the map with prefix lookups to be added * @return a reference to this builder for method chaining - * @throws IllegalArgumentException if the map contains null values + * @throws IllegalArgumentException if the map contains null values */ public Builder withPrefixLookups(final Map lookups) { if (lookups != null) { @@ -247,7 +247,7 @@ private InterpolatorSpecification(final Builder builder) { /** * Gets a collection with the default lookups. * - * @return the default lookups for a new {@code ConfigurationInterpolator} instance (never null) + * @return the default lookups for a new {@code ConfigurationInterpolator} instance (never null) */ public Collection getDefaultLookups() { return defaultLookups; @@ -256,7 +256,7 @@ public Collection getDefaultLookups() { /** * Gets the {@code ConfigurationInterpolator} instance to be used directly. * - * @return the {@code ConfigurationInterpolator} (can be null) + * @return the {@code ConfigurationInterpolator} (can be null) */ public ConfigurationInterpolator getInterpolator() { return interpolator; @@ -265,7 +265,7 @@ public ConfigurationInterpolator getInterpolator() { /** * Gets the parent {@code ConfigurationInterpolator} object. * - * @return the parent {@code ConfigurationInterpolator} (can be null) + * @return the parent {@code ConfigurationInterpolator} (can be null) */ public ConfigurationInterpolator getParentInterpolator() { return parentInterpolator; @@ -275,7 +275,7 @@ public ConfigurationInterpolator getParentInterpolator() { * Gets a map with prefix lookups. The keys of the map are the prefix strings, its values are the corresponding * {@code Lookup} objects. * - * @return the prefix lookups for a new {@code ConfigurationInterpolator} instance (never null) + * @return the prefix lookups for a new {@code ConfigurationInterpolator} instance (never null) */ public Map getPrefixLookups() { return prefixLookups; diff --git a/src/main/java/org/apache/commons/configuration2/interpol/Lookup.java b/src/main/java/org/apache/commons/configuration2/interpol/Lookup.java index edb07059cb..1ca938d789 100644 --- a/src/main/java/org/apache/commons/configuration2/interpol/Lookup.java +++ b/src/main/java/org/apache/commons/configuration2/interpol/Lookup.java @@ -29,7 +29,7 @@ *

    * This interface defines a single method for performing variable lookup. It is passed the name of a variable and has to * return the corresponding value. It is of course up to a specific implementation how this is done. If the variable - * name cannot be resolved, an implementation has to return null. + * name cannot be resolved, an implementation has to return null. *

    *

    * Note: Implementations must be aware that they can be accessed concurrently. This is for instance the case if a @@ -42,10 +42,10 @@ public interface Lookup { /** * Looks up the value of the specified variable. This method is called by {@link ConfigurationInterpolator} with the * variable name extracted from the expression to interpolate (i.e. the prefix name has already been removed). A - * concrete implementation has to return the value of this variable or null if the variable name is unknown. + * concrete implementation has to return the value of this variable or null if the variable name is unknown. * * @param variable the name of the variable to be resolved - * @return the value of this variable or null + * @return the value of this variable or null */ Object lookup(String variable); } diff --git a/src/main/java/org/apache/commons/configuration2/io/CombinedLocationStrategy.java b/src/main/java/org/apache/commons/configuration2/io/CombinedLocationStrategy.java index 3414396182..71837cc6f3 100644 --- a/src/main/java/org/apache/commons/configuration2/io/CombinedLocationStrategy.java +++ b/src/main/java/org/apache/commons/configuration2/io/CombinedLocationStrategy.java @@ -28,9 +28,9 @@ *

    *

    * A collection with the wrapped {@code FileLocationStrategy} objects is passed at construction time. During a - * [{@code locate()} operation the wrapped strategies are called one after the other until one returns a non null + * [{@code locate()} operation the wrapped strategies are called one after the other until one returns a non null * URL. This URL is returned. If none of the wrapped strategies is able to resolve the passed in {@link FileLocator}, - * result is null. This is similar to the chain of responsibility design pattern. + * result is null. This is similar to the chain of responsibility design pattern. *

    *

    * This class, together with the provided concrete {@code FileLocationStrategy} implementations, offers a convenient way @@ -48,10 +48,10 @@ public class CombinedLocationStrategy implements FileLocationStrategy { /** * Creates a new instance of {@code CombinedLocationStrategy} and initializes it with the provided sub strategies. The - * passed in collection must not be null or contain null elements. + * passed in collection must not be null or contain null elements. * * @param subs the collection with sub strategies - * @throws IllegalArgumentException if the collection is null or has null elements + * @throws IllegalArgumentException if the collection is null or has null elements */ public CombinedLocationStrategy(final Collection subs) { if (subs == null) { diff --git a/src/main/java/org/apache/commons/configuration2/io/ConfigurationLogger.java b/src/main/java/org/apache/commons/configuration2/io/ConfigurationLogger.java index d5defbc5f5..0173caf7b1 100644 --- a/src/main/java/org/apache/commons/configuration2/io/ConfigurationLogger.java +++ b/src/main/java/org/apache/commons/configuration2/io/ConfigurationLogger.java @@ -99,8 +99,8 @@ protected ConfigurationLogger() { * Creates a new instance of {@code ConfigurationLogger} that uses a logger whose name is derived from the provided * class. * - * @param logCls the class whose name is to be used for logging (must not be null) - * @throws IllegalArgumentException if the logger class is null + * @param logCls the class whose name is to be used for logging (must not be null) + * @throws IllegalArgumentException if the logger class is null */ public ConfigurationLogger(final Class logCls) { this(createLoggerForClass(logCls)); @@ -118,8 +118,8 @@ public ConfigurationLogger(final Class logCls) { /** * Creates a new instance of {@code ConfigurationLogger} that uses the specified logger name. * - * @param loggerName the logger name (must not be null) - * @throws IllegalArgumentException if the logger name is null + * @param loggerName the logger name (must not be null) + * @throws IllegalArgumentException if the logger name is null */ public ConfigurationLogger(final String loggerName) { this(createLoggerForName(loggerName)); @@ -174,7 +174,7 @@ public void info(final String msg) { /** * Returns a flag whether logging on debug level is enabled. * - * @return true if debug logging is enabled, false otherwise + * @return true if debug logging is enabled, false otherwise */ public boolean isDebugEnabled() { return getLog().isDebugEnabled(); @@ -183,7 +183,7 @@ public boolean isDebugEnabled() { /** * Returns a flag whether logging on info level is enabled. * - * @return true if debug logging is enabled, false otherwise + * @return true if debug logging is enabled, false otherwise */ public boolean isInfoEnabled() { return getLog().isInfoEnabled(); diff --git a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java index 4b1dba0d87..72256ea790 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileHandler.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileHandler.java @@ -165,7 +165,7 @@ public void unlock(final LockMode mode) { }; /** - * Helper method for checking a file handler which is to be copied. Throws an exception if the handler is null. + * Helper method for checking a file handler which is to be copied. Throws an exception if the handler is null. * * @param c the {@code FileHandler} from which to copy the location * @return the same {@code FileHandler} @@ -180,7 +180,7 @@ private static FileHandler checkSourceHandler(final FileHandler c) { /** * A helper method for closing a stream. Occurring exceptions will be ignored. * - * @param cl the stream to be closed (may be null) + * @param cl the stream to be closed (may be null) */ private static void closeSilent(final Closeable cl) { try { @@ -194,7 +194,7 @@ private static void closeSilent(final Closeable cl) { /** * Creates a {@code File} object from the content of the given {@code FileLocator} object. If the locator is not - * defined, result is null. + * defined, result is null. * * @param loc the {@code FileLocator} * @return a {@code File} object pointing to the associated file @@ -222,7 +222,7 @@ private static FileLocator emptyFileLocator() { * Creates a new {@code FileHandler} instance from properties stored in a map. This method tries to extract a * {@link FileLocator} from the map. A new {@code FileHandler} is created based on this {@code FileLocator}. * - * @param map the map (may be null) + * @param map the map (may be null) * @return the newly created {@code FileHandler} * @see FileLocatorUtils#fromMap(Map) */ @@ -276,8 +276,8 @@ public FileHandler(final FileBased obj) { * created. This constructor is a possibility to associate a file location with a {@code FileBased} object. * * @param obj the {@code FileBased} object to manage - * @param c the {@code FileHandler} from which to copy the location (must not be null) - * @throws IllegalArgumentException if the {@code FileHandler} is null + * @param c the {@code FileHandler} from which to copy the location (must not be null) + * @throws IllegalArgumentException if the {@code FileHandler} is null */ public FileHandler(final FileBased obj, final FileHandler c) { this(obj, checkSourceHandler(c).getFileLocator()); @@ -297,8 +297,8 @@ private FileHandler(final FileBased obj, final FileLocator locator) { /** * Adds a listener to this {@code FileHandler}. It is notified about property changes and IO operations. * - * @param l the listener to be added (must not be null) - * @throws IllegalArgumentException if the listener is null + * @param l the listener to be added (must not be null) + * @throws IllegalArgumentException if the listener is null */ public void addFileHandlerListener(final FileHandlerListener l) { if (l == null) { @@ -432,7 +432,7 @@ public final FileBased getContent() { } /** - * Gets the encoding of the associated file. Result can be null if no encoding has been set. + * Gets the encoding of the associated file. Result can be null if no encoding has been set. * * @return the encoding of the associated file */ @@ -445,7 +445,7 @@ public String getEncoding() { * different than "file", or the file is within a compressed archive, the return value will not point to a * valid file object. * - * @return the location as {@code File} object; this can be null + * @return the location as {@code File} object; this can be null */ public File getFile() { return createFile(getFileLocator()); @@ -482,7 +482,7 @@ public String getFileName() { } /** - * Gets the {@code FileSystem} to be used by this object when locating files. Result is never null; if no file + * Gets the {@code FileSystem} to be used by this object when locating files. Result is never null; if no file * system has been set, the default file system is returned. * * @return the used {@code FileSystem} @@ -493,7 +493,7 @@ public FileSystem getFileSystem() { /** * Gets the {@code FileLocationStrategy} to be applied when accessing the associated file. This method never returns - * null. If a {@code FileLocationStrategy} has been set, it is returned. Otherwise, result is the default + * null. If a {@code FileLocationStrategy} has been set, it is returned. Otherwise, result is the default * {@code FileLocationStrategy}. * * @return the {@code FileLocationStrategy} to be used @@ -519,7 +519,7 @@ public String getPath() { * Gets the location of the associated file as a URL. If a URL is set, it is directly returned. Otherwise, an attempt * to locate the referenced file is made. * - * @return a URL to the associated file; can be null if the location is unspecified + * @return a URL to the associated file; can be null if the location is unspecified */ public URL getURL() { final FileLocator locator = getFileLocator(); @@ -543,7 +543,7 @@ private void injectFileLocator(final URL url) { /** * Checks whether the associated {@code FileBased} object implements the {@code FileLocatorAware} interface. If this is - * the case, a {@code FileLocator} instance is injected which returns only null values. This method is called if + * the case, a {@code FileLocator} instance is injected which returns only null values. This method is called if * no file location is available (e.g. if data is to be loaded from a stream). The encoding of the injected locator is * derived from this object. */ @@ -557,7 +557,7 @@ private void injectNullFileLocator() { /** * Tests whether a location is defined for this {@code FileHandler}. * - * @return true if a location is defined, false otherwise + * @return true if a location is defined, false otherwise */ public boolean isLocationDefined() { return FileLocatorUtils.isLocationDefined(getFileLocator()); @@ -621,7 +621,7 @@ private void load(final InputStream in, final FileLocator locator) throws Config } /** - * Loads the associated file from the specified stream, using the specified encoding. If the encoding is null, + * Loads the associated file from the specified stream, using the specified encoding. If the encoding is null, * the default encoding is used. * * @param in the input stream @@ -792,7 +792,7 @@ private void loadFromTransformedStream(final InputStream in, final String encodi * each access. By calling this method such an attempt is performed once, and the results of a successful localization * are stored. Hence, later access to the referenced file can be more efficient. Also, all properties pointing to the * referenced file in this object's {@code FileLocator} are set (i.e. the URL, the base path, and the file name). If the - * referenced file cannot be located, result is false. This means that the information in the current + * referenced file cannot be located, result is false. This means that the information in the current * {@code FileLocator} is insufficient or wrong. If the {@code FileLocator} is already fully defined, it is not changed. * * @return a flag whether the referenced file could be located successfully @@ -924,7 +924,7 @@ private void save(final OutputStream out, final FileLocator locator) throws Conf } /** - * Saves the associated file to the specified stream using the specified encoding. If the encoding is null, the + * Saves the associated file to the specified stream using the specified encoding. If the encoding is null, the * default encoding is used. * * @param out the output stream @@ -1072,7 +1072,7 @@ private void saveToWriter(final Writer out) throws ConfigurationException { * defined URL, the base path will be ignored. The base path can also be a URL, in which case the file name is * interpreted in this URL's context. If other methods are used for determining the location of the associated file * (e.g. {@code setFile()} or {@code setURL()}), the base path is automatically set. Setting the base path using this - * method automatically sets the URL to null because it has to be determined anew based on the file name and the + * method automatically sets the URL to null because it has to be determined anew based on the file name and the * base path. * * @param basePath the base path. @@ -1123,8 +1123,8 @@ protected void updateBuilder(final FileLocatorBuilder builder) { /** * Sets the file to be accessed by this {@code FileHandler} as a {@code FileLocator} object. * - * @param locator the {@code FileLocator} with the definition of the file to be accessed (must not be null - * @throws IllegalArgumentException if the {@code FileLocator} is null + * @param locator the {@code FileLocator} with the definition of the file to be accessed (must not be null + * @throws IllegalArgumentException if the {@code FileLocator} is null */ public void setFileLocator(final FileLocator locator) { if (locator == null) { @@ -1138,7 +1138,7 @@ public void setFileLocator(final FileLocator locator) { /** * Sets the name of the file. The passed in file name can contain a relative path. It must be used when referring files * with relative paths from classpath. Use {@code setPath()} to set a full qualified file name. The URL is set to - * null as it has to be determined anew based on the file name and the base path. + * null as it has to be determined anew based on the file name and the base path. * * @param fileName the name of the file */ @@ -1154,7 +1154,7 @@ protected void updateBuilder(final FileLocatorBuilder builder) { } /** - * Sets the {@code FileSystem} to be used by this object when locating files. If a null value is passed in, the + * Sets the {@code FileSystem} to be used by this object when locating files. If a null value is passed in, the * file system is reset to the default file system. * * @param fileSystem the {@code FileSystem} @@ -1170,7 +1170,7 @@ protected void updateBuilder(final FileLocatorBuilder builder) { /** * Sets the {@code FileLocationStrategy} to be applied when accessing the associated file. The strategy is stored in the - * underlying {@link FileLocator}. The argument can be null; this causes the default {@code FileLocationStrategy} + * underlying {@link FileLocator}. The argument can be null; this causes the default {@code FileLocationStrategy} * to be used. * * @param strategy the {@code FileLocationStrategy} @@ -1201,7 +1201,7 @@ public void setPath(final String path) { /** * Sets the location of the associated file as a URL. For loading this can be an arbitrary URL with a supported * protocol. If the file is to be saved, too, a URL with the "file" protocol should be provided. This method - * sets the file name and the base path to null. They have to be determined anew based on the new URL. + * sets the file name and the base path to null. They have to be determined anew based on the new URL. * * @param url the location of the file as URL */ @@ -1212,7 +1212,7 @@ public void setURL(final URL url) { /** * Sets the location of the associated file as a URL. For loading this can be an arbitrary URL with a supported * protocol. If the file is to be saved, too, a URL with the "file" protocol should be provided. This method - * sets the file name and the base path to null. They have to be determined anew based on the new URL. + * sets the file name and the base path to null. They have to be determined anew based on the new URL. * * @param url the location of the file as URL * @param urlConnectionOptions URL connection options diff --git a/src/main/java/org/apache/commons/configuration2/io/FileLocationStrategy.java b/src/main/java/org/apache/commons/configuration2/io/FileLocationStrategy.java index cdc5076df8..0ab1a69811 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileLocationStrategy.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileLocationStrategy.java @@ -43,15 +43,15 @@ public interface FileLocationStrategy { /** * Tries to locate the specified file. The method also expects the {@code FileSystem} to be used. Note that the * {@code FileLocator} object may also contain a {@code FileSystem}, but this is optional. The passed in - * {@code FileSystem} should be used, and callers must not pass a null reference for this argument. A concrete + * {@code FileSystem} should be used, and callers must not pass a null reference for this argument. A concrete * implementation has to evaluate the properties stored in the {@code FileLocator} object and try to match them to an - * existing file. If this can be done, a corresponding URL is returned. Otherwise, result is null. - * Implementations should not throw an exception (unless parameters are null) as there might be alternative + * existing file. If this can be done, a corresponding URL is returned. Otherwise, result is null. + * Implementations should not throw an exception (unless parameters are null) as there might be alternative * strategies which can find the file in question. * * @param fileSystem the {@code FileSystem} to be used for this operation * @param locator the object describing the file to be located - * @return a URL pointing to the referenced file if location was successful; null if the file could not be + * @return a URL pointing to the referenced file if location was successful; null if the file could not be * resolved */ URL locate(FileSystem fileSystem, FileLocator locator); diff --git a/src/main/java/org/apache/commons/configuration2/io/FileLocator.java b/src/main/java/org/apache/commons/configuration2/io/FileLocator.java index e5868aaf33..49ae3b2c4a 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileLocator.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileLocator.java @@ -77,7 +77,7 @@ public static final class FileLocatorBuilder { * Creates a new instance of {@code FileLocatorBuilder} and initializes the builder's properties from the passed in * {@code FileLocator} object. * - * @param src the source {@code FileLocator} (may be null) + * @param src the source {@code FileLocator} (may be null) */ FileLocatorBuilder(final FileLocator src) { if (src != null) { @@ -246,7 +246,7 @@ public boolean equals(final Object obj) { } /** - * Gets the base path stored in this locator or null if it is undefined. + * Gets the base path stored in this locator or null if it is undefined. * * @return the base path */ @@ -255,7 +255,7 @@ public String getBasePath() { } /** - * Gets the encoding stored in this locator or null if it is undefined. + * Gets the encoding stored in this locator or null if it is undefined. * * @return the encoding */ @@ -264,7 +264,7 @@ public String getEncoding() { } /** - * Gets the file name stored in this locator or null if it is undefined. + * Gets the file name stored in this locator or null if it is undefined. * * @return the file name */ @@ -273,7 +273,7 @@ public String getFileName() { } /** - * Gets the {@code FileSystem} to be used for accessing the file referenced by this locator or null if it is + * Gets the {@code FileSystem} to be used for accessing the file referenced by this locator or null if it is * undefined. * * @return the {@code FileSystem} @@ -284,7 +284,7 @@ public FileSystem getFileSystem() { /** * Gets the {@code FileLocationStrategy} to be used for locating the referenced file. If no specific - * {@code FileLocationStrategy} has been set, result is null. This means that the default strategy should be + * {@code FileLocationStrategy} has been set, result is null. This means that the default strategy should be * used. * * @return the {@code FileLocationStrategy} to be used @@ -294,7 +294,7 @@ public FileLocationStrategy getLocationStrategy() { } /** - * Gets the URL pointing to the referenced source file or null if it is undefined. + * Gets the URL pointing to the referenced source file or null if it is undefined. * * @return the source URL */ diff --git a/src/main/java/org/apache/commons/configuration2/io/FileLocatorAware.java b/src/main/java/org/apache/commons/configuration2/io/FileLocatorAware.java index af756f34ca..7b5a01b5c6 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileLocatorAware.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileLocatorAware.java @@ -41,7 +41,7 @@ public interface FileLocatorAware { * valid for the following invocation of {@code read()} or {@code write(}. Depending on the state of the * {@code FileHandler} and which of its methods was called, the object may not be fully initialized. For instance, if * the {@code FileHandler}'s {@code load(InputStream)} method was called, no file information is available, and all - * methods of the {@code FileLocator} will return null. + * methods of the {@code FileLocator} will return null. * * @param locator the current {@code FileLocator} */ diff --git a/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java b/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java index ef739d9d8d..b1a82d8ff4 100644 --- a/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java +++ b/src/main/java/org/apache/commons/configuration2/io/FileLocatorUtils.java @@ -69,7 +69,7 @@ public final class FileLocatorUtils { * file can be found there, its URL is returned. *

  • Otherwise, a resource with the name of the locator's file name is searched in the classpath. If it can be found, * its URL is returned.
  • - *
  • Otherwise, the strategy gives up and returns null indicating that the file cannot be resolved.
  • + *
  • Otherwise, the strategy gives up and returns null indicating that the file cannot be resolved.
  • * */ public static final FileLocationStrategy DEFAULT_LOCATION_STRATEGY = initDefaultLocationStrategy(); @@ -134,7 +134,7 @@ static String appendPath(final String path, final String ext) { * passed to {@code getURL()} does not seem to be a valid URL. * * @param basePath the base path - * @param fileName the file name (must not be null) + * @param fileName the file name (must not be null) * @return the resulting file */ static File constructFile(final String basePath, final String fileName) { @@ -151,20 +151,20 @@ static File constructFile(final String basePath, final String fileName) { } /** - * Tries to convert the specified file to a URL. If this causes an exception, result is null. + * Tries to convert the specified file to a URL. If this causes an exception, result is null. * * @param file the file to be converted - * @return the resulting URL or null + * @return the resulting URL or null */ static URL convertFileToURL(final File file) { return convertURIToURL(file.toURI()); } /** - * Tries to convert the specified URI to a URL. If this causes an exception, result is null. + * Tries to convert the specified URI to a URL. If this causes an exception, result is null. * * @param uri the URI to be converted - * @return the resulting URL or null + * @return the resulting URL or null */ static URL convertURIToURL(final URI uri) { try { @@ -196,7 +196,7 @@ private static FileLocator createFullyInitializedLocatorFromURL(final FileLocato } /** - * Tries to convert the specified URL to a file object. If this fails, null is returned. + * Tries to convert the specified URL to a file object. If this fails, null is returned. * * @param url the URL * @return the resulting file object @@ -232,7 +232,7 @@ public static FileLocator.FileLocatorBuilder fileLocator() { * .create(); * * - * @param src the source {@code FileLocator} (may be null) + * @param src the source {@code FileLocator} (may be null) * @return an initialized builder object for defining a {@code FileLocator} */ public static FileLocator.FileLocatorBuilder fileLocator(final FileLocator src) { @@ -242,7 +242,7 @@ public static FileLocator.FileLocatorBuilder fileLocator(final FileLocator src) /** * Creates a new {@code FileLocator} object with the properties defined in the given map. The map must be conform to the * structure generated by the {@link #put(FileLocator, Map)} method; unexpected data can cause - * {@code ClassCastException} exceptions. The map can be null, then an uninitialized {@code FileLocator} is + * {@code ClassCastException} exceptions. The map can be null, then an uninitialized {@code FileLocator} is * returned. * * @param map the map @@ -269,11 +269,11 @@ public static FileLocator fromMap(final Map map) { *
  • {@link #locate(FileLocator)} is called to determine a unique URL pointing to the referenced file. If this is * successful, a new {@code FileLocator} is created as a copy of the passed in one, but with all components pointing to * the file derived from this URL.
  • - *
  • Otherwise, result is null.
  • + *
  • Otherwise, result is null.
  • * * * @param locator the {@code FileLocator} to be completed - * @return a {@code FileLocator} with a fully initialized location if possible or null + * @return a {@code FileLocator} with a fully initialized location if possible or null */ public static FileLocator fullyInitializedLocator(final FileLocator locator) { if (isFullyInitialized(locator)) { @@ -311,7 +311,7 @@ static String getBasePath(final URL url) { * Tries to find a resource with the given name in the classpath. * * @param resourceName the name of the resource - * @return the URL to the found resource or null if the resource cannot be found + * @return the URL to the found resource or null if the resource cannot be found */ static URL getClasspathResource(final String resourceName) { URL url = null; @@ -342,8 +342,8 @@ static URL getClasspathResource(final String resourceName) { * This implementation checks first whether the passed in file name is absolute. If this is the case, it is returned. * Otherwise further checks are performed whether the base path and file name can be combined to a valid URL or a valid * file name. Note: The test if the passed in file name is absolute is performed using - * {@code java.io.File.isAbsolute()}. If the file name starts with a slash, this method will return true on Unix, - * but false on Windows. So to ensure correct behavior for relative file names on all platforms you should never + * {@code java.io.File.isAbsolute()}. If the file name starts with a slash, this method will return true on Unix, + * but false on Windows. So to ensure correct behavior for relative file names on all platforms you should never * let relative paths start with a slash. E.g. in a configuration definition file do not use something like that: * *
    @@ -354,8 +354,8 @@ static URL getClasspathResource(final String resourceName) {
          * treated as an absolute path name.
          *
          * @param basePath the base path
    -     * @param fileName the file name (must not be null)
    -     * @return the file object (null if no file can be obtained)
    +     * @param fileName the file name (must not be null)
    +     * @return the file object (null if no file can be obtained)
          */
         static File getFile(final String basePath, final String fileName) {
             // Check if the file name is absolute
    @@ -403,11 +403,11 @@ static String getFileName(final URL url) {
         }
     
         /**
    -     * Obtains a non-null {@code FileSystem} object from the passed in {@code FileLocator}. If the passed in
    +     * Obtains a non-null {@code FileSystem} object from the passed in {@code FileLocator}. If the passed in
          * {@code FileLocator} has a {@code FileSystem} object, it is returned. Otherwise, result is the default
          * {@code FileSystem}.
          *
    -     * @param locator the {@code FileLocator} (may be null)
    +     * @param locator the {@code FileLocator} (may be null)
          * @return the {@code FileSystem} to be used for this {@code FileLocator}
          */
         static FileSystem getFileSystem(final FileLocator locator) {
    @@ -415,8 +415,8 @@ static FileSystem getFileSystem(final FileLocator locator) {
         }
     
         /**
    -     * Gets a non null {@code FileLocationStrategy} object from the passed in {@code FileLocator}. If the
    -     * {@code FileLocator} is not null and has a {@code FileLocationStrategy} defined, this strategy is returned.
    +     * Gets a non null {@code FileLocationStrategy} object from the passed in {@code FileLocator}. If the
    +     * {@code FileLocator} is not null and has a {@code FileLocationStrategy} defined, this strategy is returned.
          * Otherwise, result is the default {@code FileLocationStrategy}.
          *
          * @param locator the {@code FileLocator}
    @@ -446,9 +446,9 @@ private static FileLocationStrategy initDefaultLocationStrategy() {
          * If only the file name is set (and optionally the base path), each time the file is accessed a {@code locate()}
          * operation has to be performed to uniquely identify the file. If however the URL is determined once based on the other
          * components and stored in a fully defined {@code FileLocator}, it can be used directly to identify the file. If the
    -     * passed in {@code FileLocator} is null, result is false.
    +     * passed in {@code FileLocator} is null, result is false.
          *
    -     * @param locator the {@code FileLocator} to be checked (may be null)
    +     * @param locator the {@code FileLocator} to be checked (may be null)
          * @return a flag whether all components describing the referenced file are initialized
          */
         public static boolean isFullyInitialized(final FileLocator locator) {
    @@ -460,7 +460,7 @@ public static boolean isFullyInitialized(final FileLocator locator) {
     
         /**
          * Checks whether the specified {@code FileLocator} contains enough information to locate a file. This is the case if a
    -     * file name or a URL is defined. If the passed in {@code FileLocator} is null, result is false.
    +     * file name or a URL is defined. If the passed in {@code FileLocator} is null, result is false.
          *
          * @param locator the {@code FileLocator} to check
          * @return a flag whether a file location is defined by this {@code FileLocator}
    @@ -474,10 +474,10 @@ public static boolean isLocationDefined(final FileLocator locator) {
          * {@link FileLocationStrategy} to locate the file the passed in {@code FileLocator} points to. If the
          * {@code FileLocator} contains itself a {@code FileLocationStrategy}, it is used. Otherwise, the default
          * {@code FileLocationStrategy} is applied. The strategy is passed the locator and a {@code FileSystem}. The resulting
    -     * URL is returned. If the {@code FileLocator} is null, result is null.
    +     * URL is returned. If the {@code FileLocator} is null, result is null.
          *
          * @param locator the {@code FileLocator} to be resolved
    -     * @return the URL pointing to the referenced file or null if the {@code FileLocator} could not be resolved
    +     * @return the URL pointing to the referenced file or null if the {@code FileLocator} could not be resolved
          * @see #DEFAULT_LOCATION_STRATEGY
          */
         public static URL locate(final FileLocator locator) {
    @@ -509,8 +509,8 @@ public static URL locateOrThrow(final FileLocator locator) throws ConfigurationE
          * {@code FileLocator} with the same properties as the original one can be created.
          *
          * @param locator the {@code FileLocator} to be stored
    -     * @param map the map in which to store the {@code FileLocator} (must not be null)
    -     * @throws IllegalArgumentException if the map is null
    +     * @param map the map in which to store the {@code FileLocator} (must not be null)
    +     * @throws IllegalArgumentException if the map is null
          */
         public static void put(final FileLocator locator, final Map map) {
             if (map == null) {
    diff --git a/src/main/java/org/apache/commons/configuration2/io/FileSystem.java b/src/main/java/org/apache/commons/configuration2/io/FileSystem.java
    index 745ec26e3b..682538a115 100644
    --- a/src/main/java/org/apache/commons/configuration2/io/FileSystem.java
    +++ b/src/main/java/org/apache/commons/configuration2/io/FileSystem.java
    @@ -95,7 +95,7 @@ public void setFileOptionsProvider(final FileOptionsProvider provider) {
         /**
          * Allows setting the logger to be used by this FileSystem. This method makes it possible for clients to exactly control
          * logging behavior. Per default a logger is set that will ignore all log messages. Derived classes that want to enable
    -     * logging should call this method during their initialization with the logger to be used. Passing in a null
    +     * logging should call this method during their initialization with the logger to be used. Passing in a null
          * argument disables logging.
          *
          * @param log the new logger
    diff --git a/src/main/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java b/src/main/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java
    index 46689d5d3b..fbf2a1f058 100644
    --- a/src/main/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java
    +++ b/src/main/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java
    @@ -35,8 +35,8 @@
      * 

    *

    * When constructing an instance it can be configured whether the base path should be taken into account. If this option - * is set, the base path is appended to the home directory if it is not null. This is useful for instance to - * select a specific sub directory of the user's home directory. If this option is set to false, the base path is + * is set, the base path is appended to the home directory if it is not null. This is useful for instance to + * select a specific sub directory of the user's home directory. If this option is set to false, the base path is * always ignored, and only the file name is evaluated. *

    */ @@ -61,7 +61,7 @@ private static String fetchHomeDirectory(final String homeDir) { /** * Creates a new instance of {@code HomeDirectoryLocationStrategy} with default settings. The home directory is set to - * the user's home directory. The base path flag is set to false (which means that the base path is ignored). + * the user's home directory. The base path flag is set to false (which means that the base path is ignored). */ public HomeDirectoryLocationStrategy() { this(false); @@ -80,7 +80,7 @@ public HomeDirectoryLocationStrategy(final boolean withBasePath) { /** * Creates a new instance of {@code HomeDirectoryLocationStrategy} and initializes it with the specified settings. * - * @param homeDir the path to the home directory (can be null) + * @param homeDir the path to the home directory (can be null) * @param withBasePath a flag whether the base path should be evaluated */ public HomeDirectoryLocationStrategy(final String homeDir, final boolean withBasePath) { @@ -121,7 +121,7 @@ public boolean isEvaluateBasePath() { /** * {@inheritDoc} This implementation searches in the home directory for a file described by the passed in - * {@code FileLocator}. If the locator defines a base path and the {@code evaluateBasePath} property is true, a + * {@code FileLocator}. If the locator defines a base path and the {@code evaluateBasePath} property is true, a * sub directory of the home directory is searched. */ @Override diff --git a/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java b/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java index 9d07a0d67e..aa25d4bf8f 100644 --- a/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java +++ b/src/main/java/org/apache/commons/configuration2/plist/XMLPropertyListConfiguration.java @@ -130,7 +130,7 @@ */ public class XMLPropertyListConfiguration extends BaseHierarchicalConfiguration implements FileBasedConfiguration, FileLocatorAware { /** - * Container for array elements. Do not use this class ! It is used internally by XMLPropertyConfiguration to + * Container for array elements. Do not use this class ! It is used internally by XMLPropertyConfiguration to * parse the configuration file, it may be removed at any moment in the future. */ private static final class ArrayNodeBuilder extends PListNodeBuilder { diff --git a/src/main/java/org/apache/commons/configuration2/reloading/CombinedReloadingController.java b/src/main/java/org/apache/commons/configuration2/reloading/CombinedReloadingController.java index 33bfd40250..88480addd4 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/CombinedReloadingController.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/CombinedReloadingController.java @@ -69,7 +69,7 @@ public MultiReloadingControllerDetector(final CombinedReloadingController owner) /** * {@inheritDoc} This implementation delegates to the managed controllers. For all of them the * {@code checkForReloading()} method is called, giving them the chance to trigger a reload if necessary. If one of - * these calls returns true, the result of this method is true, otherwise false. + * these calls returns true, the result of this method is true, otherwise false. */ @Override public boolean isReloadingRequired() { @@ -93,7 +93,7 @@ public void reloadingPerformed() { * * @param subCtrls the collection with sub controllers * @return a copy of the collection to be stored in the newly created instance - * @throws IllegalArgumentException if the passed in collection is null or contains null entries + * @throws IllegalArgumentException if the passed in collection is null or contains null entries */ private static Collection checkManagedControllers(final Collection subCtrls) { if (subCtrls == null) { @@ -117,9 +117,9 @@ private static Collection checkManagedControllers(final Col * Creates a new instance of {@code CombinedReloadingController} and initializes it with the {@code ReloadingController} * objects to be managed. * - * @param subCtrls the collection with sub {@code ReloadingController}s (must not be null or contain null + * @param subCtrls the collection with sub {@code ReloadingController}s (must not be null or contain null * entries) - * @throws IllegalArgumentException if the passed in collection is null or contains null entries + * @throws IllegalArgumentException if the passed in collection is null or contains null entries */ public CombinedReloadingController(final Collection subCtrls) { super(DUMMY); diff --git a/src/main/java/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.java b/src/main/java/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.java index ea0b4d1cf6..c1288af142 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/FileHandlerReloadingDetector.java @@ -36,7 +36,7 @@ *

    * Because file I/O may be expensive it is possible to configure a refresh delay as a time in milliseconds. This is the * minimum interval between two checks. If the {@code isReloadingRequired()} method is called in shorter intervals, it - * does not perform a check, but directly returns false. + * does not perform a check, but directly returns false. *

    *

    * To initialize an instance either {@code isReloadingRequired()} or {@code reloadingPerformed()} can be called. The @@ -57,7 +57,7 @@ public class FileHandlerReloadingDetector implements ReloadingDetector { * Helper method for transforming a URL into a file object. This method handles file: and jar: URLs. * * @param url the URL to be converted - * @return the resulting file or null + * @return the resulting file or null */ private static File fileFromURL(final URL url) { if (JAR_PROTOCOL.equals(url.getProtocol())) { @@ -95,7 +95,7 @@ public FileHandlerReloadingDetector() { * Creates a new instance of {@code FileHandlerReloadingDetector} and initializes it with the {@code FileHandler} to * monitor and a default refresh delay. * - * @param handler the {@code FileHandler} associated with this detector (can be null) + * @param handler the {@code FileHandler} associated with this detector (can be null) */ public FileHandlerReloadingDetector(final FileHandler handler) { this(handler, DEFAULT_REFRESH_DELAY_MILLIS); @@ -106,7 +106,7 @@ public FileHandlerReloadingDetector(final FileHandler handler) { * monitor and the refresh delay. The handler is directly used, no copy is created. So it is possible to change the * location monitored by manipulating the {@code FileHandler} object. * - * @param handler the {@code FileHandler} associated with this detector (can be null) + * @param handler the {@code FileHandler} associated with this detector (can be null) * @param refreshDelayMillis the refresh delay; a value of 0 means that a check is performed in all cases */ public FileHandlerReloadingDetector(final FileHandler handler, final long refreshDelayMillis) { @@ -115,9 +115,9 @@ public FileHandlerReloadingDetector(final FileHandler handler, final long refres } /** - * Gets the monitored {@code File} or null if it does not exist. + * Gets the monitored {@code File} or null if it does not exist. * - * @return the monitored {@code File} or null + * @return the monitored {@code File} or null */ private File getExistingFile() { File file = getFile(); @@ -130,10 +130,10 @@ private File getExistingFile() { /** * Gets the {@code File} object which is monitored by this object. This method is called every time the file's last - * modification time is needed. If it returns null, no check is performed. This base implementation obtains the + * modification time is needed. If it returns null, no check is performed. This base implementation obtains the * {@code File} from the associated {@code FileHandler}. It can also deal with URLs to jar files. * - * @return the {@code File} to be monitored (can be null) + * @return the {@code File} to be monitored (can be null) */ protected File getFile() { final URL url = getFileHandler().getURL(); diff --git a/src/main/java/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.java b/src/main/java/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.java index 7788cfdc6e..16a4780790 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/PeriodicReloadingTrigger.java @@ -80,7 +80,7 @@ private static ScheduledExecutorService createDefaultExecutorService() { /** * Creates a new instance of {@code PeriodicReloadingTrigger} with a default executor service. * - * @param ctrl the {@code ReloadingController} (must not be null) + * @param ctrl the {@code ReloadingController} (must not be null) * @param ctrlParam the optional parameter to be passed to the controller when doing reloading checks * @param triggerPeriod the period in which the controller is triggered * @param unit the time unit for the period @@ -93,11 +93,11 @@ public PeriodicReloadingTrigger(final ReloadingController ctrl, final Object ctr /** * Creates a new instance of {@code PeriodicReloadingTrigger} and sets all parameters. * - * @param ctrl the {@code ReloadingController} (must not be null) + * @param ctrl the {@code ReloadingController} (must not be null) * @param ctrlParam the optional parameter to be passed to the controller when doing reloading checks * @param triggerPeriod the period in which the controller is triggered * @param unit the time unit for the period - * @param exec the executor service to use (can be null, then a default executor service is created + * @param exec the executor service to use (can be null, then a default executor service is created * @throws IllegalArgumentException if a required argument is missing */ public PeriodicReloadingTrigger(final ReloadingController ctrl, final Object ctrlParam, final long triggerPeriod, final TimeUnit unit, @@ -152,7 +152,7 @@ public void shutdown() { /** * Shuts down this trigger and optionally shuts down the {@code ScheduledExecutorService} used by this object. This * method should be called if this trigger is no more needed. It ensures that the trigger is stopped. If the parameter - * is true, the executor service is also shut down. This should be done if this trigger is the only user of this + * is true, the executor service is also shut down. This should be done if this trigger is the only user of this * executor service. * * @param shutdownExecutor a flag whether the associated {@code ScheduledExecutorService} is to be shut down diff --git a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingController.java b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingController.java index 3d5c248534..d034cd0ab5 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingController.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingController.java @@ -68,7 +68,7 @@ public class ReloadingController implements EventSource { * Creates a new instance of {@code ReloadingController} and associates it with the given {@code ReloadingDetector} * object. * - * @param detect the {@code ReloadingDetector} (must not be null) + * @param detect the {@code ReloadingDetector} (must not be null) * @throws IllegalArgumentException if the detector is undefined */ public ReloadingController(final ReloadingDetector detect) { @@ -95,7 +95,7 @@ public void addEventListener(final EventType eventType, fin * operation should be performed. The return value indicates whether a change was detected and an event was sent. Once a * need for a reload is detected, this controller is in reloading state. Until this state is reset (by calling * {@link #resetReloadingState()}), no further reloading checks are performed by this method, and no events are fired; - * it then returns always true. + * it then returns always true. * * @param data additional data for an event notification * @return a flag whether a reload operation is necessary @@ -129,7 +129,7 @@ public ReloadingDetector getDetector() { } /** - * Tests whether this controller is in reloading state. A return value of true means that a previous + * Tests whether this controller is in reloading state. A return value of true means that a previous * invocation of {@code checkForReloading()} has detected the necessity for a reload operation, but * {@code resetReloadingState()} has not been called yet. In this state no further reloading checks are possible. * diff --git a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingDetector.java b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingDetector.java index 5b5753f102..93d871f3ff 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingDetector.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingDetector.java @@ -43,13 +43,13 @@ public interface ReloadingDetector { * Checks whether all criteria for a reload operation are fulfilled. This method is called by external components to * find out when reloading should take place. * - * @return true if a reload operation should be performed, false otherwise + * @return true if a reload operation should be performed, false otherwise */ boolean isReloadingRequired(); /** * Notifies this object that a reload operation has been performed. This method is called after - * {@code reloadingRequired()} has returned true. It can be used to reset internal state in order to detect the + * {@code reloadingRequired()} has returned true. It can be used to reset internal state in order to detect the * next reload operation. */ void reloadingPerformed(); diff --git a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingEvent.java b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingEvent.java index 9eac131a9e..f345d06d1d 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/ReloadingEvent.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/ReloadingEvent.java @@ -67,7 +67,7 @@ public ReloadingController getController() { * {@link ReloadingController} when it was asked to do a reloading check. This is a generic mechanism to pass arbitrary * data to reloading listeners. * - * @return additional data about the reload operation (can be null) + * @return additional data about the reload operation (can be null) */ public Object getData() { return data; diff --git a/src/main/java/org/apache/commons/configuration2/reloading/VFSFileHandlerReloadingDetector.java b/src/main/java/org/apache/commons/configuration2/reloading/VFSFileHandlerReloadingDetector.java index 1153ff477d..2e58de5536 100644 --- a/src/main/java/org/apache/commons/configuration2/reloading/VFSFileHandlerReloadingDetector.java +++ b/src/main/java/org/apache/commons/configuration2/reloading/VFSFileHandlerReloadingDetector.java @@ -75,7 +75,7 @@ public VFSFileHandlerReloadingDetector(final FileHandler handler, final long ref } /** - * Gets the file that is monitored by this strategy. Note that the return value can be null under some + * Gets the file that is monitored by this strategy. Note that the return value can be null under some * circumstances. * * @return the monitored file @@ -121,7 +121,7 @@ protected long getLastModificationDate() { /** * Resolves the URI of the monitored file. * - * @return the URI of the monitored file or null if it cannot be resolved + * @return the URI of the monitored file or null if it cannot be resolved */ protected String resolveFileURI() { final FileSystem fs = getFileHandler().getFileSystem(); diff --git a/src/main/java/org/apache/commons/configuration2/resolver/CatalogResolver.java b/src/main/java/org/apache/commons/configuration2/resolver/CatalogResolver.java index aa81c54a1d..ea9026e5fb 100644 --- a/src/main/java/org/apache/commons/configuration2/resolver/CatalogResolver.java +++ b/src/main/java/org/apache/commons/configuration2/resolver/CatalogResolver.java @@ -467,7 +467,7 @@ public void setInterpolator(final ConfigurationInterpolator ci) { /** * Allows setting the logger to be used by this object. This method makes it possible for clients to exactly control * logging behavior. Per default a logger is set that will ignore all log messages. Derived classes that want to enable - * logging should call this method during their initialization with the logger to be used. Passing in null as + * logging should call this method during their initialization with the logger to be used. Passing in null as * argument disables logging. * * @param log the new logger diff --git a/src/main/java/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.java b/src/main/java/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.java index 595b3d21e9..538c76507a 100644 --- a/src/main/java/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.java +++ b/src/main/java/org/apache/commons/configuration2/sync/ReadWriteSynchronizer.java @@ -59,9 +59,9 @@ public ReadWriteSynchronizer() { /** * Creates a new instance of {@code ReadWriteSynchronizer} and initializes it with the given lock object. This * constructor can be used to pass a lock object which has been configured externally. If the lock object is - * null, a default lock object is created. + * null, a default lock object is created. * - * @param l the lock object to be used (can be null) + * @param l the lock object to be used (can be null) */ public ReadWriteSynchronizer(final ReadWriteLock l) { lock = l != null ? l : createDefaultLock(); diff --git a/src/main/java/org/apache/commons/configuration2/sync/SynchronizerSupport.java b/src/main/java/org/apache/commons/configuration2/sync/SynchronizerSupport.java index 450847dd59..53488c195b 100644 --- a/src/main/java/org/apache/commons/configuration2/sync/SynchronizerSupport.java +++ b/src/main/java/org/apache/commons/configuration2/sync/SynchronizerSupport.java @@ -35,7 +35,7 @@ */ public interface SynchronizerSupport { /** - * Gets the {@code Synchronizer} used by this object. An implementation must not return null. If no + * Gets the {@code Synchronizer} used by this object. An implementation must not return null. If no * {@code Synchronizer} has been set so far, a meaningful default {@code Synchronizer} has to be returned. * * @return the {@code Synchronizer} used by this object @@ -46,7 +46,7 @@ public interface SynchronizerSupport { * Locks this object for the specified mode. This call may block until this object is released from other lock * operations. When it returns the caller can access the object in a way compatible to the specified {@code LockMode}. * When done the {@code unlock()} must be called with the same {@code LockMode} argument. In practice, a - * try-finally construct should be used as in the following example: + * try-finally construct should be used as in the following example: * *

          * SynchronizerSupport syncSupport = ...;
    @@ -72,7 +72,7 @@ public interface SynchronizerSupport {
         /**
          * Sets the {@code Synchronizer} to be used by this object. Calling this method and setting an appropriate
          * {@code Synchronizer} determines whether this object can be accessed in a thread-safe way or not. The argument may be
    -     * null; in this case an implementation should switch to a default {@code Synchronizer}.
    +     * null; in this case an implementation should switch to a default {@code Synchronizer}.
          *
          * @param sync the {@code Synchronizer} for this object
          */
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java b/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
    index bdd7b3a8e3..a2c8b38460 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/AbstractImmutableNodeHandler.java
    @@ -35,10 +35,10 @@
      */
     abstract class AbstractImmutableNodeHandler implements NodeHandler {
         /**
    -     * Checks if the passed in node is defined. Result is true if the node contains any data.
    +     * Checks if the passed in node is defined. Result is true if the node contains any data.
          *
          * @param node the node in question
    -     * @return true if the node is defined, false otherwise
    +     * @return true if the node is defined, false otherwise
          */
         static boolean checkIfNodeDefined(final ImmutableNode node) {
             return node.getValue() != null || !node.getChildren().isEmpty() || !node.getAttributes().isEmpty();
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitorAdapter.java b/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitorAdapter.java
    index fa4b55adc9..637d94d324 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitorAdapter.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/ConfigurationNodeVisitorAdapter.java
    @@ -29,7 +29,7 @@
      */
     public class ConfigurationNodeVisitorAdapter implements ConfigurationNodeVisitor {
         /**
    -     * {@inheritDoc} This implementation returns always false; this means that all nodes in the current hierarchy are
    +     * {@inheritDoc} This implementation returns always false; this means that all nodes in the current hierarchy are
          * traversed.
          */
         @Override
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/DefaultConfigurationKey.java b/src/main/java/org/apache/commons/configuration2/tree/DefaultConfigurationKey.java
    index 83abad0c7b..858e0ee290 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/DefaultConfigurationKey.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/DefaultConfigurationKey.java
    @@ -134,8 +134,8 @@ public String currentKey() {
     
             /**
              * Returns the current key of the iteration (without skipping to the next element). The boolean parameter indicates
    -         * wheter a decorated key should be returned. This affects only attribute keys: if the parameter is false, the
    -         * attribute markers are stripped from the key; if it is true, they remain.
    +         * wheter a decorated key should be returned. This affects only attribute keys: if the parameter is false, the
    +         * attribute markers are stripped from the key; if it is true, they remain.
              *
              * @param decorated a flag if the decorated key is to be returned
              * @return the current key
    @@ -263,7 +263,7 @@ private boolean isAttributeEmulatingMode() {
             /**
              * Returns a flag whether the current key refers to a property (i.e. is no special attribute key). Usually this method
              * will return the opposite of {@code isAttribute()}, but if the delimiters for normal properties and attributes are set
    -         * to the same string, it is possible that both methods return true.
    +         * to the same string, it is possible that both methods return true.
              *
              * @return a flag if the current key is a property key
              * @see #isAttribute()
    @@ -321,8 +321,8 @@ public String nextKey() {
     
             /**
              * Returns the next key part of this configuration key. The boolean parameter indicates wheter a decorated key should be
    -         * returned. This affects only attribute keys: if the parameter is false, the attribute markers are stripped from
    -         * the key; if it is true, they remain.
    +         * returned. This affects only attribute keys: if the parameter is false, the attribute markers are stripped from
    +         * the key; if it is true, they remain.
              *
              * @param decorated a flag if the decorated key is to be returned
              * @return the next key part
    @@ -396,8 +396,8 @@ private static boolean partsEqual(final KeyIterator it1, final KeyIterator it2)
         /**
          * Creates a new instance of {@code DefaultConfigurationKey} and sets the associated expression engine.
          *
    -     * @param engine the expression engine (must not be null)
    -     * @throws IllegalArgumentException if the expression engine is null
    +     * @param engine the expression engine (must not be null)
    +     * @throws IllegalArgumentException if the expression engine is null
          */
         public DefaultConfigurationKey(final DefaultExpressionEngine engine) {
             this(engine, null);
    @@ -407,9 +407,9 @@ public DefaultConfigurationKey(final DefaultExpressionEngine engine) {
          * Creates a new instance of {@code DefaultConfigurationKey} and sets the associated expression engine and an initial
          * key.
          *
    -     * @param engine the expression engine (must not be null)
    +     * @param engine the expression engine (must not be null)
          * @param key the key to be wrapped
    -     * @throws IllegalArgumentException if the expression engine is null
    +     * @throws IllegalArgumentException if the expression engine is null
          */
         public DefaultConfigurationKey(final DefaultExpressionEngine engine, final String key) {
             if (engine == null) {
    @@ -436,7 +436,7 @@ public DefaultConfigurationKey append(final String property) {
     
         /**
          * Appends the name of a property to this key. If necessary, a property delimiter will be added. If the boolean argument
    -     * is set to true, property delimiters contained in the property name will be escaped.
    +     * is set to true, property delimiters contained in the property name will be escaped.
          *
          * @param property the name of the property to be added
          * @param escape a flag if property delimiters in the passed in property name should be escaped
    @@ -660,7 +660,7 @@ private boolean hasTrailingDelimiter(final String key) {
          * Tests if the specified key represents an attribute according to the current expression engine.
          *
          * @param key the key to be checked
    -     * @return true if this is an attribute key, false otherwise
    +     * @return true if this is an attribute key, false otherwise
          */
         public boolean isAttributeKey(final String key) {
             if (key == null) {
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngine.java b/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngine.java
    index d6c236af35..d93295eae6 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngine.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/DefaultExpressionEngine.java
    @@ -114,8 +114,8 @@ public class DefaultExpressionEngine implements ExpressionEngine {
         /**
          * Creates a new instance of {@code DefaultExpressionEngine} and initializes its symbols.
          *
    -     * @param syms the object with the symbols (must not be null)
    -     * @throws IllegalArgumentException if the symbols are null
    +     * @param syms the object with the symbols (must not be null)
    +     * @throws IllegalArgumentException if the symbols are null
          */
         public DefaultExpressionEngine(final DefaultExpressionEngineSymbols syms) {
             this(syms, null);
    @@ -126,9 +126,9 @@ public DefaultExpressionEngine(final DefaultExpressionEngineSymbols syms) {
          * node names. The passed in matcher is always used when the names of nodes have to be matched against parts of
          * configuration keys.
          *
    -     * @param syms the object with the symbols (must not be null)
    -     * @param nodeNameMatcher the matcher for node names; can be null, then a default matcher is used
    -     * @throws IllegalArgumentException if the symbols are null
    +     * @param syms the object with the symbols (must not be null)
    +     * @param nodeNameMatcher the matcher for node names; can be null, then a default matcher is used
    +     * @throws IllegalArgumentException if the symbols are null
          */
         public DefaultExpressionEngine(final DefaultExpressionEngineSymbols syms, final NodeMatcher nodeNameMatcher) {
             if (syms == null) {
    @@ -149,7 +149,7 @@ public String attributeKey(final String parentKey, final String attributeName) {
         /**
          * {@inheritDoc} This implementation works similar to {@code nodeKey()}; however, each key returned by this method has
          * an index (except for the root node). The parent key is prepended to the name of the current node in any case and
    -     * without further checks. If it is null, only the name of the current node with its index is returned.
    +     * without further checks. If it is null, only the name of the current node with its index is returned.
          */
         @Override
         public  String canonicalKey(final T node, final String parentKey, final NodeHandler handler) {
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java b/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
    index fc4087fe63..b0d16a9634 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/ExpressionEngine.java
    @@ -61,7 +61,7 @@ public interface ExpressionEngine {
          *
          * @param  the type of the node to be processed
          * @param node the node, for which the key must be constructed
    -     * @param parentKey the key of this node's parent (can be null for the root node)
    +     * @param parentKey the key of this node's parent (can be null for the root node)
          * @param handler the {@code NodeHandler} for accessing the node
          * @return the canonical key of this node
          */
    @@ -74,7 +74,7 @@ public interface ExpressionEngine {
          *
          * @param  the type of the node to be processed
          * @param node the node, for which the key must be constructed
    -     * @param parentKey the key of this node's parent (can be null for the root node)
    +     * @param parentKey the key of this node's parent (can be null for the root node)
          * @param handler the {@code NodeHandler} for accessing the node
          * @return this node's key
          */
    @@ -104,7 +104,7 @@ public interface ExpressionEngine {
          * @param root the root node of a hierarchy of nodes
          * @param key the key to be evaluated
          * @param handler the {@code NodeHandler} for accessing the node
    -     * @return a list with the results that are matched by the key (should never be null)
    +     * @return a list with the results that are matched by the key (should never be null)
          */
          List> query(T root, String key, NodeHandler handler);
     }
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java b/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
    index aa41959fa8..c8b9ac82a3 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
    @@ -160,7 +160,7 @@ public Builder addAttribute(final String name, final Object value) {
              * Adds all attributes of the given map to this builder. This method works like {@link #addAttribute(String, Object)},
              * but it allows setting multiple attributes at once.
              *
    -         * @param attrs the map with attributes to be added (may be null
    +         * @param attrs the map with attributes to be added (may be null
              * @return a reference to this object for method chaining
              */
             public Builder addAttributes(final Map attrs) {
    @@ -173,9 +173,9 @@ public Builder addAttributes(final Map attrs) {
     
             /**
              * Adds a child node to this builder. The passed in node becomes a child of the newly created node. If it is
    -         * null, it is ignored.
    +         * null, it is ignored.
              *
    -         * @param c the child node (must not be null)
    +         * @param c the child node (must not be null)
              * @return a reference to this object for method chaining
              */
             public Builder addChild(final ImmutableNode c) {
    @@ -303,7 +303,7 @@ public Builder value(final Object v) {
          * child nodes are always defined.
          *
          * @param child the child node to be checked
    -     * @throws IllegalArgumentException if the child node is null
    +     * @throws IllegalArgumentException if the child node is null
          */
         private static void checkChildNode(final ImmutableNode child) {
             if (child == null) {
    @@ -338,9 +338,9 @@ private ImmutableNode(final Builder b) {
         /**
          * Creates a new {@code ImmutableNode} instance which is a copy of this object, but has the given child node added.
          *
    -     * @param child the child node to be added (must not be null)
    +     * @param child the child node to be added (must not be null)
          * @return the new node with the child node added
    -     * @throws IllegalArgumentException if the child node is null
    +     * @throws IllegalArgumentException if the child node is null
          */
         public ImmutableNode addChild(final ImmutableNode child) {
             checkChildNode(child);
    @@ -472,9 +472,9 @@ public ImmutableNode removeChild(final ImmutableNode child) {
          * new one. If the child to be replaced cannot be found, the same node instance is returned.
          *
          * @param oldChild the child node to be replaced
    -     * @param newChild the replacing child node (must not be null)
    +     * @param newChild the replacing child node (must not be null)
          * @return the new node with the child replaced
    -     * @throws IllegalArgumentException if the new child node is null
    +     * @throws IllegalArgumentException if the new child node is null
          */
         public ImmutableNode replaceChild(final ImmutableNode oldChild, final ImmutableNode newChild) {
             checkChildNode(newChild);
    @@ -497,7 +497,7 @@ public ImmutableNode replaceChild(final ImmutableNode oldChild, final ImmutableN
          * ones in the passed in collection. With this method all children can be replaced in a single step. For the collection
          * the same rules apply as for {@link Builder#addChildren(Collection)}.
          *
    -     * @param newChildren the collection with the new children (may be null)
    +     * @param newChildren the collection with the new children (may be null)
          * @return the new node with replaced children
          */
         public ImmutableNode replaceChildren(final Collection newChildren) {
    @@ -524,7 +524,7 @@ public ImmutableNode setAttribute(final String name, final Object value) {
         /**
          * Returns a new {@code ImmutableNode} instance which is a copy of this object, but with all attributes added defined by
          * the given map. This method is analogous to {@link #setAttribute(String, Object)}, but all attributes in the given map
    -     * are added. If the map is null or empty, this method has no effect.
    +     * are added. If the map is null or empty, this method has no effect.
          *
          * @param newAttributes the map with attributes to be added
          * @return the new node with these attributes
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java b/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java
    index 373ad9451e..51b392d0ae 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/InMemoryNodeModel.java
    @@ -54,7 +54,7 @@ public class InMemoryNodeModel implements NodeModel {
         private interface TransactionInitializer {
             /**
              * Initializes the specified transaction for an update operation. The return value indicates whether the transaction
    -         * should be executed. A result of false means that the update is to be aborted (maybe another update method was
    +         * should be executed. A result of false means that the update is to be aborted (maybe another update method was
              * called).
              *
              * @param tx the transaction to be initialized
    @@ -131,10 +131,10 @@ private static IllegalArgumentException attributeKeyException(final String key)
         }
     
         /**
    -     * Checks if the passed in node is defined. Result is true if the node contains any data.
    +     * Checks if the passed in node is defined. Result is true if the node contains any data.
          *
          * @param node the node in question
    -     * @return true if the node is defined, false otherwise
    +     * @return true if the node is defined, false otherwise
          */
         static boolean checkIfNodeDefined(final ImmutableNode node) {
             return node.getValue() != null || !node.getChildren().isEmpty() || !node.getAttributes().isEmpty();
    @@ -233,7 +233,7 @@ private static TreeData createSelectorsForTrackedNodes(final Mutablenull means that no node
    +     * current root node has no name, the name of the node to be merged is used. A result of null means that no node
          * name has to be set.
          *
          * @param rootNode the current root node
    @@ -339,7 +339,7 @@ public void visitBeforeChildren(final ImmutableNode node, final NodeHandlertrue if values are provided, false otherwise
    +     * @return true if values are provided, false otherwise
          */
         private static boolean valuesNotEmpty(final Iterable values) {
             return values.iterator().hasNext();
    @@ -357,7 +357,7 @@ public InMemoryNodeModel() {
     
         /**
          * Creates a new instance of {@code InMemoryNodeModel} and initializes it from the given root node. If the passed in
    -     * node is null, a new, empty root node is created.
    +     * node is null, a new, empty root node is created.
          *
          * @param root the new root node for this model
          */
    @@ -373,10 +373,10 @@ public void addNodes(final String key, final Collection
         /**
          * Adds new nodes using a tracked node as root node. This method works like the normal {@code addNodes()} method, but
          * the origin of the operation (also for the interpretation of the passed in key) is a tracked node identified by the
    -     * passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
    +     * passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
          *
          * @param key the key
    -     * @param selector the {@code NodeSelector} defining the root node (or null)
    +     * @param selector the {@code NodeSelector} defining the root node (or null)
          * @param nodes the collection of new nodes to be added
          * @param resolver the {@code NodeKeyResolver}
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
    @@ -412,10 +412,10 @@ public void addProperty(final String key, final Iterable values, final NodeKe
         /**
          * Adds new property values using a tracked node as root node. This method works like the normal {@code addProperty()}
          * method, but the origin of the operation (also for the interpretation of the passed in key) is a tracked node
    -     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
    +     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
          *
          * @param key the key
    -     * @param selector the {@code NodeSelector} defining the root node (or null)
    +     * @param selector the {@code NodeSelector} defining the root node (or null)
          * @param values the values to be added
          * @param resolver the {@code NodeKeyResolver}
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
    @@ -452,10 +452,10 @@ public void clearProperty(final String key, final NodeKeyResolver
         /**
          * Clears a property using a tracked node as root node. This method works like the normal {@code clearProperty()}
          * method, but the origin of the operation (also for the interpretation of the passed in key) is a tracked node
    -     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
    +     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
          *
          * @param key the key
    -     * @param selector the {@code NodeSelector} defining the root node (or null)
    +     * @param selector the {@code NodeSelector} defining the root node (or null)
          * @param resolver the {@code NodeKeyResolver}
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
          */
    @@ -479,10 +479,10 @@ public List> clearTree(final String key, final NodeKe
         /**
          * Clears a whole sub tree using a tracked node as root node. This method works like the normal {@code clearTree()}
          * method, but the origin of the operation (also for the interpretation of the passed in key) is a tracked node
    -     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
    +     * identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is assumed.
          *
          * @param key the key
    -     * @param selector the {@code NodeSelector} defining the root node (or null)
    +     * @param selector the {@code NodeSelector} defining the root node (or null)
          * @param resolver the {@code NodeKeyResolver}
          * @return a list with the results to be removed
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
    @@ -532,7 +532,7 @@ private Map createParentMapping(final ImmutableNod
          * Creates a {@code TreeData} object for the specified root node.
          *
          * @param root the root node of the current tree
    -     * @param current the current {@code TreeData} object (may be null)
    +     * @param current the current {@code TreeData} object (may be null)
          * @return the {@code TreeData} describing the current tree
          */
         private TreeData createTreeData(final ImmutableNode root, final TreeData current) {
    @@ -718,8 +718,8 @@ public boolean isTrackedNodeDetached(final NodeSelector selector) {
          * define the new name of the root node and to pass in a map with reference objects.
          *
          * @param node the node to be merged with the root node
    -     * @param rootName the new name of the root node; can be null, then the name of the root node is not changed
    -     *        unless it is null
    +     * @param rootName the new name of the root node; can be null, then the name of the root node is not changed
    +     *        unless it is null
          * @param references an optional map with reference objects
          * @param rootRef an optional reference object for the new root node
          * @param resolver the {@code NodeKeyResolver}
    @@ -785,9 +785,9 @@ private boolean replaceDetachedTrackedNode(final TreeData currentData, final Nod
          * operation is useful if the new nodes hierarchy to be set is known to be similar to the old one. Note that reference
          * objects are lost; there is no way to automatically match nodes between the old and the new nodes hierarchy.
          *
    -     * @param newRoot the new root node to be set (must not be null)
    +     * @param newRoot the new root node to be set (must not be null)
          * @param resolver the {@code NodeKeyResolver}
    -     * @throws IllegalArgumentException if the new root node is null
    +     * @throws IllegalArgumentException if the new root node is null
          */
         public void replaceRoot(final ImmutableNode newRoot, final NodeKeyResolver resolver) {
             if (newRoot == null) {
    @@ -802,13 +802,13 @@ public void replaceRoot(final ImmutableNode newRoot, final NodeKeyResolvernull) becomes the new root node of an independent model for this tracked node.
    +     * in node (which must not be null) becomes the new root node of an independent model for this tracked node.
          * Further updates of this model do not affect the tracked node's model and vice versa.
          *
          * @param selector the {@code NodeSelector} defining the tracked node
    -     * @param newNode the node replacing the tracked node (must not be null)
    +     * @param newNode the node replacing the tracked node (must not be null)
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
    -     * @throws IllegalArgumentException if the replacement node is null
    +     * @throws IllegalArgumentException if the replacement node is null
          */
         public void replaceTrackedNode(final NodeSelector selector, final ImmutableNode newNode) {
             if (newNode == null) {
    @@ -848,11 +848,11 @@ public Collection selectAndTrackNodes(final String key, final Node
         /**
          * Sets the value of a property using a tracked node as root node. This method works like the normal
          * {@code setProperty()} method, but the origin of the operation (also for the interpretation of the passed in key) is a
    -     * tracked node identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is
    +     * tracked node identified by the passed in {@code NodeSelector}. The selector can be null, then the root node is
          * assumed.
          *
          * @param key the key
    -     * @param selector the {@code NodeSelector} defining the root node (or null)
    +     * @param selector the {@code NodeSelector} defining the root node (or null)
          * @param value the new value for this property
          * @param resolver the {@code NodeKeyResolver}
          * @throws ConfigurationRuntimeException if the selector cannot be resolved
    @@ -881,7 +881,7 @@ public void setProperty(final String key, final Object value, final NodeKeyResol
          * this method is used and the model is accessed by multiple threads. It is not deterministic which concurrent
          * operations see the old root and which see the new root node.
          *
    -     * @param newRoot the new root node to be set (can be null, then an empty root node is set)
    +     * @param newRoot the new root node to be set (can be null, then an empty root node is set)
          */
         @Override
         public void setRootNode(final ImmutableNode newRoot) {
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java b/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
    index a52843e92a..7fa838c1b9 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeAddData.java
    @@ -113,7 +113,7 @@ public T getParent() {
          * Then {@code username} is the name of the new node, but the nodes {@code connection} and {@code settings} must be
          * added to the parent node first. In this example these names would be returned by this method.
          *
    -     * @return a list with the names of nodes that must be added as parents of the new node (never null)
    +     * @return a list with the names of nodes that must be added as parents of the new node (never null)
          */
         public List getPathNodes() {
             return pathNodes;
    @@ -122,7 +122,7 @@ public List getPathNodes() {
         /**
          * Returns a flag if the new node to be added is an attribute.
          *
    -     * @return true for an attribute node, false for a child node
    +     * @return true for an attribute node, false for a child node
          */
         public boolean isAttribute() {
             return attribute;
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeHandler.java b/src/main/java/org/apache/commons/configuration2/tree/NodeHandler.java
    index 7398d0c5ba..18ec5a2a13 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeHandler.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeHandler.java
    @@ -81,10 +81,10 @@ public interface NodeHandler {
          * for some node implementations it may be by far more efficient to count the children than to query a list of all
          * children and determine its size. A concrete implementation can choose the most efficient way to determine the number
          * of children. If a child name is passed in, only the children with this name are taken into account. If the name
    -     * null is passed, the total number of children must be returned.
    +     * null is passed, the total number of children must be returned.
          *
          * @param node the node
    -     * @param name the name of the children in question (can be null for all children)
    +     * @param name the name of the children in question (can be null for all children)
          * @return the number of the selected children
          */
         int getChildrenCount(T node, String name);
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeMatcher.java b/src/main/java/org/apache/commons/configuration2/tree/NodeMatcher.java
    index 22283a2e62..d94c3e9f9b 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeMatcher.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeMatcher.java
    @@ -44,7 +44,7 @@ public interface NodeMatcher {
          * @param handler the corresponding {@code NodeHandler}
          * @param criterion the criterion to match against
          * @param  the type of the node
    -     * @return true if this node matches the criterion, false otherwise
    +     * @return true if this node matches the criterion, false otherwise
          */
          boolean matches(T node, NodeHandler handler, C criterion);
     }
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeModel.java b/src/main/java/org/apache/commons/configuration2/tree/NodeModel.java
    index 6dce72235f..29de96ad87 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeModel.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeModel.java
    @@ -46,7 +46,7 @@ public interface NodeModel {
          * given key.
          *
          * @param key the key
    -     * @param nodes the collection of nodes to be added (may be null)
    +     * @param nodes the collection of nodes to be added (may be null)
          * @param resolver the {@code NodeKeyResolver}
          * @throws IllegalArgumentException if the key references an attribute (of course, it is not possible to add something
          *         to an attribute)
    @@ -73,7 +73,7 @@ public interface NodeModel {
     
         /**
          * Clears the value of a property. This method is similar to {@link #clearTree(String, NodeKeyResolver)}: However, the
    -     * nodes referenced by the passed in key are not removed completely, but only their value is set to null.
    +     * nodes referenced by the passed in key are not removed completely, but only their value is set to null.
          *
          * @param key the key selecting the properties to be cleared
          * @param resolver the {@code NodeKeyResolver}
    @@ -124,7 +124,7 @@ public interface NodeModel {
         /**
          * Sets a new root node for this model. The whole structure is replaced by the new node and its children.
          *
    -     * @param newRoot the new root node to be set (can be null, then an empty root node is set)
    +     * @param newRoot the new root node to be set (can be null, then an empty root node is set)
          */
         void setRootNode(T newRoot);
     }
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeNameMatchers.java b/src/main/java/org/apache/commons/configuration2/tree/NodeNameMatchers.java
    index 28a70e9330..bffe8e8fd2 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeNameMatchers.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeNameMatchers.java
    @@ -32,7 +32,7 @@
      */
     public enum NodeNameMatchers implements NodeMatcher {
         /**
    -     * A matcher for exact node name matches. This matcher returns true if and only if the name of the passed in node
    +     * A matcher for exact node name matches. This matcher returns true if and only if the name of the passed in node
          * equals exactly the given criterion string.
          */
         EQUALS {
    diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeSelector.java b/src/main/java/org/apache/commons/configuration2/tree/NodeSelector.java
    index 21b95153b7..2283148f9b 100644
    --- a/src/main/java/org/apache/commons/configuration2/tree/NodeSelector.java
    +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeSelector.java
    @@ -33,7 +33,7 @@
      * e.g. if a sub key is to be constructed from another sub key. {@code NodeSelector} provides the {@code select()}
      * method which evaluates the wrapped keys on a specified root node and returns the resulting unique target node. The
      * class expects that the key(s) stored in an instance select exactly one target node. If this is not the case, result
    - * is null indicating that the selection criteria are not sufficient.
    + * is null indicating that the selection criteria are not sufficient.
      * 

    *

    * Implementation node: Instances of this class are immutable. They can be shared between arbitrary components. @@ -116,12 +116,12 @@ public int hashCode() { /** * Applies this {@code NodeSelector} on the specified root node. This method applies the selection criteria stored in * this object and tries to determine a single target node. If this is successful, the target node is returned. - * Otherwise, result is null. + * Otherwise, result is null. * * @param root the root node on which to apply this selector * @param resolver the {@code NodeKeyResolver} * @param handler the {@code NodeHandler} - * @return the selected target node or null + * @return the selected target node or null */ public ImmutableNode select(final ImmutableNode root, final NodeKeyResolver resolver, final NodeHandler handler) { List nodes = new LinkedList<>(); diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java b/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java index 72f2eded0c..db52ffd1e2 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeTracker.java @@ -92,9 +92,9 @@ private TrackedNodeData(final ImmutableNode nd, final int obsCount, final InMemo /** * Returns an instance with the detached flag set to true. This method is called if the selector of a tracked node does * not match a single node any more. It is possible to pass in a new node instance which becomes the current tracked - * node. If this is null, the previous node instance is used. + * node. If this is null, the previous node instance is used. * - * @param newNode the new tracked node instance (may be null) + * @param newNode the new tracked node instance (may be null) * @return the updated instance */ public TrackedNodeData detach(final ImmutableNode newNode) { @@ -103,7 +103,7 @@ public TrackedNodeData detach(final ImmutableNode newNode) { } /** - * Gets the node model to be used in detached mode. This is null if the represented tracked node is not + * Gets the node model to be used in detached mode. This is null if the represented tracked node is not * detached. * * @return the node model in detached mode @@ -141,10 +141,10 @@ public TrackedNodeData observerAdded() { /** * An observer for this tracked node was removed. This method returns a new instance with an adjusted observer count. If - * there are no more observers, result is null. This means that this node is no longer tracked and can be + * there are no more observers, result is null. This means that this node is no longer tracked and can be * released. * - * @return the updated instance or null + * @return the updated instance or null */ public TrackedNodeData observerRemoved() { return observerCount <= 1 ? null : new TrackedNodeData(node, observerCount - 1, getDetachedModel()); @@ -178,7 +178,7 @@ private static ImmutableNode createEmptyTrackedNode(final TrackedNodeData data) * transaction. This method checks whether the affected node is the root node of the current transaction. If so, it is * cleared. * - * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) + * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) * @param e the current selector and {@code TrackedNodeData} * @return the new {@code TrackedNodeData} object to be used for this tracked node */ @@ -192,7 +192,7 @@ private static TrackedNodeData detachedTrackedNodeData(final NodeSelector txTarg * applied to the current root node. It may become detached if there is no match. * * @param root the root node - * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) + * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) * @param resolver the {@code NodeKeyResolver} * @param handler the {@code NodeHandler} * @param e the current selector and {@code TrackedNodeData} @@ -281,10 +281,10 @@ public NodeTracker detachAllTrackedNodes() { /** * Gets the detached node model for the specified tracked node. When a node becomes detached, operations on it are * independent from the original model. To implement this, a separate node model is created wrapping this tracked node. - * This model can be queried by this method. If the node affected is not detached, result is null. + * This model can be queried by this method. If the node affected is not detached, result is null. * * @param selector the {@code NodeSelector} - * @return the detached node model for this node or null + * @return the detached node model for this node or null * @throws ConfigurationRuntimeException if no data for this selector is available */ public InMemoryNodeModel getDetachedNodeModel(final NodeSelector selector) { @@ -412,13 +412,13 @@ public NodeTracker untrackNode(final NodeSelector selector) { * Updates tracking information after the node structure has been changed. This method iterates over all tracked nodes. * The selectors are evaluated again to update the node reference. If this fails for a selector, the previous node is * reused; this tracked node is then detached. The passed in {@code NodeSelector} is the selector of the tracked node - * which is the target of the current transaction. (It is null if the transaction is not executed on a tracked + * which is the target of the current transaction. (It is null if the transaction is not executed on a tracked * node.) This is used to handle a special case: if the tracked node becomes detached by an operation targeting itself, * this means that the node has been cleared by this operation. In this case, the previous node instance is not used, * but an empty node is created. * * @param root the root node - * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) + * @param txTarget the {@code NodeSelector} referencing the target node of the current transaction (may be null) * @param resolver the {@code NodeKeyResolver} * @param handler the {@code NodeHandler} * @return the updated instance diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java b/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java index ec304abac5..e518ada82a 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeTreeWalker.java @@ -72,7 +72,7 @@ private static void bfs(final T root, final ConfigurationNodeVisitor visi * @param visitor the visitor * @param handler the handler * @param the type of the nodes involved - * @return true if a walk operation can be performed, false otherwise + * @return true if a walk operation can be performed, false otherwise * @throws IllegalArgumentException if a required parameter is missing */ private static boolean checkParameters(final T root, final ConfigurationNodeVisitor visitor, final NodeHandler handler) { @@ -110,11 +110,11 @@ private static void dfs(final T node, final ConfigurationNodeVisitor visi * etc. In this mode of traversal, there is no direct connection between the encounter of a node and its children. * Therefore, on the visitor object only the {@code visitBeforeChildren()} method gets called!. * - * @param root the root node of the hierarchy to be processed (may be null, then this call has no effect) - * @param visitor the {@code ConfigurationNodeVisitor} (must not be null) - * @param handler the {@code NodeHandler} (must not be null) + * @param root the root node of the hierarchy to be processed (may be null, then this call has no effect) + * @param visitor the {@code ConfigurationNodeVisitor} (must not be null) + * @param handler the {@code NodeHandler} (must not be null) * @param the type of the nodes involved - * @throws IllegalArgumentException if a required parameter is null + * @throws IllegalArgumentException if a required parameter is null */ public void walkBFS(final T root, final ConfigurationNodeVisitor visitor, final NodeHandler handler) { if (checkParameters(root, visitor, handler)) { @@ -128,11 +128,11 @@ public void walkBFS(final T root, final ConfigurationNodeVisitor visitor, * recursively all of its children are processed, and eventually * {@link ConfigurationNodeVisitor#visitAfterChildren(Object, NodeHandler)} gets invoked. * - * @param root the root node of the hierarchy to be processed (may be null, then this call has no effect) - * @param visitor the {@code ConfigurationNodeVisitor} (must not be null) - * @param handler the {@code NodeHandler} (must not be null) + * @param root the root node of the hierarchy to be processed (may be null, then this call has no effect) + * @param visitor the {@code ConfigurationNodeVisitor} (must not be null) + * @param handler the {@code NodeHandler} (must not be null) * @param the type of the nodes involved - * @throws IllegalArgumentException if a required parameter is null + * @throws IllegalArgumentException if a required parameter is null */ public void walkDFS(final T root, final ConfigurationNodeVisitor visitor, final NodeHandler handler) { if (checkParameters(root, visitor, handler)) { diff --git a/src/main/java/org/apache/commons/configuration2/tree/NodeUpdateData.java b/src/main/java/org/apache/commons/configuration2/tree/NodeUpdateData.java index 304b0e1e10..90ca0fdba9 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/NodeUpdateData.java +++ b/src/main/java/org/apache/commons/configuration2/tree/NodeUpdateData.java @@ -83,7 +83,7 @@ private static Map copyMap(final Map map) /** * Creates a new instance of {@code NodeUpdateData} and initializes all its properties. All passed in collections are - * optional and can be null. + * optional and can be null. * * @param changedValues the map defining the changed values * @param newValues the collection with the new values diff --git a/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java b/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java index 5a45f19383..34120519bc 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java +++ b/src/main/java/org/apache/commons/configuration2/tree/OverrideCombiner.java @@ -59,7 +59,7 @@ protected void addAttributes(final ImmutableNode.Builder result, final Immutable /** * Tests if a child node of the second node can be combined with the given child node of the first node. If this is the - * case, the corresponding node will be returned, otherwise null. This implementation checks whether the child + * case, the corresponding node will be returned, otherwise null. This implementation checks whether the child * node occurs only once in both hierarchies and is no known list node. * * @param node1 the first node diff --git a/src/main/java/org/apache/commons/configuration2/tree/QueryResult.java b/src/main/java/org/apache/commons/configuration2/tree/QueryResult.java index ac3c45d8dc..641f8111a9 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/QueryResult.java +++ b/src/main/java/org/apache/commons/configuration2/tree/QueryResult.java @@ -139,10 +139,10 @@ public int hashCode() { } /** - * Returns a flag whether this is a result of type attribute. If result is true, the attribute name and value can + * Returns a flag whether this is a result of type attribute. If result is true, the attribute name and value can * be queried. Otherwise, only the result node is available. * - * @return true for an attribute result, false otherwise + * @return true for an attribute result, false otherwise */ public boolean isAttributeResult() { return StringUtils.isNotEmpty(getAttributeName()); diff --git a/src/main/java/org/apache/commons/configuration2/tree/ReferenceNodeHandler.java b/src/main/java/org/apache/commons/configuration2/tree/ReferenceNodeHandler.java index a4621eaa18..2f1d89a696 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/ReferenceNodeHandler.java +++ b/src/main/java/org/apache/commons/configuration2/tree/ReferenceNodeHandler.java @@ -38,10 +38,10 @@ public interface ReferenceNodeHandler extends NodeHandler { /** * Gets the reference object associated with the specified node. If no reference data is associated with this node, - * result is null. + * result is null. * * @param node the node in question - * @return the reference object for this node or null + * @return the reference object for this node or null */ Object getReference(ImmutableNode node); diff --git a/src/main/java/org/apache/commons/configuration2/tree/ReferenceTracker.java b/src/main/java/org/apache/commons/configuration2/tree/ReferenceTracker.java index d118812699..eb913058c8 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/ReferenceTracker.java +++ b/src/main/java/org/apache/commons/configuration2/tree/ReferenceTracker.java @@ -88,7 +88,7 @@ public ReferenceTracker addReferences(final Map refs) { * Gets the reference object associated with the given node. * * @param node the node - * @return the reference object for this node or null + * @return the reference object for this node or null */ public Object getReference(final ImmutableNode node) { return references.get(node); diff --git a/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeModel.java b/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeModel.java index e249e5357e..2367dce786 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeModel.java +++ b/src/main/java/org/apache/commons/configuration2/tree/TrackedNodeModel.java @@ -74,8 +74,8 @@ public class TrackedNodeModel implements NodeModel { * {@code SubnodeConfiguration}, there is typically no way to discard the model explicitly. Therefore, it makes sense to * do this automatically on finalization. * - * @param modelSupport the underlying {@code InMemoryNodeModelSupport} (must not be null) - * @param sel the selector to the root node of this model (must not be null) + * @param modelSupport the underlying {@code InMemoryNodeModelSupport} (must not be null) + * @param sel the selector to the root node of this model (must not be null) * @param untrackOnFinalize a flag whether the tracked node should be released on finalization * @throws IllegalArgumentException if a required parameter is missing */ diff --git a/src/main/java/org/apache/commons/configuration2/tree/TreeData.java b/src/main/java/org/apache/commons/configuration2/tree/TreeData.java index dfb2ce4cd6..8f8990d93b 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/TreeData.java +++ b/src/main/java/org/apache/commons/configuration2/tree/TreeData.java @@ -130,7 +130,7 @@ public NodeTracker getNodeTracker() { } /** - * Gets the parent node of the specified node. Result is null for the root node. If the passed in node cannot + * Gets the parent node of the specified node. Result is null for the root node. If the passed in node cannot * be resolved, an exception is thrown. * * @param node the node in question diff --git a/src/main/java/org/apache/commons/configuration2/tree/UnionCombiner.java b/src/main/java/org/apache/commons/configuration2/tree/UnionCombiner.java index e427aac5f4..520a1f38ab 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/UnionCombiner.java +++ b/src/main/java/org/apache/commons/configuration2/tree/UnionCombiner.java @@ -156,13 +156,13 @@ public ImmutableNode combine(final ImmutableNode node1, final ImmutableNode node * *

    * If all of these tests are successful, the matching child node of the second source node is returned. Otherwise the - * result is null. + * result is null. *

    * * @param node1 the first source node * @param node2 the second source node * @param child the child node of the first source node to be checked - * @return the matching child node of the second source node or null if there is none + * @return the matching child node of the second source node or null if there is none */ protected ImmutableNode findCombineNode(final ImmutableNode node1, final ImmutableNode node2, final ImmutableNode child) { if (child.getValue() == null && !isListNode(child) && HANDLER.getChildrenCount(node1, child.getNodeName()) == 1 diff --git a/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java b/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java index 6b205f7924..d907e595a4 100644 --- a/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java +++ b/src/main/java/org/apache/commons/configuration2/tree/xpath/AbstractConfigurationNodeIterator.java @@ -45,7 +45,7 @@ abstract class AbstractConfigurationNodeIterator implements NodeIterator { * Generates a qualified name with a namespace prefix. * * @param prefix the prefix - * @param name the name (may be null) + * @param name the name (may be null) * @return the qualified name */ protected static String prefixName(final String prefix, final String name) { diff --git a/src/test/java/org/apache/commons/configuration2/DatabaseConfigurationTestHelper.java b/src/test/java/org/apache/commons/configuration2/DatabaseConfigurationTestHelper.java index 9ac3c285c0..11d863cc72 100644 --- a/src/test/java/org/apache/commons/configuration2/DatabaseConfigurationTestHelper.java +++ b/src/test/java/org/apache/commons/configuration2/DatabaseConfigurationTestHelper.java @@ -220,7 +220,7 @@ public DatabaseConfiguration setUpMultiConfig() throws ConfigurationException { * * @param the type of the result configuration * @param configCls the configuration class - * @param configName the name of the configuration instance or null for the default name + * @param configName the name of the configuration instance or null for the default name * @return the newly created configuration instance * @throws ConfigurationException if an error occurs */ @@ -231,7 +231,7 @@ public T setUpMultiConfig(final Class confi /** * Returns a parameters object with settings for a configuration table containing the data of multiple configurations. * - * @param configName the name of the configuration instance or null for the default name + * @param configName the name of the configuration instance or null for the default name * @return the parameters object */ public DatabaseBuilderParameters setUpMultiParameters(final String configName) { diff --git a/src/test/java/org/apache/commons/configuration2/TestConfigurationUtils.java b/src/test/java/org/apache/commons/configuration2/TestConfigurationUtils.java index 6147ebb246..eb64307677 100644 --- a/src/test/java/org/apache/commons/configuration2/TestConfigurationUtils.java +++ b/src/test/java/org/apache/commons/configuration2/TestConfigurationUtils.java @@ -183,7 +183,7 @@ public void testCloneConfigurationNotSupported() { } /** - * Tests cloning a null configuration. + * Tests cloning a null configuration. */ @Test public void testCloneConfigurationNull() { diff --git a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java index 780a6a714a..18c40d4867 100644 --- a/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java +++ b/src/test/java/org/apache/commons/configuration2/TestPropertiesConfigurationLayout.java @@ -82,7 +82,7 @@ static class PropertiesBuilder { /** * Adds a comment line. * - * @param s the comment (can be null, then a blank line is added) + * @param s the comment (can be null, then a blank line is added) */ public void addComment(final String s) { if (s != null) { diff --git a/src/test/java/org/apache/commons/configuration2/builder/combined/TestConfigurationDeclaration.java b/src/test/java/org/apache/commons/configuration2/builder/combined/TestConfigurationDeclaration.java index af7cd7ffcb..572285c053 100644 --- a/src/test/java/org/apache/commons/configuration2/builder/combined/TestConfigurationDeclaration.java +++ b/src/test/java/org/apache/commons/configuration2/builder/combined/TestConfigurationDeclaration.java @@ -34,7 +34,7 @@ public class TestConfigurationDeclaration { /** * Creates a default test instance. * - * @param conf the configuration to be used (may be null for a default one) + * @param conf the configuration to be used (may be null for a default one) * @return the test object */ private static ConfigurationDeclaration createDeclaration(final HierarchicalConfiguration conf) { diff --git a/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java b/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java index 47e276064a..1dad981125 100644 --- a/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java +++ b/src/test/java/org/apache/commons/configuration2/builder/combined/TestReloadingCombinedConfigurationBuilderFileBased.java @@ -306,7 +306,7 @@ private void writeDefinitionFile(final File defFile, final File src) throws Conf /** * Writes a file for testing reload operations. * - * @param f the file to be written or null for creating a new one + * @param f the file to be written or null for creating a new one * @param tagIdx the index of the tag * @param value the value of the reload test property * @return the file that was written @@ -320,7 +320,7 @@ private File writeReloadFile(final File f, final int tagIdx, final int value) th * Helper method for writing a test file for reloading. The file will be created in the test directory. It is also * scheduled for automatic deletion after the test. * - * @param f the file to be written or null for creating a new one + * @param f the file to be written or null for creating a new one * @param content the content of the file * @return the {@code File} object for the test file * @throws IOException if an error occurs diff --git a/src/test/java/org/apache/commons/configuration2/event/AbstractEventListenerTestImpl.java b/src/test/java/org/apache/commons/configuration2/event/AbstractEventListenerTestImpl.java index 58e8bb12e6..506c72c076 100644 --- a/src/test/java/org/apache/commons/configuration2/event/AbstractEventListenerTestImpl.java +++ b/src/test/java/org/apache/commons/configuration2/event/AbstractEventListenerTestImpl.java @@ -40,7 +40,7 @@ public abstract class AbstractEventListenerTestImpl implements /** * Creates a new instance of {@code AbstractEventListenerTestImpl} and sets the expected event source. * - * @param source the event source (null if the source need not to be checked) + * @param source the event source (null if the source need not to be checked) */ protected AbstractEventListenerTestImpl(final Object source) { expectedSource = source; diff --git a/src/test/java/org/apache/commons/configuration2/event/ErrorListenerTestImpl.java b/src/test/java/org/apache/commons/configuration2/event/ErrorListenerTestImpl.java index 60b03222b7..b2bcec7d43 100644 --- a/src/test/java/org/apache/commons/configuration2/event/ErrorListenerTestImpl.java +++ b/src/test/java/org/apache/commons/configuration2/event/ErrorListenerTestImpl.java @@ -25,7 +25,7 @@ public class ErrorListenerTestImpl extends AbstractEventListenerTestImplnull if the source need not to be checked) + * @param source the event source (null if the source need not to be checked) */ public ErrorListenerTestImpl(final Object source) { super(source); diff --git a/src/test/java/org/apache/commons/configuration2/event/EventListenerTestImpl.java b/src/test/java/org/apache/commons/configuration2/event/EventListenerTestImpl.java index 501de238a2..c6dd90fa67 100644 --- a/src/test/java/org/apache/commons/configuration2/event/EventListenerTestImpl.java +++ b/src/test/java/org/apache/commons/configuration2/event/EventListenerTestImpl.java @@ -25,7 +25,7 @@ public class EventListenerTestImpl extends AbstractEventListenerTestImplnull if the source need not to be checked) + * @param source the event source (null if the source need not to be checked) */ public EventListenerTestImpl(final Object source) { super(source); diff --git a/src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java b/src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java index 1fb1ee56a8..1a0b5ca5f1 100644 --- a/src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java +++ b/src/test/java/org/apache/commons/configuration2/io/TestFileHandler.java @@ -284,7 +284,7 @@ private File createTestFile() { /** * Creates a test file with test content and allows specifying a file name. * - * @param f the file to be created (may be null) + * @param f the file to be created (may be null) * @return the File object pointing to the test file */ private File createTestFile(final File f) { diff --git a/src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java b/src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java index a968f62beb..e940598915 100644 --- a/src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java +++ b/src/test/java/org/apache/commons/configuration2/reloading/AlwaysReloadingDetector.java @@ -22,7 +22,7 @@ */ public class AlwaysReloadingDetector implements ReloadingDetector { /** - * {@inheritDoc} This implementation always returns true. + * {@inheritDoc} This implementation always returns true. */ @Override public boolean isReloadingRequired() {