commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r1799980 - in /commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2: ./ builder/ ex/ tree/
Date Mon, 26 Jun 2017 20:21:17 GMT
Author: oheger
Date: Mon Jun 26 20:21:16 2017
New Revision: 1799980

URL: http://svn.apache.org/viewvc?rev=1799980&view=rev
Log:
Fixes for checkstyle issues.

Thanks to Allon Mureinik (mureinik at gmail dot com) for the
patch.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLListReference.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
Mon Jun 26 20:21:16 2017
@@ -973,9 +973,10 @@ public abstract class AbstractHierarchic
             }
         }
     }
-    
+
     @Override
-    public String toString() {
+    public String toString()
+    {
         return super.toString() + "(" + getRootElementNameInternal() + ")";
     }
 }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/JSONConfiguration.java
Mon Jun 26 20:21:16 2017
@@ -40,7 +40,15 @@ import java.util.Map;
 public class JSONConfiguration extends AbstractYAMLBasedConfiguration
         implements FileBasedConfiguration, InputStreamSupport
 {
+
+    /**
+     * The object mapper used by the {@code JSONConfiguration}.
+     */
     private final ObjectMapper mapper = new ObjectMapper();
+
+    /**
+     * The {@code MapType} used to convert types.
+     */
     private final MapType type = mapper.getTypeFactory()
             .constructMapType(Map.class, String.class, Object.class);
 

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLConfiguration.java
Mon Jun 26 20:21:16 2017
@@ -1166,7 +1166,7 @@ public class XMLConfiguration extends Ba
                 ImmutableNode sibling1, ImmutableNode sibling2,
                 ReferenceNodeHandler refHandler)
         {
-            if(XMLListReference.isListNode(newNode, refHandler))
+            if (XMLListReference.isListNode(newNode, refHandler))
             {
                 return;
             }
@@ -1207,9 +1207,9 @@ public class XMLConfiguration extends Ba
         protected void update(ImmutableNode node, Object reference,
                 ReferenceNodeHandler refHandler)
         {
-            if(XMLListReference.isListNode(node, refHandler))
+            if (XMLListReference.isListNode(node, refHandler))
             {
-                if(XMLListReference.isFirstListItem(node, refHandler))
+                if (XMLListReference.isFirstListItem(node, refHandler))
                 {
                     String value = XMLListReference.listValue(node, refHandler, listDelimiterHandler);
                     updateElement(node, refHandler, value);
@@ -1308,7 +1308,7 @@ public class XMLConfiguration extends Ba
                         ((XMLDocumentHelper) reference).getDocument()
                                 .getDocumentElement();
             }
-            else if(reference instanceof XMLListReference)
+            else if (reference instanceof XMLListReference)
             {
                 element = ((XMLListReference) reference).getElement();
             }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLListReference.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLListReference.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLListReference.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/XMLListReference.java
Mon Jun 26 20:21:16 2017
@@ -42,7 +42,7 @@ import java.util.Map;
  * that the original format can be restored when the configuration is saved.
  * </p>
  */
-class XMLListReference
+final class XMLListReference
 {
     /** The wrapped XML element. */
     private final Element element;

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/builder/INIBuilderParametersImpl.java
Mon Jun 26 20:21:16 2017
@@ -39,7 +39,7 @@ public class INIBuilderParametersImpl ex
 {
     /** The key for the separatorUsedInINIOutput property. */
     private static final String PROP_SEPARATOR_USED_IN_INI_OUTPUT
-    	= "separatorUsedInOutput";
+        = "separatorUsedInOutput";
 
     @Override
     public void inheritFrom(Map<String, ?> source)
@@ -48,9 +48,10 @@ public class INIBuilderParametersImpl ex
         copyPropertiesFrom(source, PROP_SEPARATOR_USED_IN_INI_OUTPUT);
     }
 
-	@Override
-	public INIBuilderParametersImpl setSeparatorUsedInOutput(String separator) {
-		storeProperty(PROP_SEPARATOR_USED_IN_INI_OUTPUT, separator);
-		return this;
-	}
+    @Override
+    public INIBuilderParametersImpl setSeparatorUsedInOutput(String separator)
+    {
+        storeProperty(PROP_SEPARATOR_USED_IN_INI_OUTPUT, separator);
+        return this;
+    }
 }

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/ex/ConfigurationRuntimeException.java
Mon Jun 26 20:21:16 2017
@@ -65,7 +65,7 @@ public class ConfigurationRuntimeExcepti
     {
         super(String.format(message, args));
     }
-    
+
     /**
      * Constructs a new {@code ConfigurationRuntimeException} with
      * specified nested {@code Throwable}.

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java?rev=1799980&r1=1799979&r2=1799980&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
(original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/tree/ImmutableNode.java
Mon Jun 26 20:21:16 2017
@@ -103,7 +103,7 @@ public final class ImmutableNode
 
     /**
      * Returns a list with the children of this node.
-     * 
+     *
      * @param name the node name to find
      *
      * @return a list with the child nodes
@@ -111,10 +111,11 @@ public final class ImmutableNode
     public List<ImmutableNode> getChildren(final String name)
     {
         final List<ImmutableNode> list = new ArrayList<>();
-        if (name == null) {
+        if (name == null)
+        {
             return list;
         }
-        for (final ImmutableNode node : children) 
+        for (final ImmutableNode node : children)
         {
             if (name.equals(node.getNodeName()))
             {
@@ -663,7 +664,7 @@ public final class ImmutableNode
     }
 
     @Override
-    public String toString() 
+    public String toString()
     {
         return super.toString() + "(" + nodeName + ")";
     }



Mime
View raw message