Author: deki
Date: Sun May 8 17:48:34 2016
New Revision: 1742846
URL: http://svn.apache.org/viewvc?rev=1742846&view=rev
Log:
[CONFIGURATION-624] fixed checkstyle violations, updated to latest version of
checkstyle-maven-plugin, ensure correct checkstyle configuration is applied in
all cases
Added:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/package-info.java
Modified:
commons/proper/configuration/trunk/conf/checkstyle.xml
commons/proper/configuration/trunk/pom.xml
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/AbstractHierarchicalConfiguration.java
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/ConfigPropertySource.java
Modified: commons/proper/configuration/trunk/conf/checkstyle.xml
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/conf/checkstyle.xml?rev=1742846&r1=1742845&r2=1742846&view=diff
==============================================================================
--- commons/proper/configuration/trunk/conf/checkstyle.xml (original)
+++ commons/proper/configuration/trunk/conf/checkstyle.xml Sun May 8 17:48:34
2016
@@ -124,7 +124,9 @@
<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder"/>
- <module name="RedundantModifier"/>
+ <module name="RedundantModifier">
+ <property name="tokens" value="METHOD_DEF, VARIABLE_DEF,
ANNOTATION_FIELD_DEF, INTERFACE_DEF, CLASS_DEF, ENUM_DEF"/>
+ </module>
<!-- Checks for blocks. You know, those {}'s -->
@@ -148,9 +150,6 @@
<module name="MagicNumber">
<property name="ignoreNumbers" value="-1,0,1,2,3"/>
</module>
- <module name="RedundantThrows">
- <property name="allowUnchecked" value="true"/>
- </module>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
Modified: commons/proper/configuration/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/pom.xml?rev=1742846&r1=1742845&r2=1742846&view=diff
==============================================================================
--- commons/proper/configuration/trunk/pom.xml (original)
+++ commons/proper/configuration/trunk/pom.xml Sun May 8 17:48:34 2016
@@ -509,6 +509,22 @@
</ignorePathsToDelete>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <configuration>
+ <configLocation>${basedir}/conf/checkstyle.xml</configLocation>
+
<suppressionsLocation>${basedir}/conf/checkstyle-suppressions.xml</suppressionsLocation>
+ <enableRulesSummary>false</enableRulesSummary>
+ <propertyExpansion>basedir=${basedir}</propertyExpansion>
+ <includeResources>false</includeResources>
+ <includeTestResources>false</includeTestResources>
+ <sourceDirectories>
+
<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ </sourceDirectories>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -568,6 +584,17 @@
</execution>
</executions>
</plugin> -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
@@ -634,15 +661,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.12.1</version>
- <configuration>
- <configLocation>${basedir}/conf/checkstyle.xml</configLocation>
-
<suppressionsLocation>${basedir}/conf/checkstyle-suppressions.xml</suppressionsLocation>
- <enableRulesSummary>false</enableRulesSummary>
- <propertyExpansion>basedir=${basedir}</propertyExpansion>
- <includeResources>false</includeResources>
- <includeTestResources>false</includeTestResources>
- </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>checkstyle</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
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=1742846&r1=1742845&r2=1742846&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
Sun May 8 17:48:34 2016
@@ -841,6 +841,7 @@ public abstract class AbstractHierarchic
* "Defined" in this terms means that the node or at least one of
* its sub nodes is associated with a value.
*
+ * @param <T> the type of the nodes managed by this hierarchical
configuration
*/
private static class DefinedVisitor<T> extends
ConfigurationNodeVisitorAdapter<T>
Modified:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/ConfigPropertySource.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/ConfigPropertySource.java?rev=1742846&r1=1742845&r2=1742846&view=diff
==============================================================================
---
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/ConfigPropertySource.java
(original)
+++
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/ConfigPropertySource.java
Sun May 8 17:48:34 2016
@@ -27,28 +27,34 @@ import org.springframework.core.env.Enum
/**
* Allow use of Apache Commons Configuration Objects as Spring PropertySources
*/
-public class ConfigPropertySource extends
EnumerablePropertySource<Configuration> {
+public class ConfigPropertySource extends
EnumerablePropertySource<Configuration>
+{
- public ConfigPropertySource(String name, Configuration source) {
+ public ConfigPropertySource(String name, Configuration source)
+ {
super(name, source);
}
- protected ConfigPropertySource(String name) {
+ protected ConfigPropertySource(String name)
+ {
super(name);
}
@Override
- public String[] getPropertyNames() {
+ public String[] getPropertyNames()
+ {
final List<String> keys = new ArrayList<String>();
final Iterator<String> keysIterator = source.getKeys();
- while (keysIterator.hasNext()) {
+ while (keysIterator.hasNext())
+ {
keys.add(keysIterator.next());
}
return keys.toArray(new String[keys.size()]);
}
@Override
- public Object getProperty(String name) {
+ public Object getProperty(String name)
+ {
return source.getProperty(name);
}
}
Added:
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/package-info.java
URL:
http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/package-info.java?rev=1742846&view=auto
==============================================================================
---
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/package-info.java
(added)
+++
commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration2/spring/package-info.java
Sun May 8 17:48:34 2016
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * <p>
+ * A package containing integrations for the Spring Framework.
+ * </p>
+ *
+ * @version $Id: package-info.java $
+ */
+package org.apache.commons.configuration2.spring;