You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by eb...@apache.org on 2008/02/23 11:30:50 UTC
svn commit: r630420 - in
/commons/proper/configuration/branches/configuration2_experimental: ./
src/main/java/org/apache/commons/configuration2/
Author: ebourg
Date: Sat Feb 23 02:30:49 2008
New Revision: 630420
URL: http://svn.apache.org/viewvc?rev=630420&view=rev
Log:
Configured the Maven 2 PMD plugin
Fixed some PMD warnings
Modified:
commons/proper/configuration/branches/configuration2_experimental/pom.xml
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java
Modified: commons/proper/configuration/branches/configuration2_experimental/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/pom.xml?rev=630420&r1=630419&r2=630420&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/pom.xml (original)
+++ commons/proper/configuration/branches/configuration2_experimental/pom.xml Sat Feb 23 02:30:49 2008
@@ -366,6 +366,17 @@
<configLocation>conf/checkstyle.xml</configLocation>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>1.5</targetJdk>
+ <excludes>
+ <exclude>**/*PropertyListParser*</exclude>
+ <exclude>**/*TokenMgrError*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java?rev=630420&r1=630419&r2=630420&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java (original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/AbstractFileConfiguration.java Sat Feb 23 02:30:49 2008
@@ -948,16 +948,13 @@
*/
private void createPath(File file)
{
- if (file != null)
+ if (file != null && !file.exists())
{
// create the path to the file if the file doesn't exist
- if (!file.exists())
+ File parent = file.getParentFile();
+ if (parent != null && !parent.exists())
{
- File parent = file.getParentFile();
- if (parent != null && !parent.exists())
- {
- parent.mkdirs();
- }
+ parent.mkdirs();
}
}
}
Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java?rev=630420&r1=630419&r2=630420&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java (original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/PrefixedKeysIterator.java Sat Feb 23 02:30:49 2008
@@ -82,12 +82,9 @@
*/
public String next()
{
- if (!nextElementSet)
+ if (!nextElementSet && !setNextElement())
{
- if (!setNextElement())
- {
- throw new NoSuchElementException();
- }
+ throw new NoSuchElementException();
}
nextElementSet = false;
return nextElement;
Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java?rev=630420&r1=630419&r2=630420&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java (original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/SubsetConfiguration.java Sat Feb 23 02:30:49 2008
@@ -210,12 +210,6 @@
}
}
- @Override
- protected String interpolate(String base)
- {
- return super.interpolate(base);
- }
-
/**
* {@inheritDoc}
*