You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mb...@apache.org on 2015/12/15 01:58:07 UTC
svn commit: r1720056 - in /commons/proper/weaver/trunk: ant/
build-tools/src/main/resources/org/apache/commons/weaver/ maven-plugin/
modules/normalizer/
modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/
modules/privilizer/api/ modu...
Author: mbenson
Date: Tue Dec 15 00:58:06 2015
New Revision: 1720056
URL: http://svn.apache.org/viewvc?rev=1720056&view=rev
Log:
pmd
Modified:
commons/proper/weaver/trunk/ant/pom.xml
commons/proper/weaver/trunk/build-tools/src/main/resources/org/apache/commons/weaver/pmd.xml
commons/proper/weaver/trunk/maven-plugin/pom.xml
commons/proper/weaver/trunk/modules/normalizer/pom.xml
commons/proper/weaver/trunk/modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/Normalizer.java
commons/proper/weaver/trunk/modules/privilizer/api/pom.xml
commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml
commons/proper/weaver/trunk/parent/pom.xml
commons/proper/weaver/trunk/processor/pom.xml
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/CleanProcessor.java
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/Finder.java
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/AnnotatedElements.java
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/Weavable.java
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Annotations.java
commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Args.java
Modified: commons/proper/weaver/trunk/ant/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/ant/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/ant/pom.xml (original)
+++ commons/proper/weaver/trunk/ant/pom.xml Tue Dec 15 00:58:06 2015
@@ -162,6 +162,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/build-tools/src/main/resources/org/apache/commons/weaver/pmd.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/build-tools/src/main/resources/org/apache/commons/weaver/pmd.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/build-tools/src/main/resources/org/apache/commons/weaver/pmd.xml (original)
+++ commons/proper/weaver/trunk/build-tools/src/main/resources/org/apache/commons/weaver/pmd.xml Tue Dec 15 00:58:06 2015
@@ -60,7 +60,9 @@ limitations under the License.
</rule>
<rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
<properties>
- <property name="exceptionList" value="unchecked,rawtypes" />
+ <!-- suppress on @SuppressWarnings: -->
+ <property name="violationSuppressXPath"
+ value="//Literal[ancestor::Annotation/*/Name[@Image='SuppressWarnings']]" />
</properties>
</rule>
Modified: commons/proper/weaver/trunk/maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/maven-plugin/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/maven-plugin/pom.xml (original)
+++ commons/proper/weaver/trunk/maven-plugin/pom.xml Tue Dec 15 00:58:06 2015
@@ -133,6 +133,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/modules/normalizer/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/normalizer/pom.xml Tue Dec 15 00:58:06 2015
@@ -270,6 +270,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/Normalizer.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/Normalizer.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/Normalizer.java (original)
+++ commons/proper/weaver/trunk/modules/normalizer/src/main/java/org/apache/commons/weaver/normalizer/Normalizer.java Tue Dec 15 00:58:06 2015
@@ -108,6 +108,7 @@ public class Normalizer {
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public void visit(final int version, final int access, final String name, final String signature,
final String superName, final String[] interfaces) {
super.visit(version, access, name, signature, superName, interfaces);
@@ -132,6 +133,7 @@ public class Normalizer {
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public MethodVisitor visitMethod(final int access, final String name, final String desc,
final String signature, final String[] exceptions) {
return INIT.equals(name) ? new InspectConstructor() : null;
@@ -194,6 +196,7 @@ public class Normalizer {
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public MethodVisitor visitMethod(final int access, final String name, final String desc,
final String signature, final String[] exceptions) {
final MethodVisitor toWrap = super.visitMethod(access, name, desc, signature, exceptions);
@@ -268,6 +271,7 @@ public class Normalizer {
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public void visit(final int version, final int access, final String name, final String signature,
final String superName, final String[] intrfces) {
super.visit(version, access, name, signature, superName, intrfces);
@@ -556,6 +560,7 @@ public class Normalizer {
Type supertype;
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public void visit(final int version, final int access, final String name, final String signature,
final String superName, final String[] interfaces) {
supertype = Type.getObjectType(superName);
@@ -565,6 +570,7 @@ public class Normalizer {
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") //overridden method
public MethodVisitor visitMethod(final int access, final String name, final String desc,
final String signature, final String[] exceptions) {
if (INIT.equals(name)) {
@@ -629,6 +635,7 @@ public class Normalizer {
* @return {@link Type}[]
* @see Type#getObjectType(String)
*/
+ @SuppressWarnings("PMD.UseVarargs") //varargs not needed here
private static Type[] toObjectTypes(final String[] types) {
if (types == null) {
return null;
Modified: commons/proper/weaver/trunk/modules/privilizer/api/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/api/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/api/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/privilizer/api/pom.xml Tue Dec 15 00:58:06 2015
@@ -66,6 +66,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml (original)
+++ commons/proper/weaver/trunk/modules/privilizer/weaver/pom.xml Tue Dec 15 00:58:06 2015
@@ -230,6 +230,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/parent/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/parent/pom.xml (original)
+++ commons/proper/weaver/trunk/parent/pom.xml Tue Dec 15 00:58:06 2015
@@ -363,9 +363,6 @@ under the License.
</executions>
<configuration>
<source>${maven.compiler.source}</source>
- <additionalJOptions>
- <additionalJOption>-Xdoclint:none</additionalJOption>
- </additionalJOptions>
</configuration>
</plugin>
<plugin>
@@ -496,6 +493,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
@@ -515,6 +513,24 @@ under the License.
</plugins>
</build>
</profile>
+ <profile>
+ <id>java8</id>
+ <activation>
+ <jdk>[1.8,2.0)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <additionalJOptions>
+ <additionalJOption>-Xdoclint:none</additionalJOption>
+ </additionalJOptions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
-
</project>
Modified: commons/proper/weaver/trunk/processor/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/pom.xml?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/pom.xml (original)
+++ commons/proper/weaver/trunk/processor/pom.xml Tue Dec 15 00:58:06 2015
@@ -75,6 +75,7 @@ under the License.
<rulesets>
<ruleset>/org/apache/commons/weaver/pmd.xml</ruleset>
</rulesets>
+ <skipEmptyReport>false</skipEmptyReport>
</configuration>
</plugin>
<plugin>
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/CleanProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/CleanProcessor.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/CleanProcessor.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/CleanProcessor.java Tue Dec 15 00:58:06 2015
@@ -32,7 +32,6 @@ import java.util.logging.Logger;
import org.apache.commons.lang3.Validate;
import org.apache.commons.weaver.model.WeaveEnvironment;
import org.apache.commons.weaver.spi.Cleaner;
-import org.apache.commons.weaver.spi.Weaver;
import org.apache.commons.weaver.utils.URLArray;
import org.apache.xbean.finder.archive.FileArchive;
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/Finder.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/Finder.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/Finder.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/Finder.java Tue Dec 15 00:58:06 2015
@@ -237,6 +237,7 @@ class Finder extends AnnotationFinder im
}
@Override
+ @SuppressWarnings("PMD.UseVarargs") // overridden method
public MethodVisitor visitMethod(final int access, final String name, final String desc,
final String signature, final String[] exceptions) {
final MethodVisitor toWrap = wrapped.visitMethod(access, name, desc, signature, exceptions);
@@ -317,6 +318,7 @@ class Finder extends AnnotationFinder im
this(target, classfileAnnotations.toArray(new Annotation[classfileAnnotations.size()]));
}
+ @SuppressWarnings("PMD.UseVarargs") // varargs not necessary here
IncludesClassfile(final T target, final Annotation[] classfileAnnotations) {
super();
this.target = target;
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/AnnotatedElements.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/AnnotatedElements.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/AnnotatedElements.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/AnnotatedElements.java Tue Dec 15 00:58:06 2015
@@ -19,7 +19,7 @@
package org.apache.commons.weaver.model;
import java.lang.annotation.Annotation;
-import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.RetentionPolicy; //NOPMD used in javadoc
import java.lang.reflect.AnnotatedElement;
/**
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/Weavable.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/Weavable.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/Weavable.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/model/Weavable.java Tue Dec 15 00:58:06 2015
@@ -19,7 +19,7 @@
package org.apache.commons.weaver.model;
import java.lang.annotation.Annotation;
-import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.RetentionPolicy; //NOPMD used in javadoc
import java.lang.reflect.AnnotatedElement;
import java.util.Arrays;
import java.util.LinkedHashSet;
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Annotations.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Annotations.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Annotations.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Annotations.java Tue Dec 15 00:58:06 2015
@@ -47,6 +47,7 @@ public final class Annotations {
final InvocationHandler invocationHandler = new InvocationHandler() {
@Override
+ @SuppressWarnings("PMD.UseVarargs") // overridden method
public Object invoke(final Object proxy, final Method method, final Object[] args) throws Throwable {
if (method.getDeclaringClass().equals(annotationType)) {
if (elements.containsKey(method.getName())) {
Modified: commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Args.java
URL: http://svn.apache.org/viewvc/commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Args.java?rev=1720056&r1=1720055&r2=1720056&view=diff
==============================================================================
--- commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Args.java (original)
+++ commons/proper/weaver/trunk/processor/src/main/java/org/apache/commons/weaver/utils/Args.java Tue Dec 15 00:58:06 2015
@@ -35,6 +35,7 @@ public final class Args {
* rhs
* @return {@code int} as specified by {@link java.util.Comparator#compare(Object, Object)}
*/
+ @SuppressWarnings("PMD.UseVarargs") // not needed for comparing one array to another
public static int compare(final Class<?>[] paramTypes1, final Class<?>[] paramTypes2) {
for (int param = 0; param < paramTypes1.length; param++) {
if (param >= paramTypes2.length) {