From 3efe93295cd6562c2e80f690044ccb94c7ddf06c Mon Sep 17 00:00:00 2001
From: Romain Pelisse
Date: Mon, 19 Sep 2011 17:42:21 +0000
Subject: [PATCH] update 4.3.x branch with lastest modification from 4.2.x
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.3.x@7292 51baf565-9d33-0410-a72c-fc3788e3496d
---
pmd/bin/build.xml | 3 +-
pmd/docs.sh | 3 +-
pmd/etc/changelog.txt | 2 +-
pmd/etc/doing_the_next_pmd_release.txt | 13 ++---
pmd/etc/release.sh | 6 +-
pmd/etc/update_version.sh | 1 -
pmd/pmd-jdk14-pom.xml | 2 +-
pmd/pom.xml | 2 +-
pmd/project.xml | 3 +-
pmd/src/net/sourceforge/pmd/PMD.java | 2 +-
.../sourceforge/pmd/dfa/SequenceChecker.java | 2 +-
.../pmd/rules/MoreThanOneLogger.java | 4 +-
.../pmd/typeresolution/ClassTypeResolver.java | 5 +-
pmd/src/site/xdoc/index.xml | 56 +++++++++----------
pmd/xdocs/navigation.xml | 6 +-
15 files changed, 55 insertions(+), 55 deletions(-)
diff --git a/pmd/bin/build.xml b/pmd/bin/build.xml
index f78911642b..06c476392a 100644
--- a/pmd/bin/build.xml
+++ b/pmd/bin/build.xml
@@ -162,7 +162,8 @@
-
+
+
diff --git a/pmd/docs.sh b/pmd/docs.sh
index ed7607a63b..3986129d1f 100644
--- a/pmd/docs.sh
+++ b/pmd/docs.sh
@@ -51,12 +51,11 @@ elif [ $option = "upload" ]; then
echo "Generating and uploading maven artifacts"
ssh $USER,pmd@shell.sf.net create
mvn -q source:jar javadoc:jar deploy
- mvn -q deploy:deploy-file -Durl=scp://shell.sourceforge.net/home/groups/p/pm/pmd/htdocs/maven2 -DrepositoryId=pmd-repo -Dfile=java14/lib/pmd14-4.2.6.jar -DpomFile=pmd-jdk14-pom.xml
echo "Uploading xdocs"
DOCS_FILE=docs.tar.gz
cp xdocs/cpdresults.txt xdocs/cpp_cpdresults.txt target/docs/
cd target/docs
- rsync -a -e ssh * $USER,pmd@web.sourceforge.net:/home/groups/p/pm/pmd/htdocs
+ rsync -aRvz -e ssh * "${USER}@web.sourceforge.net:/home/project-web/pmd/htdocs"
cd ../..
fi
if [ -e velocity.log ]; then
diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt
index 038b076352..d10514a149 100644
--- a/pmd/etc/changelog.txt
+++ b/pmd/etc/changelog.txt
@@ -1,4 +1,4 @@
-???? - 4.2.6:
+September 14, 2011 - 4.2.6:
Fixed bug 2920057 - False + : CloseRessource whith an external getter
Fixed bug 1808110 - Fixed performance issue on PreserveStackTrace
Fixed bug 2832322 - cpd.xml file tag path attribute should be entity-encoded
diff --git a/pmd/etc/doing_the_next_pmd_release.txt b/pmd/etc/doing_the_next_pmd_release.txt
index 999f6e3aff..6c9eb62592 100644
--- a/pmd/etc/doing_the_next_pmd_release.txt
+++ b/pmd/etc/doing_the_next_pmd_release.txt
@@ -24,7 +24,7 @@ ensure all the new rules are listed in a rulesets/releases/.xml file
ant -f bin/build.xml pmdOnPmd
-ant -f bin/build.xml clean regress test
+ant -f bin/build.xml clean regress
Check in everything
ant -f bin/build.xml dist regress regress14
@@ -37,7 +37,8 @@ TESTS: Can you
2) run the Ant 'pmd' task and get a report
ant -f bin/build.xml pmd
-run "./generate_release.sh " in etc
+cd into etc/ and run the release script:
+$ ./release.sh
It will run:
@@ -46,14 +47,12 @@ It will run:
generate the binary zip file
- svn tag if "yes" is pressed
+ tag svn (unless -s if used)
generate the source zip file
-if you see a bug and fix it, you can delete the release using:
-svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_
-and then retag it
-
+Note: if you see a bug and fix it, you can delete the release using (and the retag it):
+$ svn delete https://pmd.svn.sourceforge.net/svnroot/pmd/tags/pmd/pmd_release_
Go to Admin, File Releases, Add release
Paste stuff into the changelog/readme boxes
diff --git a/pmd/etc/release.sh b/pmd/etc/release.sh
index 634c58f556..b981136f00 100644
--- a/pmd/etc/release.sh
+++ b/pmd/etc/release.sh
@@ -1,7 +1,7 @@
#!/bin/bash
usage() {
- echo "$(basename ${0}) [-v version-number] [-d] [-s]"
+ echo "$(basename ${0}) [-v version-number] [-d] [-s] [-S]"
echo ""
echo "-v override the release's version number provided in pom.xml"
echo "-d no docs generation"
@@ -26,8 +26,8 @@ make_tree_structure() {
local root_dir="${1}"
mkdir -p "${root_dir}/etc"
- mkdir "${root_dir}/bin"
- mkdir "${root_dir}/lib"
+ mkdir -p "${root_dir}/bin"
+ mkdir -p "${root_dir}/lib"
}
while getopts v:dsh OPT; do
diff --git a/pmd/etc/update_version.sh b/pmd/etc/update_version.sh
index 2141111f41..10f0f11595 100644
--- a/pmd/etc/update_version.sh
+++ b/pmd/etc/update_version.sh
@@ -54,7 +54,6 @@ update_regexp "pmd14-[0-9\.]*.jar" "pmd14-$1.jar" docs.sh
update_jar $1 etc/cpd.jnlp
update_jar $1 xdocs/running.xml
update_jar $1 xdocs/integrations.xml
-update_jar $1 etc/bug_closer.txt
update_dir $1 xdocs/compiling.xml
update_dir $1 xdocs/integrations.xml
diff --git a/pmd/pmd-jdk14-pom.xml b/pmd/pmd-jdk14-pom.xml
index dd13caba45..d7c05a0bc7 100644
--- a/pmd/pmd-jdk14-pom.xml
+++ b/pmd/pmd-jdk14-pom.xml
@@ -4,7 +4,7 @@
pmd
pmd-jdk14
PMD
- 4.2.6-SNAPSHOT
+ 4.2.6
PMD scans Java source code and looks for potential problems like:
diff --git a/pmd/pom.xml b/pmd/pom.xml
index b18070f00c..a523cb1b82 100644
--- a/pmd/pom.xml
+++ b/pmd/pom.xml
@@ -4,7 +4,7 @@
pmd
pmd
PMD
- 4.2.6-SNAPSHOT
+ 4.2.6
PMD scans Java source code and looks for potential problems like:
diff --git a/pmd/project.xml b/pmd/project.xml
index 08cae3e345..36af5cc222 100644
--- a/pmd/project.xml
+++ b/pmd/project.xml
@@ -4,7 +4,7 @@
3
pmd
PMD
- 4.2.6-SNAPSHOT
+ 4.2.6
InfoEther
http://pmd.sourceforge.net/
@@ -28,6 +28,7 @@
Recent releases
+- 2011-09-14 PMD 4.2.6: bug fixes, new rules ()
- 2009-02-08 PMD 4.2.5: bug fixes, new rule, new Android ruleset (Changelog)
- 2008-10-12 PMD 4.2.4: bug fixes (Changelog)
- 2008-08-31 PMD 4.2.3: yet more bug fixes (Changelog)
diff --git a/pmd/src/net/sourceforge/pmd/PMD.java b/pmd/src/net/sourceforge/pmd/PMD.java
index 89551e5f0b..69bc189901 100644
--- a/pmd/src/net/sourceforge/pmd/PMD.java
+++ b/pmd/src/net/sourceforge/pmd/PMD.java
@@ -48,7 +48,7 @@ import net.sourceforge.pmd.util.FileFinder;
public class PMD {
public static final String EOL = System.getProperty("line.separator", "\n");
- public static final String VERSION = "4.2.6-SNAPSHOT";
+ public static final String VERSION = "4.2.6";
public static final String EXCLUDE_MARKER = "NOPMD";
private static final Logger LOG = Logger.getLogger(PMD.class.getName());
diff --git a/pmd/src/net/sourceforge/pmd/dfa/SequenceChecker.java b/pmd/src/net/sourceforge/pmd/dfa/SequenceChecker.java
index ccfd2d4c1c..7035845a21 100644
--- a/pmd/src/net/sourceforge/pmd/dfa/SequenceChecker.java
+++ b/pmd/src/net/sourceforge/pmd/dfa/SequenceChecker.java
@@ -29,7 +29,7 @@ public class SequenceChecker {
public static final int ROOT = -1;
private List nextSteps = new ArrayList();
- private int type;
+ private int type; //NOPMD type is used, but PMD seems to no be able to spot it
private boolean lastStep;
diff --git a/pmd/src/net/sourceforge/pmd/rules/MoreThanOneLogger.java b/pmd/src/net/sourceforge/pmd/rules/MoreThanOneLogger.java
index 2551752238..3e3c25c9c8 100644
--- a/pmd/src/net/sourceforge/pmd/rules/MoreThanOneLogger.java
+++ b/pmd/src/net/sourceforge/pmd/rules/MoreThanOneLogger.java
@@ -23,12 +23,12 @@ public class MoreThanOneLogger extends AbstractRule {
static {
try {
log4jLogger = Class.forName("org.apache.log4j.Logger");
- } catch (Throwable t) {
+ } catch (Throwable t) { //NOPMD somewhat legitmate catch all
log4jLogger = null;
}
try {
javaLogger = Class.forName("java.util.logging.Logger");
- } catch (Throwable t) {
+ } catch (Throwable t) { //NOPMD somewhat legitmate catch all
javaLogger = null;
}
}
diff --git a/pmd/src/net/sourceforge/pmd/typeresolution/ClassTypeResolver.java b/pmd/src/net/sourceforge/pmd/typeresolution/ClassTypeResolver.java
index 410195302c..8be74dc06e 100644
--- a/pmd/src/net/sourceforge/pmd/typeresolution/ClassTypeResolver.java
+++ b/pmd/src/net/sourceforge/pmd/typeresolution/ClassTypeResolver.java
@@ -616,8 +616,9 @@ public class ClassTypeResolver extends JavaParserVisitorAdapter {
private Class> processOnDemand(String qualifiedName) {
for (String entry : importedOnDemand) {
try {
- return pmdClassLoader.loadClass(entry + "." + qualifiedName);
- } catch (Throwable e) {
+ return pmdClassLoader.loadClass(entry + "." + qualifiedName);
+ } catch (Throwable e) { //NOPMD
+
}
}
return null;
diff --git a/pmd/src/site/xdoc/index.xml b/pmd/src/site/xdoc/index.xml
index 6468bd7bd7..fa806bc5a0 100644
--- a/pmd/src/site/xdoc/index.xml
+++ b/pmd/src/site/xdoc/index.xml
@@ -1,30 +1,28 @@
-
-
-
- Welcome to PMD
- Jeff Jensen
-
-
-
- PMD scans Java source code and looks for potential problems like:
-
- - Possible bugs - empty try/catch/finally/switch statements
- - Dead code - unused local variables, parameters and private methods
- - Suboptimal code - wasteful String/StringBuffer usage
- - Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
- - Duplicate code - copied/pasted code means copied/pasted bugs
-
-
- Download
- You can download everything from here, and you can get an overview of all the rules at the rulesets index page.
-
- Integrations
- PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.
-
- BlueJ
- Welcome BlueJ users! Notes on installing the PMD extension for BlueJ are here.
-
-
-
+
+
+
+ Welcome to PMD
+ Jeff Jensen
+
+
+
+ PMD scans Java source code and looks for potential problems like:
+
+ - Possible bugs - empty try/catch/finally/switch statements
+ - Dead code - unused local variables, parameters and private methods
+ - Suboptimal code - wasteful String/StringBuffer usage
+ - Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
+ - Duplicate code - copied/pasted code means copied/pasted bugs
+
-
+ Download
+ You can download everything from here, and you can get an overview of all the rules at the rulesets index page.
+
+ Integrations
+ PMD is integrated with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.
+
+ BlueJ
+ Welcome BlueJ users! Notes on installing the PMD extension for BlueJ are here.
+
+
+
diff --git a/pmd/xdocs/navigation.xml b/pmd/xdocs/navigation.xml
index 426fa4bd10..1ab1236d09 100644
--- a/pmd/xdocs/navigation.xml
+++ b/pmd/xdocs/navigation.xml
@@ -13,8 +13,10 @@
href="http://sourceforge.net" />