You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/09/27 22:24:26 UTC
svn commit: r1842194 [3/34] - in /commons/proper/configuration/trunk/src:
main/java/org/apache/commons/configuration2/
main/java/org/apache/commons/configuration2/beanutils/
main/java/org/apache/commons/configuration2/builder/
main/java/org/apache/comm...
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java?rev=1842194&r1=1842193&r2=1842194&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationMap.java Thu Sep 27 22:24:23 2018
@@ -49,7 +49,7 @@ public class ConfigurationMap extends Ab
* @param configuration {@code Configuration}
* instance.
*/
- public ConfigurationMap(Configuration configuration)
+ public ConfigurationMap(final Configuration configuration)
{
this.configuration = configuration;
}
@@ -87,10 +87,10 @@ public class ConfigurationMap extends Ab
* @see java.util.Map#put(java.lang.Object, java.lang.Object)
*/
@Override
- public Object put(Object key, Object value)
+ public Object put(final Object key, final Object value)
{
- String strKey = String.valueOf(key);
- Object old = configuration.getProperty(strKey);
+ final String strKey = String.valueOf(key);
+ final Object old = configuration.getProperty(strKey);
configuration.setProperty(strKey, value);
return old;
}
@@ -104,7 +104,7 @@ public class ConfigurationMap extends Ab
* @see java.util.Map#get(java.lang.Object)
*/
@Override
- public Object get(Object key)
+ public Object get(final Object key)
{
return configuration.getProperty(String.valueOf(key));
}
@@ -125,7 +125,7 @@ public class ConfigurationMap extends Ab
/** The key of the map entry. */
private final Object key;
- private Entry(Object key)
+ private Entry(final Object key)
{
this.key = key;
}
@@ -143,9 +143,9 @@ public class ConfigurationMap extends Ab
}
@Override
- public Object setValue(Object value)
+ public Object setValue(final Object value)
{
- Object old = getValue();
+ final Object old = getValue();
configuration.setProperty((String) key, value);
return old;
}
@@ -183,7 +183,7 @@ public class ConfigurationMap extends Ab
}
}
- ConfigurationSet(Configuration configuration)
+ ConfigurationSet(final Configuration configuration)
{
this.configuration = configuration;
}
@@ -196,7 +196,7 @@ public class ConfigurationMap extends Ab
{
// Ouch. Now _that_ one is expensive...
int count = 0;
- for (Iterator<String> iterator = configuration.getKeys(); iterator.hasNext();)
+ for (final Iterator<String> iterator = configuration.getKeys(); iterator.hasNext();)
{
iterator.next();
count++;
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java?rev=1842194&r1=1842193&r2=1842194&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationUtils.java Thu Sep 27 22:24:23 2018
@@ -75,14 +75,14 @@ public final class ConfigurationUtils
{
@Override
- public <T extends Event> void addEventListener(EventType<T> eventType,
- EventListener<? super T> listener)
+ public <T extends Event> void addEventListener(final EventType<T> eventType,
+ final EventListener<? super T> listener)
{
}
@Override
public <T extends Event> boolean removeEventListener(
- EventType<T> eventType, EventListener<? super T> listener)
+ final EventType<T> eventType, final EventListener<? super T> listener)
{
return false;
}
@@ -106,7 +106,7 @@ public final class ConfigurationUtils
* @param out the output stream to dump the configuration to
* @since 2.2
*/
- public static void dump(ImmutableConfiguration configuration, PrintStream out)
+ public static void dump(final ImmutableConfiguration configuration, final PrintStream out)
{
dump(configuration, new PrintWriter(out));
}
@@ -118,7 +118,7 @@ public final class ConfigurationUtils
* @param configuration the configuration
* @param out the output stream to dump the configuration to
*/
- public static void dump(Configuration configuration, PrintStream out)
+ public static void dump(final Configuration configuration, final PrintStream out)
{
dump((ImmutableConfiguration) configuration, out);
}
@@ -130,12 +130,12 @@ public final class ConfigurationUtils
* @param out the writer to dump the configuration to
* @since 2.2
*/
- public static void dump(ImmutableConfiguration configuration, PrintWriter out)
+ public static void dump(final ImmutableConfiguration configuration, final PrintWriter out)
{
- for (Iterator<String> keys = configuration.getKeys(); keys.hasNext();)
+ for (final Iterator<String> keys = configuration.getKeys(); keys.hasNext();)
{
- String key = keys.next();
- Object value = configuration.getProperty(key);
+ final String key = keys.next();
+ final Object value = configuration.getProperty(key);
out.print(key);
out.print("=");
out.print(value);
@@ -156,7 +156,7 @@ public final class ConfigurationUtils
* @param configuration the configuration
* @param out the writer to dump the configuration to
*/
- public static void dump(Configuration configuration, PrintWriter out)
+ public static void dump(final Configuration configuration, final PrintWriter out)
{
dump((ImmutableConfiguration) configuration, out);
}
@@ -169,9 +169,9 @@ public final class ConfigurationUtils
* @return a string representation of the configuration
* @since 2.2
*/
- public static String toString(ImmutableConfiguration configuration)
+ public static String toString(final ImmutableConfiguration configuration)
{
- StringWriter writer = new StringWriter();
+ final StringWriter writer = new StringWriter();
dump(configuration, new PrintWriter(writer));
return writer.toString();
}
@@ -184,7 +184,7 @@ public final class ConfigurationUtils
* @param configuration the configuration
* @return a string representation of the configuration
*/
- public static String toString(Configuration configuration)
+ public static String toString(final Configuration configuration)
{
return toString((ImmutableConfiguration) configuration);
}
@@ -203,11 +203,11 @@ public final class ConfigurationUtils
* @param target the target configuration
* @since 2.2
*/
- public static void copy(ImmutableConfiguration source, Configuration target)
+ public static void copy(final ImmutableConfiguration source, final Configuration target)
{
- for (Iterator<String> keys = source.getKeys(); keys.hasNext();)
+ for (final Iterator<String> keys = source.getKeys(); keys.hasNext();)
{
- String key = keys.next();
+ final String key = keys.next();
target.setProperty(key, source.getProperty(key));
}
}
@@ -226,7 +226,7 @@ public final class ConfigurationUtils
* @param target the target configuration
* @since 1.1
*/
- public static void copy(Configuration source, Configuration target)
+ public static void copy(final Configuration source, final Configuration target)
{
copy((ImmutableConfiguration) source, target);
}
@@ -245,11 +245,11 @@ public final class ConfigurationUtils
* @param target the target configuration
* @since 2.2
*/
- public static void append(ImmutableConfiguration source, Configuration target)
+ public static void append(final ImmutableConfiguration source, final Configuration target)
{
- for (Iterator<String> keys = source.getKeys(); keys.hasNext();)
+ for (final Iterator<String> keys = source.getKeys(); keys.hasNext();)
{
- String key = keys.next();
+ final String key = keys.next();
target.addProperty(key, source.getProperty(key));
}
}
@@ -268,7 +268,7 @@ public final class ConfigurationUtils
* @param target the target configuration
* @since 1.1
*/
- public static void append(Configuration source, Configuration target)
+ public static void append(final Configuration source, final Configuration target)
{
append((ImmutableConfiguration) source, target);
}
@@ -284,7 +284,7 @@ public final class ConfigurationUtils
* @since 1.3
*/
public static HierarchicalConfiguration<?> convertToHierarchical(
- Configuration conf)
+ final Configuration conf)
{
return convertToHierarchical(conf, null);
}
@@ -313,7 +313,7 @@ public final class ConfigurationUtils
* @since 1.6
*/
public static HierarchicalConfiguration<?> convertToHierarchical(
- Configuration conf, ExpressionEngine engine)
+ final Configuration conf, final ExpressionEngine engine)
{
if (conf == null)
{
@@ -322,7 +322,7 @@ public final class ConfigurationUtils
if (conf instanceof HierarchicalConfiguration)
{
- HierarchicalConfiguration<?> hc = (HierarchicalConfiguration<?>) conf;
+ final HierarchicalConfiguration<?> hc = (HierarchicalConfiguration<?>) conf;
if (engine != null)
{
hc.setExpressionEngine(engine);
@@ -330,7 +330,7 @@ public final class ConfigurationUtils
return hc;
}
- BaseHierarchicalConfiguration hc = new BaseHierarchicalConfiguration();
+ final BaseHierarchicalConfiguration hc = new BaseHierarchicalConfiguration();
if (engine != null)
{
hc.setExpressionEngine(engine);
@@ -355,7 +355,7 @@ public final class ConfigurationUtils
* this object
* @since 1.3
*/
- public static Configuration cloneConfiguration(Configuration config)
+ public static Configuration cloneConfiguration(final Configuration config)
throws ConfigurationRuntimeException
{
if (config == null)
@@ -366,7 +366,7 @@ public final class ConfigurationUtils
{
return (Configuration) clone(config);
}
- catch (CloneNotSupportedException cnex)
+ catch (final CloneNotSupportedException cnex)
{
throw new ConfigurationRuntimeException(cnex);
}
@@ -384,13 +384,13 @@ public final class ConfigurationUtils
* @return the result of the cloning attempt
* @since 2.0
*/
- public static Object cloneIfPossible(Object obj)
+ public static Object cloneIfPossible(final Object obj)
{
try
{
return clone(obj);
}
- catch (Exception ex)
+ catch (final Exception ex)
{
return obj;
}
@@ -409,26 +409,26 @@ public final class ConfigurationUtils
* @return the cloned object
* @throws CloneNotSupportedException if the object cannot be cloned
*/
- static Object clone(Object obj) throws CloneNotSupportedException
+ static Object clone(final Object obj) throws CloneNotSupportedException
{
if (obj instanceof Cloneable)
{
try
{
- Method m = obj.getClass().getMethod(METHOD_CLONE);
+ final Method m = obj.getClass().getMethod(METHOD_CLONE);
return m.invoke(obj);
}
- catch (NoSuchMethodException nmex)
+ catch (final NoSuchMethodException nmex)
{
throw new CloneNotSupportedException(
"No clone() method found for class"
+ obj.getClass().getName());
}
- catch (IllegalAccessException iaex)
+ catch (final IllegalAccessException iaex)
{
throw new ConfigurationRuntimeException(iaex);
}
- catch (InvocationTargetException itex)
+ catch (final InvocationTargetException itex)
{
throw new ConfigurationRuntimeException(itex);
}
@@ -456,7 +456,7 @@ public final class ConfigurationUtils
* @throws ConfigurationRuntimeException if no clone can be created
* @throws IllegalArgumentException if <b>null</b> is passed in
*/
- public static Synchronizer cloneSynchronizer(Synchronizer sync)
+ public static Synchronizer cloneSynchronizer(final Synchronizer sync)
{
if (sync == null)
{
@@ -471,7 +471,7 @@ public final class ConfigurationUtils
{
return sync.getClass().newInstance();
}
- catch (Exception ex)
+ catch (final Exception ex)
{
LOG.info("Cannot create new instance of " + sync.getClass());
}
@@ -480,7 +480,7 @@ public final class ConfigurationUtils
{
return (Synchronizer) clone(sync);
}
- catch (CloneNotSupportedException cnex)
+ catch (final CloneNotSupportedException cnex)
{
throw new ConfigurationRuntimeException(
"Cannot clone Synchronizer " + sync);
@@ -500,7 +500,7 @@ public final class ConfigurationUtils
* @param src the configuration, for which runtime exceptions are to be
* enabled; this configuration must implement {@link EventSource}
*/
- public static void enableRuntimeExceptions(Configuration src)
+ public static void enableRuntimeExceptions(final Configuration src)
{
if (!(src instanceof EventSource))
{
@@ -511,7 +511,7 @@ public final class ConfigurationUtils
new EventListener<ConfigurationErrorEvent>()
{
@Override
- public void onEvent(ConfigurationErrorEvent event)
+ public void onEvent(final ConfigurationErrorEvent event)
{
// Throw a runtime exception
throw new ConfigurationRuntimeException(event
@@ -530,7 +530,7 @@ public final class ConfigurationUtils
* @throws ClassNotFoundException if the class cannot be resolved
* @since 2.0
*/
- public static Class<?> loadClass(String clsName)
+ public static Class<?> loadClass(final String clsName)
throws ClassNotFoundException
{
if (LOG.isDebugEnabled())
@@ -538,7 +538,7 @@ public final class ConfigurationUtils
LOG.debug("Loading class " + clsName);
}
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ final ClassLoader cl = Thread.currentThread().getContextClassLoader();
try
{
if (cl != null)
@@ -546,7 +546,7 @@ public final class ConfigurationUtils
return cl.loadClass(clsName);
}
}
- catch (ClassNotFoundException cnfex)
+ catch (final ClassNotFoundException cnfex)
{
LOG.info("Could not load class " + clsName
+ " using CCL. Falling back to default CL.", cnfex);
@@ -566,13 +566,13 @@ public final class ConfigurationUtils
* @throws ConfigurationRuntimeException if the class cannot be resolved
* @since 2.0
*/
- public static Class<?> loadClassNoEx(String clsName)
+ public static Class<?> loadClassNoEx(final String clsName)
{
try
{
return loadClass(clsName);
}
- catch (ClassNotFoundException cnfex)
+ catch (final ClassNotFoundException cnfex)
{
throw new ConfigurationRuntimeException("Cannot load class "
+ clsName, cnfex);
@@ -597,7 +597,7 @@ public final class ConfigurationUtils
* @since 2.0
*/
public static ImmutableConfiguration unmodifiableConfiguration(
- Configuration c)
+ final Configuration c)
{
return createUnmodifiableConfiguration(IMMUTABLE_CONFIG_IFCS, c);
}
@@ -617,7 +617,7 @@ public final class ConfigurationUtils
* @since 2.0
*/
public static ImmutableHierarchicalConfiguration unmodifiableConfiguration(
- HierarchicalConfiguration<?> c)
+ final HierarchicalConfiguration<?> c)
{
return (ImmutableHierarchicalConfiguration) createUnmodifiableConfiguration(
IMMUTABLE_HIERARCHICAL_CONFIG_IFCS, c);
@@ -633,7 +633,7 @@ public final class ConfigurationUtils
* @throws NullPointerException if the configuration is <b>null</b>
*/
private static ImmutableConfiguration createUnmodifiableConfiguration(
- Class<?>[] ifcs, Configuration c)
+ final Class<?>[] ifcs, final Configuration c)
{
return (ImmutableConfiguration) Proxy.newProxyInstance(
ConfigurationUtils.class.getClassLoader(), ifcs,
@@ -656,8 +656,8 @@ public final class ConfigurationUtils
* {@code EventSource} and the mock flag is <b>false</b>
* @since 2.0
*/
- public static EventSource asEventSource(Object obj,
- boolean mockIfUnsupported)
+ public static EventSource asEventSource(final Object obj,
+ final boolean mockIfUnsupported)
{
if (obj instanceof EventSource)
{
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java?rev=1842194&r1=1842193&r2=1842194&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ConfigurationXMLReader.java Thu Sep 27 22:24:23 2018
@@ -80,7 +80,7 @@ public abstract class ConfigurationXMLRe
* @throws SAXException if an error occurs during parsing
*/
@Override
- public void parse(String systemId) throws IOException, SAXException
+ public void parse(final String systemId) throws IOException, SAXException
{
parseConfiguration();
}
@@ -94,7 +94,7 @@ public abstract class ConfigurationXMLRe
* @throws SAXException if an error occurs during parsing
*/
@Override
- public void parse(InputSource input) throws IOException, SAXException
+ public void parse(final InputSource input) throws IOException, SAXException
{
parseConfiguration();
}
@@ -106,7 +106,7 @@ public abstract class ConfigurationXMLRe
* @return always <b>false</b> (no features are supported)
*/
@Override
- public boolean getFeature(String name)
+ public boolean getFeature(final String name)
{
return false;
}
@@ -118,7 +118,7 @@ public abstract class ConfigurationXMLRe
* @param value the value of the feature
*/
@Override
- public void setFeature(String name, boolean value)
+ public void setFeature(final String name, final boolean value)
{
}
@@ -140,7 +140,7 @@ public abstract class ConfigurationXMLRe
* @param handler the content handler
*/
@Override
- public void setContentHandler(ContentHandler handler)
+ public void setContentHandler(final ContentHandler handler)
{
contentHandler = handler;
}
@@ -163,7 +163,7 @@ public abstract class ConfigurationXMLRe
* @param handler the handler to be set
*/
@Override
- public void setDTDHandler(DTDHandler handler)
+ public void setDTDHandler(final DTDHandler handler)
{
}
@@ -185,7 +185,7 @@ public abstract class ConfigurationXMLRe
* @param resolver the entity resolver
*/
@Override
- public void setEntityResolver(EntityResolver resolver)
+ public void setEntityResolver(final EntityResolver resolver)
{
}
@@ -207,7 +207,7 @@ public abstract class ConfigurationXMLRe
* @param handler the error handler
*/
@Override
- public void setErrorHandler(ErrorHandler handler)
+ public void setErrorHandler(final ErrorHandler handler)
{
}
@@ -219,7 +219,7 @@ public abstract class ConfigurationXMLRe
* @return the property value
*/
@Override
- public Object getProperty(String name)
+ public Object getProperty(final String name)
{
return null;
}
@@ -232,7 +232,7 @@ public abstract class ConfigurationXMLRe
* @param value the property value
*/
@Override
- public void setProperty(String name, Object value)
+ public void setProperty(final String name, final Object value)
{
}
@@ -251,7 +251,7 @@ public abstract class ConfigurationXMLRe
*
* @param string the name for the root element.
*/
- public void setRootName(String string)
+ public void setRootName(final String string)
{
rootName = string;
}
@@ -262,16 +262,16 @@ public abstract class ConfigurationXMLRe
* @param name the name of the actual element
* @param attribs the attributes of this element (can be <b>null</b>)
*/
- protected void fireElementStart(String name, Attributes attribs)
+ protected void fireElementStart(final String name, final Attributes attribs)
{
if (getException() == null)
{
try
{
- Attributes at = (attribs == null) ? EMPTY_ATTRS : attribs;
+ final Attributes at = (attribs == null) ? EMPTY_ATTRS : attribs;
getContentHandler().startElement(NS_URI, name, name, at);
}
- catch (SAXException ex)
+ catch (final SAXException ex)
{
exception = ex;
}
@@ -283,7 +283,7 @@ public abstract class ConfigurationXMLRe
*
* @param name the name of the affected element
*/
- protected void fireElementEnd(String name)
+ protected void fireElementEnd(final String name)
{
if (getException() == null)
{
@@ -291,7 +291,7 @@ public abstract class ConfigurationXMLRe
{
getContentHandler().endElement(NS_URI, name, name);
}
- catch (SAXException ex)
+ catch (final SAXException ex)
{
exception = ex;
}
@@ -303,16 +303,16 @@ public abstract class ConfigurationXMLRe
*
* @param text the text
*/
- protected void fireCharacters(String text)
+ protected void fireCharacters(final String text)
{
if (getException() == null)
{
try
{
- char[] ch = text.toCharArray();
+ final char[] ch = text.toCharArray();
getContentHandler().characters(ch, 0, ch.length);
}
- catch (SAXException ex)
+ catch (final SAXException ex)
{
exception = ex;
}
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java?rev=1842194&r1=1842193&r2=1842194&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DataConfiguration.java Thu Sep 27 22:24:23 2018
@@ -121,7 +121,7 @@ public class DataConfiguration extends A
*
* @param configuration the wrapped configuration
*/
- public DataConfiguration(Configuration configuration)
+ public DataConfiguration(final Configuration configuration)
{
this.configuration = configuration;
dataConversionHandler = new DataConversionHandler();
@@ -148,19 +148,19 @@ public class DataConfiguration extends A
}
@Override
- protected Object getPropertyInternal(String key)
+ protected Object getPropertyInternal(final String key)
{
return configuration.getProperty(key);
}
@Override
- protected void addPropertyInternal(String key, Object obj)
+ protected void addPropertyInternal(final String key, final Object obj)
{
configuration.addProperty(key, obj);
}
@Override
- protected void addPropertyDirect(String key, Object value)
+ protected void addPropertyDirect(final String key, final Object value)
{
if (configuration instanceof AbstractConfiguration)
{
@@ -179,19 +179,19 @@ public class DataConfiguration extends A
}
@Override
- protected boolean containsKeyInternal(String key)
+ protected boolean containsKeyInternal(final String key)
{
return configuration.containsKey(key);
}
@Override
- protected void clearPropertyDirect(String key)
+ protected void clearPropertyDirect(final String key)
{
configuration.clearProperty(key);
}
@Override
- protected void setPropertyInternal(String key, Object value)
+ protected void setPropertyInternal(final String key, final Object value)
{
configuration.setProperty(key, value);
}
@@ -213,7 +213,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of booleans.
*/
- public List<Boolean> getBooleanList(String key)
+ public List<Boolean> getBooleanList(final String key)
{
return getBooleanList(key, new ArrayList<Boolean>());
}
@@ -230,7 +230,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of booleans.
*/
- public List<Boolean> getBooleanList(String key, List<Boolean> defaultValue)
+ public List<Boolean> getBooleanList(final String key, final List<Boolean> defaultValue)
{
return getList(Boolean.class, key, defaultValue);
}
@@ -246,7 +246,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of booleans.
*/
- public boolean[] getBooleanArray(String key)
+ public boolean[] getBooleanArray(final String key)
{
return (boolean[]) getArray(Boolean.TYPE, key);
}
@@ -263,7 +263,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of booleans.
*/
- public boolean[] getBooleanArray(String key, boolean[] defaultValue)
+ public boolean[] getBooleanArray(final String key, final boolean[] defaultValue)
{
return get(boolean[].class, key, defaultValue);
}
@@ -278,7 +278,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of bytes.
*/
- public List<Byte> getByteList(String key)
+ public List<Byte> getByteList(final String key)
{
return getByteList(key, new ArrayList<Byte>());
}
@@ -295,7 +295,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of bytes.
*/
- public List<Byte> getByteList(String key, List<Byte> defaultValue)
+ public List<Byte> getByteList(final String key, final List<Byte> defaultValue)
{
return getList(Byte.class, key, defaultValue);
}
@@ -311,7 +311,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of bytes.
*/
- public byte[] getByteArray(String key)
+ public byte[] getByteArray(final String key)
{
return getByteArray(key, new byte[0]);
}
@@ -328,7 +328,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of bytes.
*/
- public byte[] getByteArray(String key, byte[] defaultValue)
+ public byte[] getByteArray(final String key, final byte[] defaultValue)
{
return get(byte[].class, key, defaultValue);
}
@@ -343,7 +343,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of shorts.
*/
- public List<Short> getShortList(String key)
+ public List<Short> getShortList(final String key)
{
return getShortList(key, new ArrayList<Short>());
}
@@ -360,7 +360,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of shorts.
*/
- public List<Short> getShortList(String key, List<Short> defaultValue)
+ public List<Short> getShortList(final String key, final List<Short> defaultValue)
{
return getList(Short.class, key, defaultValue);
}
@@ -376,7 +376,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of shorts.
*/
- public short[] getShortArray(String key)
+ public short[] getShortArray(final String key)
{
return getShortArray(key, new short[0]);
}
@@ -393,7 +393,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of shorts.
*/
- public short[] getShortArray(String key, short[] defaultValue)
+ public short[] getShortArray(final String key, final short[] defaultValue)
{
return get(short[].class, key, defaultValue);
}
@@ -409,7 +409,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of integers.
*/
- public List<Integer> getIntegerList(String key)
+ public List<Integer> getIntegerList(final String key)
{
return getIntegerList(key, new ArrayList<Integer>());
}
@@ -426,7 +426,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of integers.
*/
- public List<Integer> getIntegerList(String key, List<Integer> defaultValue)
+ public List<Integer> getIntegerList(final String key, final List<Integer> defaultValue)
{
return getList(Integer.class, key, defaultValue);
}
@@ -442,7 +442,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of integers.
*/
- public int[] getIntArray(String key)
+ public int[] getIntArray(final String key)
{
return getIntArray(key, new int[0]);
}
@@ -459,7 +459,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of integers.
*/
- public int[] getIntArray(String key, int[] defaultValue)
+ public int[] getIntArray(final String key, final int[] defaultValue)
{
return get(int[].class, key, defaultValue);
}
@@ -474,7 +474,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of longs.
*/
- public List<Long> getLongList(String key)
+ public List<Long> getLongList(final String key)
{
return getLongList(key, new ArrayList<Long>());
}
@@ -491,7 +491,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of longs.
*/
- public List<Long> getLongList(String key, List<Long> defaultValue)
+ public List<Long> getLongList(final String key, final List<Long> defaultValue)
{
return getList(Long.class, key, defaultValue);
}
@@ -507,7 +507,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of longs.
*/
- public long[] getLongArray(String key)
+ public long[] getLongArray(final String key)
{
return getLongArray(key, new long[0]);
}
@@ -524,7 +524,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of longs.
*/
- public long[] getLongArray(String key, long[] defaultValue)
+ public long[] getLongArray(final String key, final long[] defaultValue)
{
return get(long[].class, key, defaultValue);
}
@@ -539,7 +539,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of floats.
*/
- public List<Float> getFloatList(String key)
+ public List<Float> getFloatList(final String key)
{
return getFloatList(key, new ArrayList<Float>());
}
@@ -556,7 +556,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of floats.
*/
- public List<Float> getFloatList(String key, List<Float> defaultValue)
+ public List<Float> getFloatList(final String key, final List<Float> defaultValue)
{
return getList(Float.class, key, defaultValue);
}
@@ -572,7 +572,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of floats.
*/
- public float[] getFloatArray(String key)
+ public float[] getFloatArray(final String key)
{
return getFloatArray(key, new float[0]);
}
@@ -589,7 +589,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of floats.
*/
- public float[] getFloatArray(String key, float[] defaultValue)
+ public float[] getFloatArray(final String key, final float[] defaultValue)
{
return get(float[].class, key, defaultValue);
}
@@ -605,7 +605,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of doubles.
*/
- public List<Double> getDoubleList(String key)
+ public List<Double> getDoubleList(final String key)
{
return getDoubleList(key, new ArrayList<Double>());
}
@@ -622,7 +622,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of doubles.
*/
- public List<Double> getDoubleList(String key, List<Double> defaultValue)
+ public List<Double> getDoubleList(final String key, final List<Double> defaultValue)
{
return getList(Double.class, key, defaultValue);
}
@@ -638,7 +638,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of doubles.
*/
- public double[] getDoubleArray(String key)
+ public double[] getDoubleArray(final String key)
{
return getDoubleArray(key, new double[0]);
}
@@ -655,7 +655,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of doubles.
*/
- public double[] getDoubleArray(String key, double[] defaultValue)
+ public double[] getDoubleArray(final String key, final double[] defaultValue)
{
return get(double[].class, key, defaultValue);
}
@@ -670,7 +670,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigIntegers.
*/
- public List<BigInteger> getBigIntegerList(String key)
+ public List<BigInteger> getBigIntegerList(final String key)
{
return getBigIntegerList(key, new ArrayList<BigInteger>());
}
@@ -687,7 +687,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigIntegers.
*/
- public List<BigInteger> getBigIntegerList(String key, List<BigInteger> defaultValue)
+ public List<BigInteger> getBigIntegerList(final String key, final List<BigInteger> defaultValue)
{
return getList(BigInteger.class, key, defaultValue);
}
@@ -703,7 +703,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigIntegers.
*/
- public BigInteger[] getBigIntegerArray(String key)
+ public BigInteger[] getBigIntegerArray(final String key)
{
return getBigIntegerArray(key, new BigInteger[0]);
}
@@ -720,7 +720,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigIntegers.
*/
- public BigInteger[] getBigIntegerArray(String key, BigInteger[] defaultValue)
+ public BigInteger[] getBigIntegerArray(final String key, final BigInteger[] defaultValue)
{
return get(BigInteger[].class, key, defaultValue);
}
@@ -735,7 +735,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigDecimals.
*/
- public List<BigDecimal> getBigDecimalList(String key)
+ public List<BigDecimal> getBigDecimalList(final String key)
{
return getBigDecimalList(key, new ArrayList<BigDecimal>());
}
@@ -752,7 +752,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigDecimals.
*/
- public List<BigDecimal> getBigDecimalList(String key, List<BigDecimal> defaultValue)
+ public List<BigDecimal> getBigDecimalList(final String key, final List<BigDecimal> defaultValue)
{
return getList(BigDecimal.class, key, defaultValue);
}
@@ -768,7 +768,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigDecimals.
*/
- public BigDecimal[] getBigDecimalArray(String key)
+ public BigDecimal[] getBigDecimalArray(final String key)
{
return getBigDecimalArray(key, new BigDecimal[0]);
}
@@ -785,7 +785,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of BigDecimals.
*/
- public BigDecimal[] getBigDecimalArray(String key, BigDecimal[] defaultValue)
+ public BigDecimal[] getBigDecimalArray(final String key, final BigDecimal[] defaultValue)
{
return get(BigDecimal[].class, key, defaultValue);
}
@@ -799,7 +799,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not an URI.
*/
- public URI getURI(String key)
+ public URI getURI(final String key)
{
return get(URI.class, key);
}
@@ -816,7 +816,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not an URI.
*/
- public URI getURI(String key, URI defaultValue)
+ public URI getURI(final String key, final URI defaultValue)
{
return get(URI.class, key, defaultValue);
}
@@ -831,7 +831,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URIs.
*/
- public URI[] getURIArray(String key)
+ public URI[] getURIArray(final String key)
{
return getURIArray(key, new URI[0]);
}
@@ -847,7 +847,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URIs.
*/
- public URI[] getURIArray(String key, URI[] defaultValue)
+ public URI[] getURIArray(final String key, final URI[] defaultValue)
{
return get(URI[].class, key, defaultValue);
}
@@ -862,7 +862,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URIs.
*/
- public List<URI> getURIList(String key)
+ public List<URI> getURIList(final String key)
{
return getURIList(key, new ArrayList<URI>());
}
@@ -879,7 +879,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URIs.
*/
- public List<URI> getURIList(String key, List<URI> defaultValue)
+ public List<URI> getURIList(final String key, final List<URI> defaultValue)
{
return getList(URI.class, key, defaultValue);
}
@@ -893,7 +893,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not an URL.
*/
- public URL getURL(String key)
+ public URL getURL(final String key)
{
return get(URL.class, key);
}
@@ -910,7 +910,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not an URL.
*/
- public URL getURL(String key, URL defaultValue)
+ public URL getURL(final String key, final URL defaultValue)
{
return get(URL.class, key, defaultValue);
}
@@ -925,7 +925,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URLs.
*/
- public List<URL> getURLList(String key)
+ public List<URL> getURLList(final String key)
{
return getURLList(key, new ArrayList<URL>());
}
@@ -942,7 +942,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URLs.
*/
- public List<URL> getURLList(String key, List<URL> defaultValue)
+ public List<URL> getURLList(final String key, final List<URL> defaultValue)
{
return getList(URL.class, key, defaultValue);
}
@@ -957,7 +957,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URLs.
*/
- public URL[] getURLArray(String key)
+ public URL[] getURLArray(final String key)
{
return getURLArray(key, new URL[0]);
}
@@ -973,7 +973,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of URLs.
*/
- public URL[] getURLArray(String key, URL[] defaultValue)
+ public URL[] getURLArray(final String key, final URL[] defaultValue)
{
return get(URL[].class, key, defaultValue);
}
@@ -990,7 +990,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Date.
*/
- public Date getDate(String key)
+ public Date getDate(final String key)
{
return get(Date.class, key);
}
@@ -1006,9 +1006,9 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Date.
*/
- public Date getDate(String key, String format)
+ public Date getDate(final String key, final String format)
{
- Date value = getDate(key, null, format);
+ final Date value = getDate(key, null, format);
if (value != null)
{
return value;
@@ -1037,7 +1037,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Date.
*/
- public Date getDate(String key, Date defaultValue)
+ public Date getDate(final String key, final Date defaultValue)
{
return getDate(key, defaultValue, null);
}
@@ -1056,7 +1056,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Date.
*/
- public Date getDate(String key, Date defaultValue, String format)
+ public Date getDate(final String key, final Date defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1069,7 +1069,7 @@ public class DataConfiguration extends A
}
}
- public List<Date> getDateList(String key)
+ public List<Date> getDateList(final String key)
{
return getDateList(key, new ArrayList<Date>());
}
@@ -1087,7 +1087,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public List<Date> getDateList(String key, String format)
+ public List<Date> getDateList(final String key, final String format)
{
return getDateList(key, new ArrayList<Date>(), format);
}
@@ -1107,7 +1107,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public List<Date> getDateList(String key, List<Date> defaultValue)
+ public List<Date> getDateList(final String key, final List<Date> defaultValue)
{
return getDateList(key, defaultValue, null);
}
@@ -1126,7 +1126,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public List<Date> getDateList(String key, List<Date> defaultValue, String format)
+ public List<Date> getDateList(final String key, final List<Date> defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1152,7 +1152,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public Date[] getDateArray(String key)
+ public Date[] getDateArray(final String key)
{
return getDateArray(key, new Date[0]);
}
@@ -1170,7 +1170,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public Date[] getDateArray(String key, String format)
+ public Date[] getDateArray(final String key, final String format)
{
return getDateArray(key, new Date[0], format);
}
@@ -1189,7 +1189,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public Date[] getDateArray(String key, Date[] defaultValue)
+ public Date[] getDateArray(final String key, final Date[] defaultValue)
{
return getDateArray(key, defaultValue, null);
}
@@ -1208,7 +1208,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Dates.
*/
- public Date[] getDateArray(String key, Date[] defaultValue, String format)
+ public Date[] getDateArray(final String key, final Date[] defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1233,7 +1233,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Calendar.
*/
- public Calendar getCalendar(String key)
+ public Calendar getCalendar(final String key)
{
return get(Calendar.class, key);
}
@@ -1250,9 +1250,9 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Calendar.
*/
- public Calendar getCalendar(String key, String format)
+ public Calendar getCalendar(final String key, final String format)
{
- Calendar value = getCalendar(key, null, format);
+ final Calendar value = getCalendar(key, null, format);
if (value != null)
{
return value;
@@ -1281,7 +1281,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Calendar.
*/
- public Calendar getCalendar(String key, Calendar defaultValue)
+ public Calendar getCalendar(final String key, final Calendar defaultValue)
{
return getCalendar(key, defaultValue, null);
}
@@ -1300,7 +1300,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Calendar.
*/
- public Calendar getCalendar(String key, Calendar defaultValue, String format)
+ public Calendar getCalendar(final String key, final Calendar defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1326,7 +1326,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public List<Calendar> getCalendarList(String key)
+ public List<Calendar> getCalendarList(final String key)
{
return getCalendarList(key, new ArrayList<Calendar>());
}
@@ -1344,7 +1344,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public List<Calendar> getCalendarList(String key, String format)
+ public List<Calendar> getCalendarList(final String key, final String format)
{
return getCalendarList(key, new ArrayList<Calendar>(), format);
}
@@ -1364,7 +1364,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public List<Calendar> getCalendarList(String key, List<Calendar> defaultValue)
+ public List<Calendar> getCalendarList(final String key, final List<Calendar> defaultValue)
{
return getCalendarList(key, defaultValue, null);
}
@@ -1383,7 +1383,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public List<Calendar> getCalendarList(String key, List<Calendar> defaultValue, String format)
+ public List<Calendar> getCalendarList(final String key, final List<Calendar> defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1409,7 +1409,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public Calendar[] getCalendarArray(String key)
+ public Calendar[] getCalendarArray(final String key)
{
return getCalendarArray(key, new Calendar[0]);
}
@@ -1427,7 +1427,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public Calendar[] getCalendarArray(String key, String format)
+ public Calendar[] getCalendarArray(final String key, final String format)
{
return getCalendarArray(key, new Calendar[0], format);
}
@@ -1446,7 +1446,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public Calendar[] getCalendarArray(String key, Calendar[] defaultValue)
+ public Calendar[] getCalendarArray(final String key, final Calendar[] defaultValue)
{
return getCalendarArray(key, defaultValue, null);
}
@@ -1465,7 +1465,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Calendars.
*/
- public Calendar[] getCalendarArray(String key, Calendar[] defaultValue, String format)
+ public Calendar[] getCalendarArray(final String key, final Calendar[] defaultValue, final String format)
{
TEMP_DATE_FORMAT.set(format);
try
@@ -1498,7 +1498,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Locale.
*/
- public Locale getLocale(String key)
+ public Locale getLocale(final String key)
{
return get(Locale.class, key);
}
@@ -1515,7 +1515,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Locale.
*/
- public Locale getLocale(String key, Locale defaultValue)
+ public Locale getLocale(final String key, final Locale defaultValue)
{
return get(Locale.class, key, defaultValue);
}
@@ -1530,7 +1530,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Locales.
*/
- public List<Locale> getLocaleList(String key)
+ public List<Locale> getLocaleList(final String key)
{
return getLocaleList(key, new ArrayList<Locale>());
}
@@ -1547,7 +1547,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Locales.
*/
- public List<Locale> getLocaleList(String key, List<Locale> defaultValue)
+ public List<Locale> getLocaleList(final String key, final List<Locale> defaultValue)
{
return getList(Locale.class, key, defaultValue);
}
@@ -1563,7 +1563,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Locales.
*/
- public Locale[] getLocaleArray(String key)
+ public Locale[] getLocaleArray(final String key)
{
return getLocaleArray(key, new Locale[0]);
}
@@ -1580,7 +1580,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Locales.
*/
- public Locale[] getLocaleArray(String key, Locale[] defaultValue)
+ public Locale[] getLocaleArray(final String key, final Locale[] defaultValue)
{
return get(Locale[].class, key, defaultValue);
}
@@ -1594,7 +1594,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Color.
*/
- public Color getColor(String key)
+ public Color getColor(final String key)
{
return get(Color.class, key);
}
@@ -1611,7 +1611,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a Color.
*/
- public Color getColor(String key, Color defaultValue)
+ public Color getColor(final String key, final Color defaultValue)
{
return get(Color.class, key, defaultValue);
}
@@ -1626,7 +1626,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Colors.
*/
- public List<Color> getColorList(String key)
+ public List<Color> getColorList(final String key)
{
return getColorList(key, new ArrayList<Color>());
}
@@ -1643,7 +1643,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Colors.
*/
- public List<Color> getColorList(String key, List<Color> defaultValue)
+ public List<Color> getColorList(final String key, final List<Color> defaultValue)
{
return getList(Color.class, key, defaultValue);
}
@@ -1659,7 +1659,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Colors.
*/
- public Color[] getColorArray(String key)
+ public Color[] getColorArray(final String key)
{
return getColorArray(key, new Color[0]);
}
@@ -1676,7 +1676,7 @@ public class DataConfiguration extends A
* @throws ConversionException is thrown if the key maps to an
* object that is not a list of Colors.
*/
- public Color[] getColorArray(String key, Color[] defaultValue)
+ public Color[] getColorArray(final String key, final Color[] defaultValue)
{
return get(Color[].class, key, defaultValue);
}
@@ -1689,7 +1689,7 @@ public class DataConfiguration extends A
*/
private DefaultConversionHandler getOriginalConversionHandler()
{
- ConversionHandler handler = super.getConversionHandler();
+ final ConversionHandler handler = super.getConversionHandler();
return (DefaultConversionHandler) ((handler instanceof DefaultConversionHandler) ? handler
: null);
}
@@ -1726,7 +1726,7 @@ public class DataConfiguration extends A
return getDefaultDateFormat();
}
- DefaultConversionHandler orgHandler =
+ final DefaultConversionHandler orgHandler =
getOriginalConversionHandler();
return (orgHandler != null) ? orgHandler.getDateFormat() : null;
}
Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java?rev=1842194&r1=1842193&r2=1842194&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/DatabaseConfiguration.java Thu Sep 27 22:24:23 2018
@@ -181,7 +181,7 @@ public class DatabaseConfiguration exten
*
* @param dataSource the {@code DataSource}
*/
- public void setDataSource(DataSource dataSource)
+ public void setDataSource(final DataSource dataSource)
{
this.dataSource = dataSource;
}
@@ -201,7 +201,7 @@ public class DatabaseConfiguration exten
*
* @param table the table name
*/
- public void setTable(String table)
+ public void setTable(final String table)
{
this.table = table;
}
@@ -222,7 +222,7 @@ public class DatabaseConfiguration exten
* @param configurationNameColumn the name of the column with the
* configuration name
*/
- public void setConfigurationNameColumn(String configurationNameColumn)
+ public void setConfigurationNameColumn(final String configurationNameColumn)
{
this.configurationNameColumn = configurationNameColumn;
}
@@ -242,7 +242,7 @@ public class DatabaseConfiguration exten
*
* @param keyColumn the name of the key column
*/
- public void setKeyColumn(String keyColumn)
+ public void setKeyColumn(final String keyColumn)
{
this.keyColumn = keyColumn;
}
@@ -262,7 +262,7 @@ public class DatabaseConfiguration exten
*
* @param valueColumn the name of the value column
*/
- public void setValueColumn(String valueColumn)
+ public void setValueColumn(final String valueColumn)
{
this.valueColumn = valueColumn;
}
@@ -282,7 +282,7 @@ public class DatabaseConfiguration exten
*
* @param configurationName the name of this configuration
*/
- public void setConfigurationName(String configurationName)
+ public void setConfigurationName(final String configurationName)
{
this.configurationName = configurationName;
}
@@ -304,7 +304,7 @@ public class DatabaseConfiguration exten
*
* @param autoCommit the auto commit flag
*/
- public void setAutoCommit(boolean autoCommit)
+ public void setAutoCommit(final boolean autoCommit)
{
this.autoCommit = autoCommit;
}
@@ -322,23 +322,23 @@ public class DatabaseConfiguration exten
@Override
protected Object getPropertyInternal(final String key)
{
- JdbcOperation<Object> op =
+ final JdbcOperation<Object> op =
new JdbcOperation<Object>(ConfigurationErrorEvent.READ,
ConfigurationErrorEvent.READ, key, null)
{
@Override
protected Object performOperation() throws SQLException
{
- ResultSet rs =
+ final ResultSet rs =
openResultSet(String.format(SQL_GET_PROPERTY,
table, keyColumn), true, key);
- List<Object> results = new ArrayList<>();
+ final List<Object> results = new ArrayList<>();
while (rs.next())
{
- Object value = extractPropertyValue(rs);
+ final Object value = extractPropertyValue(rs);
// Split value if it contains the list delimiter
- for (Object o : getListDelimiterHandler().parse(value))
+ for (final Object o : getListDelimiterHandler().parse(value))
{
results.add(o);
}
@@ -375,7 +375,7 @@ public class DatabaseConfiguration exten
@Override
protected Void performOperation() throws SQLException
{
- StringBuilder query = new StringBuilder("INSERT INTO ");
+ final StringBuilder query = new StringBuilder("INSERT INTO ");
query.append(table).append(" (");
query.append(keyColumn).append(", ");
query.append(valueColumn);
@@ -390,7 +390,7 @@ public class DatabaseConfiguration exten
}
query.append(")");
- PreparedStatement pstmt = initStatement(query.toString(),
+ final PreparedStatement pstmt = initStatement(query.toString(),
false, key, String.valueOf(obj));
if (configurationNameColumn != null)
{
@@ -417,9 +417,9 @@ public class DatabaseConfiguration exten
* @param value the value to be added
*/
@Override
- protected void addPropertyInternal(String key, Object value)
+ protected void addPropertyInternal(final String key, final Object value)
{
- ListDelimiterHandler oldHandler = getListDelimiterHandler();
+ final ListDelimiterHandler oldHandler = getListDelimiterHandler();
try
{
// temporarily disable delimiter parsing
@@ -443,21 +443,21 @@ public class DatabaseConfiguration exten
@Override
protected boolean isEmptyInternal()
{
- JdbcOperation<Integer> op =
+ final JdbcOperation<Integer> op =
new JdbcOperation<Integer>(ConfigurationErrorEvent.READ,
ConfigurationErrorEvent.READ, null, null)
{
@Override
protected Integer performOperation() throws SQLException
{
- ResultSet rs = openResultSet(String.format(
+ final ResultSet rs = openResultSet(String.format(
SQL_IS_EMPTY, table), true);
return rs.next() ? Integer.valueOf(rs.getInt(1)) : null;
}
};
- Integer count = op.execute();
+ final Integer count = op.execute();
return count == null || count.intValue() == 0;
}
@@ -474,21 +474,21 @@ public class DatabaseConfiguration exten
@Override
protected boolean containsKeyInternal(final String key)
{
- JdbcOperation<Boolean> op =
+ final JdbcOperation<Boolean> op =
new JdbcOperation<Boolean>(ConfigurationErrorEvent.READ,
ConfigurationErrorEvent.READ, key, null)
{
@Override
protected Boolean performOperation() throws SQLException
{
- ResultSet rs = openResultSet(
+ final ResultSet rs = openResultSet(
String.format(SQL_GET_PROPERTY, table, keyColumn), true, key);
return rs.next();
}
};
- Boolean result = op.execute();
+ final Boolean result = op.execute();
return result != null && result.booleanValue();
}
@@ -510,7 +510,7 @@ public class DatabaseConfiguration exten
@Override
protected Void performOperation() throws SQLException
{
- PreparedStatement ps = initStatement(String.format(
+ final PreparedStatement ps = initStatement(String.format(
SQL_CLEAR_PROPERTY, table, keyColumn), true, key);
ps.executeUpdate();
return null;
@@ -563,7 +563,7 @@ public class DatabaseConfiguration exten
@Override
protected Collection<String> performOperation() throws SQLException
{
- ResultSet rs = openResultSet(String.format(
+ final ResultSet rs = openResultSet(String.format(
SQL_GET_KEYS, keyColumn, table), true);
while (rs.next())
@@ -597,7 +597,7 @@ public class DatabaseConfiguration exten
* @param stmt The statement to close
* @param rs the result set to close
*/
- protected void close(Connection conn, Statement stmt, ResultSet rs)
+ protected void close(final Connection conn, final Statement stmt, final ResultSet rs)
{
try
{
@@ -606,7 +606,7 @@ public class DatabaseConfiguration exten
rs.close();
}
}
- catch (SQLException e)
+ catch (final SQLException e)
{
getLogger().error("An error occurred on closing the result set", e);
}
@@ -618,7 +618,7 @@ public class DatabaseConfiguration exten
stmt.close();
}
}
- catch (SQLException e)
+ catch (final SQLException e)
{
getLogger().error("An error occured on closing the statement", e);
}
@@ -630,7 +630,7 @@ public class DatabaseConfiguration exten
conn.close();
}
}
- catch (SQLException e)
+ catch (final SQLException e)
{
getLogger().error("An error occured on closing the connection", e);
}
@@ -648,7 +648,7 @@ public class DatabaseConfiguration exten
* @return the value of the property column
* @throws SQLException if an error occurs
*/
- protected Object extractPropertyValue(ResultSet rs) throws SQLException
+ protected Object extractPropertyValue(final ResultSet rs) throws SQLException
{
Object value = rs.getObject(valueColumn);
if (value instanceof Clob)
@@ -665,9 +665,9 @@ public class DatabaseConfiguration exten
* @return the extracted string value
* @throws SQLException if an error occurs
*/
- private static Object convertClob(Clob clob) throws SQLException
+ private static Object convertClob(final Clob clob) throws SQLException
{
- int len = (int) clob.length();
+ final int len = (int) clob.length();
return (len > 0) ? clob.getSubString(1, len) : StringUtils.EMPTY;
}
@@ -711,8 +711,8 @@ public class DatabaseConfiguration exten
* @param errPropVal the property value for the error event
*/
protected JdbcOperation(
- EventType<? extends ConfigurationErrorEvent> errEvType,
- EventType<?> opType, String errPropName, Object errPropVal)
+ final EventType<? extends ConfigurationErrorEvent> errEvType,
+ final EventType<?> opType, final String errPropName, final Object errPropVal)
{
errorEventType = errEvType;
operationEventType = opType;
@@ -743,7 +743,7 @@ public class DatabaseConfiguration exten
conn.commit();
}
}
- catch (SQLException e)
+ catch (final SQLException e)
{
fireError(errorEventType, operationEventType, errorPropertyName,
errorPropertyValue, e);
@@ -777,13 +777,13 @@ public class DatabaseConfiguration exten
* @return the prepared statement object
* @throws SQLException if an SQL error occurs
*/
- protected PreparedStatement createStatement(String sql, boolean nameCol)
+ protected PreparedStatement createStatement(final String sql, final boolean nameCol)
throws SQLException
{
String statement;
if (nameCol && configurationNameColumn != null)
{
- StringBuilder buf = new StringBuilder(sql);
+ final StringBuilder buf = new StringBuilder(sql);
buf.append(" AND ").append(configurationNameColumn).append("=?");
statement = buf.toString();
}
@@ -809,13 +809,13 @@ public class DatabaseConfiguration exten
* @return the initialized statement object
* @throws SQLException if an SQL error occurs
*/
- protected PreparedStatement initStatement(String sql, boolean nameCol,
- Object... params) throws SQLException
+ protected PreparedStatement initStatement(final String sql, final boolean nameCol,
+ final Object... params) throws SQLException
{
- PreparedStatement ps = createStatement(sql, nameCol);
+ final PreparedStatement ps = createStatement(sql, nameCol);
int idx = 1;
- for (Object param : params)
+ for (final Object param : params)
{
ps.setObject(idx++, param);
}
@@ -838,8 +838,8 @@ public class DatabaseConfiguration exten
* @return the {@code ResultSet} produced by the query
* @throws SQLException if an SQL error occurs
*/
- protected ResultSet openResultSet(String sql, boolean nameCol,
- Object... params) throws SQLException
+ protected ResultSet openResultSet(final String sql, final boolean nameCol,
+ final Object... params) throws SQLException
{
resultSet = initStatement(sql, nameCol, params).executeQuery();
return resultSet;