소스 검색

add: #sneaky wrapper for checked functions

remove deprecated projects: rules & rules.test
Ranides Atterwim 4 년 전
부모
커밋
c692b5d892

+ 7 - 0
assira.core/src/main/java/net/ranides/assira/functional/checked/CheckedConsumer.java

@@ -9,6 +9,9 @@ package net.ranides.assira.functional.checked;
 
 import net.ranides.assira.trace.ExceptionUtils;
 
+import java.util.function.Consumer;
+import java.util.function.Function;
+
 /**
  *
  * @author Ranides Atterwim {@literal <ranides@gmail.com>}
@@ -25,4 +28,8 @@ public interface CheckedConsumer<T,E extends Exception> {
         }
     }
 
+    static  <T, E extends Exception> Consumer<T> sneaky(CheckedConsumer<T, E> consumer) {
+        return consumer::$accept;
+    }
+
 }

+ 7 - 0
assira.core/src/main/java/net/ranides/assira/functional/checked/CheckedFunction.java

@@ -9,6 +9,8 @@ package net.ranides.assira.functional.checked;
 
 import net.ranides.assira.trace.ExceptionUtils;
 
+import java.util.function.Function;
+
 /**
  *
  * @author Ranides Atterwim {@literal <ranides@gmail.com>}
@@ -24,4 +26,9 @@ public interface CheckedFunction<T,R,E extends Exception> {
             throw ExceptionUtils.rethrow(cause);
         }
     }
+
+    static  <T, R, E extends Exception> Function<T,R> sneaky(CheckedFunction<T, R, E> function) {
+        return function::$apply;
+    }
+
 }

+ 6 - 0
assira.core/src/main/java/net/ranides/assira/functional/checked/CheckedRunnable.java

@@ -9,6 +9,8 @@ package net.ranides.assira.functional.checked;
 
 import net.ranides.assira.trace.ExceptionUtils;
 
+import java.util.function.Supplier;
+
 /**
  *
  * @author Ranides Atterwim {@literal <ranides@gmail.com>}
@@ -25,4 +27,8 @@ public interface CheckedRunnable<E extends Exception> {
         }
     }
 
+    static  <E extends Exception> Runnable sneaky(CheckedRunnable<E> runnable) {
+        return runnable::$run;
+    }
+
 }

+ 8 - 1
assira.core/src/main/java/net/ranides/assira/functional/checked/CheckedSupplier.java

@@ -9,6 +9,9 @@ package net.ranides.assira.functional.checked;
 
 import net.ranides.assira.trace.ExceptionUtils;
 
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
 /**
  *
  * @author Ranides Atterwim {@literal <ranides@gmail.com>}
@@ -24,5 +27,9 @@ public interface CheckedSupplier<T,E extends Exception> {
             throw ExceptionUtils.rethrow(cause);
         }
     }
-    
+
+    static  <T, E extends Exception> Supplier<T> sneaky(CheckedSupplier<T, E> supplier) {
+        return supplier::$get;
+    }
+
 }

+ 2 - 2
assira.core/src/test/java/net/ranides/assira/ContractTesters.java

@@ -25,9 +25,9 @@ public final class ContractTesters {
 
     public static final String VERSION = RuntimeUtils.getProperty("assira.version");
 
-    public static final File JAR_TEST = new File("../assira.test/target/assira.test-"+VERSION+".jar");
+    public static final File JAR_TEST = new File("src/test/resources/jars/assira.test.jar");
     
-    public static final File JAR_RULES = new File("../assira.rules/target/assira.rules-"+VERSION+".jar");
+    public static final File JAR_RULES = new File("src/test/resources/jars/assira.rules.jar");
     
     private static final class Li { // NOPMD - lazy init idiom
         

BIN
assira.core/src/test/resources/jars/assira.rules.jar


BIN
assira.core/src/test/resources/jars/assira.test.jar


+ 0 - 43
assira.rules.test/pom.xml

@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>net.ranides</groupId>
-        <artifactId>assira.project</artifactId>
-        <version>2.7.2-SNAPSHOT</version>
-    </parent>
-    
-    <artifactId>assira.rules.test</artifactId>
-    <packaging>jar</packaging>
-
-    <name>${project.groupId}:${project.artifactId}</name>
-    <description>assira: general purpose java library: test for PMD rules</description>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-pmd-plugin</artifactId>
-                <version>3.5</version>
-                <configuration>
-                    <rulesets>
-                        <ruleset>rulesets/java/assira.test.xml</ruleset>
-                    </rulesets>
-                </configuration>
-                <dependencies>
-                    <dependency>
-                        <groupId>net.ranides</groupId>
-                        <artifactId>assira.rules</artifactId>
-                        <version>${project.version}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-    </build>
-    <dependencies>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>annotations</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 57
assira.rules.test/src/main/java/net/ranides/assira/rules/test/CustomRules1.java

@@ -1,57 +0,0 @@
-/*
- *  @author Ranides Atterwim {@literal <ranides@gmail.com>}
- *  @copyright Ranides Atterwim
- *  @license WTFPL
- *  @url http://ranides.net/projects/assira.test
- */
-package net.ranides.assira.rules.test;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-/**
- * RULE: TEST-ECB (import from standard empty.xml/EmptyCatchBlock)
- * RULE: TEST-UF (our first custom class)
- * 
- * RULE: TEST-UP (assira.custom.xml/UnusedParameter)
- * 
- * @author Ranides Atterwim {@literal <ranides@gmail.com>}
- */
-@SuppressFBWarnings
-public class CustomRules1 { // Expected: TEST-UF
-    
-    // @todo (assira.rules #1) support for @Test and @TestContract
-    
-    // Niech reguły do junit wykrywają metody adnotowane za pomocą:
-    // @Test 
-    //      MethodNameRules aplikuje reguły nazw: testMyMethod_WithOptions (takie pseudo-c)
-    // @TestContract
-    //      MethodNameRules aplikuje reguły nazw j/w
-    //      wyłącza "JUnit4TestShouldUseTestAnnotation
-
-    
-    public void first() {
-        try {
-            if (true);
-
-            if (true) {
-            }
-
-            System.out.println("Hello world");
-        } catch (RuntimeException ex) { // Expected: TEST-ECB
-            
-        }
-    }
-    
-    
-    private void runme(
-        int hello, 
-        Object $world, 
-        int _x, 
-        int variable, // Expected: TEST-UP for "variable"
-        int a
-    ) {
-        // do nothing
-        int v = hello + a;
-    }
-
-}

+ 0 - 26
assira.rules/pom.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>net.ranides</groupId>
-        <artifactId>assira.project</artifactId>
-        <version>2.7.2-SNAPSHOT</version>
-    </parent>
-    
-    <artifactId>assira.rules</artifactId>
-    <packaging>jar</packaging>
-
-    <name>${project.groupId}:${project.artifactId}</name>
-    <description>assira: general purpose java library: PMD rules</description>
-
-    <dependencies>
-        <dependency>
-            <groupId>net.sourceforge.pmd</groupId>
-            <artifactId>pmd-java</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.google.code.findbugs</groupId>
-            <artifactId>annotations</artifactId>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 36
assira.rules/src/main/java/net/ranides/assira/rules/UFRule.java

@@ -1,36 +0,0 @@
-/*
- *  @author Ranides Atterwim {@literal <ranides@gmail.com>}
- *  @copyright Ranides Atterwim
- *  @license WTFPL
- *  @url http://ranides.net/projects/assira.rules
- */
-package net.ranides.assira.rules;
-
-import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
-import net.sourceforge.pmd.lang.java.ast.JavaNode;
-import net.sourceforge.pmd.lang.java.rule.AbstractStatisticalJavaRule;
-import net.sourceforge.pmd.stat.DataPoint;
-
-public class UFRule extends AbstractStatisticalJavaRule {
-
-    private final Class<?> nodeClass;
-
-    public UFRule() {
-        super();
-        this.nodeClass = ASTClassOrInterfaceDeclaration.class;
-    }
-
-    @Override
-    public Object visit(final JavaNode node, final Object data) {
-        if (nodeClass.isInstance(node)) {
-            final DataPoint point = new DataPoint();
-            point.setNode(node);
-            point.setScore(1.0 * (node.getEndLine() - node.getBeginLine()));
-            point.setMessage(getMessage() + " (V6)");
-            addDataPoint(point);
-        }
-
-        return node.childrenAccept(this, data);
-    }
-
-}

+ 0 - 94
assira.rules/src/main/java/net/ranides/assira/rules/UnusedParameterRule.java

@@ -1,94 +0,0 @@
-/**
- * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
- */
-package net.ranides.assira.rules;
-
-import java.io.InvalidObjectException;
-import java.io.ObjectInputStream;
-import java.util.List;
-import java.util.Map;
-import net.ranides.assira.rules.utils.ASTUtils;
-
-import net.sourceforge.pmd.lang.ast.Node;
-import net.sourceforge.pmd.lang.java.ast.ASTConstructorDeclaration;
-import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
-import net.sourceforge.pmd.lang.java.ast.JavaNode;
-import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;
-import net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence;
-import net.sourceforge.pmd.lang.java.symboltable.VariableNameDeclaration;
-import net.sourceforge.pmd.lang.rule.properties.BooleanProperty;
-import net.sourceforge.pmd.lang.symboltable.NameOccurrence;
-
-@SuppressWarnings("OverridableMethodCallInConstructor")
-public class UnusedParameterRule extends AbstractJavaRule {
-
-    private static final BooleanProperty CHECKALL_DESCRIPTOR = new BooleanProperty(
-        "checkAll", "Check all methods, including non-private ones", false, 1.0f
-    );
-
-    public UnusedParameterRule() {
-        definePropertyDescriptor(CHECKALL_DESCRIPTOR);
-    }
-
-    @Override
-    public Object visit(ASTConstructorDeclaration node, Object data) {
-        check(node, data);
-        return data;
-    }
-
-    @Override
-    public Object visit(ASTMethodDeclaration node, Object data) {
-        if (!node.isPrivate() && !getProperty(CHECKALL_DESCRIPTOR)) {
-            return data;
-        }
-        if (!node.isNative() && !node.isAbstract() && !isSerializationMethod(node)) {
-            check(node, data);
-        }
-        return data;
-    }
-
-    private boolean isSerializationMethod(ASTMethodDeclaration node) {
-        return node.isPrivate() 
-            && ASTUtils.isMethod(node, "readObject", ObjectInputStream.class)
-            && ASTUtils.throwsOne(node, InvalidObjectException.class);
-    }
-
-    private void check(Node node, Object data) {
-        Node parent = node.jjtGetParent().jjtGetParent().jjtGetParent();
-        if (!ASTUtils.isTypeClass(parent)) {
-            return;
-        }
-
-        Map<VariableNameDeclaration, List<NameOccurrence>> vars = 
-                ((JavaNode)node).getScope().getDeclarations(VariableNameDeclaration.class);
-        
-        for (Map.Entry<VariableNameDeclaration, List<NameOccurrence>> entry : vars.entrySet()) {
-            VariableNameDeclaration name = entry.getKey();
-            if( name.getImage().startsWith("$") || name.getImage().startsWith("_")) {
-                continue;
-            }
-            if (isActuallyUsed(name, entry.getValue())) {
-                continue;
-            }
-            addViolation(data, name.getNode(), new Object[] {
-                node instanceof ASTMethodDeclaration ? "method" : "constructor", 
-                name.getImage() 
-            });
-        }
-    }
-
-    private boolean isActuallyUsed(VariableNameDeclaration name, List<NameOccurrence> usages) {
-        for (NameOccurrence occ : usages) {
-            JavaNameOccurrence jocc = (JavaNameOccurrence) occ;
-            if (jocc.isOnLeftHandSide()) {
-                if (name.isArray() && jocc.getLocation().jjtGetParent().jjtGetParent().jjtGetNumChildren() > 1) {
-                    // array element access
-                    return true;
-                }
-            } else {
-                return true;
-            }
-        }
-        return false;
-    }
-}

+ 0 - 81
assira.rules/src/main/java/net/ranides/assira/rules/utils/ASTUtils.java

@@ -1,81 +0,0 @@
-/*
- * @author Ranides Atterwim {@literal <ranides@gmail.com>}
- * @copyright Ranides Atterwim
- * @license WTFPL
- * @url http://ranides.net/projects/assira.rules
- */
-package net.ranides.assira.rules.utils;
-
-import java.util.List;
-import net.sourceforge.pmd.lang.ast.Node;
-import net.sourceforge.pmd.lang.java.ast.ASTClassOrInterfaceDeclaration;
-import net.sourceforge.pmd.lang.java.ast.ASTFormalParameter;
-import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclaration;
-import net.sourceforge.pmd.lang.java.ast.ASTMethodDeclarator;
-import net.sourceforge.pmd.lang.java.ast.ASTName;
-import net.sourceforge.pmd.lang.java.ast.ASTNameList;
-import net.sourceforge.pmd.lang.java.ast.ASTType;
-
-/**
- *
- * @author Ranides Atterwim {@literal <ranides@gmail.com>}
- */
-public final class ASTUtils {
-    
-    // @todo (assira.rules #1) return array[0] should be allowed!
-    // napisać własną wersję, która wykrywa tablice odrobinę mądrzej
-    
-    private ASTUtils() {
-        /* utility class */
-    }
-    
-    public static boolean isType(ASTType type, Class<?> clazz) {
-        return type.getType() == clazz 
-            || clazz.getSimpleName().equals(type.getTypeImage())
-            || clazz.getName().equals(type.getTypeImage());
-    }
-    
-    public static boolean isType(ASTName type, Class<?> clazz) {
-        return type.getType() == clazz 
-            || clazz.getSimpleName().equals(type.getImage())
-            || clazz.getName().equals(type.getImage());
-    }
-    
-    public static boolean isTypeClass(Node type) {
-        return 
-            (type instanceof ASTClassOrInterfaceDeclaration)
-            && !((ASTClassOrInterfaceDeclaration) type).isInterface();
-    }
-    
-    public static boolean isMethod(ASTMethodDeclaration method, String name, Class<?>... params) {
-        if( !name.equals(method.getMethodName()) ) {
-            return false;
-        }
-        
-        List<ASTFormalParameter> iparams = getParams(method);
-        if(iparams.size() != params.length) {
-            return false;
-        }
-        for(int i=0; i<params.length; i++) {
-            ASTType type = iparams.get(i).getTypeNode();
-            if( !ASTUtils.isType(type, params[i]) ) {
-                return false;
-            }
-        }
-        return true;
-    }
-    
-    public static boolean throwsOne(ASTMethodDeclaration method, Class<? extends Throwable> exception) {
-        ASTNameList throwsList = method.getThrows();
-        if (throwsList != null && throwsList.jjtGetNumChildren() == 1) {
-            ASTName node = (ASTName)throwsList.jjtGetChild(0);
-            return isType(node, exception);
-        }
-        return false;
-    }
-    
-    public static List<ASTFormalParameter> getParams(ASTMethodDeclaration method) {
-        ASTMethodDeclarator declarator = method.getFirstDescendantOfType(ASTMethodDeclarator.class);
-        return declarator.findDescendantsOfType(ASTFormalParameter.class);
-    }
-}

+ 0 - 377
assira.rules/src/main/resources/rulesets/java/assira.custom.xml

@@ -1,377 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<ruleset name="net.ranides.assira.custom"
-    xmlns="http://pmd.sf.net/ruleset/1.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
-    <description>
-    Assira Quality Policy - custom rules
-    </description>
-
-    <rule
-        name="TooManyDifferentMethods"
-        since="4.3"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        message="This class has too many different methods, consider refactoring it."
-        externalInfoUrl="http://pmd.sourceforge.net/rules/codesize.html#TooManyMethods"
-        language="java"
-        >
-        <description><![CDATA[Counts unique methods (all overloaded versions are considered as the same). Ignores UtilityClassess.]]></description>
-        <priority>3</priority>
-        <properties>
-            <property name="maximum" type="Integer" description="The method count reporting threshold " min="1" max="1000" value="15"/>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[
-            
-                count(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration[
-                    MethodDeclaration
-                    and not(Annotation/MarkerAnnotation/Name[@Image='Override'])
-                    and not(starts-with(MethodDeclaration/@MethodName,'get'))
-                    and not(starts-with(MethodDeclaration/@MethodName,'set'))
-                    and not(
-                        MethodDeclaration/@MethodName
-                        =
-                        preceding-sibling::ClassOrInterfaceBodyDeclaration/MethodDeclaration/@MethodName
-                        )
-                ]) > $maximum
-            
-                and not (
-                    @Final='true'
-                    and
-                    ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Private='true'][@ParameterCount='0']
-                    and
-                    count(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration)=1
-                )
-            ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    
-    
-    <rule
-        name="TooManyPublicMethods"
-        since="4.3"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        message="This class has too many public methods, consider refactoring it."
-        externalInfoUrl="http://pmd.sourceforge.net/rules/codesize.html#TooManyMethods"
-        language="java"
-        >
-        <description><![CDATA[Counts public methods]]></description>
-        <priority>3</priority>
-        <properties>
-            <property name="maximum" type="Integer" description="The method count reporting threshold " min="1" max="1000" value="40"/>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[
-                count(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/MethodDeclaration[
-                    @Public='true'
-                    and not(starts-with(@MethodName,'get'))
-                    and not(starts-with(@MethodName,'set'))
-                    and not(../Annotation/MarkerAnnotation/Name[@Image='Override'])
-                ]) > $maximum
-            ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    
-<!--
-    <rule
-        name="ShortVar" 
-        since="2.0" 
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        message="Avoid variables with short names like {0}"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#ShortVariable"
-        language="java"
-        >
-        <description>
-            <![CDATA[Detects when a field, local, or parameter has a very short name.Ignores primitive types, local Iterators and for-variables.]]>
-        </description>
-        <priority>3</priority>
-        <properties><property name="xpath" pluginname="true"><value>
-            <![CDATA[
-            //VariableDeclaratorId [
-               string-length(@Image) < 3
-               and not(@Image='_')
-               and not(@Image='id')
-               and not(ancestor::ForInit)
-               and not(../Type/PrimitiveType)
-               and not(../../Type/PrimitiveType)
-               and not(
-                  (../../Type/ReferenceType/ClassOrInterfaceType[@Image='Iterator'])
-                  or
-                  (../../../FormalParameter)
-               )
-               and not(/TypeDeclaration/ClassOrInterfaceDeclaration[ends-with(@Image,'Test')])
-               and not((ancestor::FormalParameter) and (ancestor::TryStatement))
-               and not((@Image='em') and (../../Type/@TypeImage='EntityManager'))
-               and not((@Image='em') and (../Type/@TypeImage='EntityManager'))
-            ]
-            ]]>
-        </value></property></properties>
-    </rule>
--->    
-    <rule
-        name="LongVar"
-      	since="0.3"
-        message="Avoid excessively long variable names like {0}"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://pmd.sourceforge.net/rules/naming.html#LongVariable"
-        language="java"
-        >
-        <description>Detects when a field, formal or local variable is declared with a long name.</description>
-        <priority>3</priority>
-        <properties>
-            <property name="minimum" type="Integer" description="The variable length reporting threshold" min="1" max="1000" value="16"/>
-            <property name="xpath" pluginname="true"><value>
-            <![CDATA[
-                //VariableDeclaratorId[
-                    string-length(@Image) > $minimum
-                    and (@Static='false' or @Final='false')
-                ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-
-
-    <rule name="FieldNameRules" since="2.0" class="net.sourceforge.pmd.lang.rule.XPathRule"
-        message="Field name doesn't respect required pattern"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#VariableNamingRegexp"
-        language="java"
-    >
-        <description>Checks all field names against regular expression</description>
-        <priority>3</priority>
-        <properties><property name="xpath" pluginname="true"><value>
-            <![CDATA[
-            //FieldDeclaration[
-                not(matches(@VariableName,'^(m_|\$)?([a-z][a-zA-Z0-9]*)$'))
-                and( (@Static='false') or (@Final='false') )
-            ]
-            ]]>
-        </value></property></properties>
-    </rule>
-
-    <rule name="MethodNameRules" since="2.0" class="net.sourceforge.pmd.lang.rule.XPathRule"
-        message="Method name doesn't respect required pattern"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#VariableNamingRegexp"
-        language="java"
-    >
-        <description>Checks all methods names against regular expression</description>
-        <priority>3</priority>
-        <properties><property name="xpath" pluginname="true"><value>
-            <![CDATA[
-            //ClassOrInterfaceBodyDeclaration
-                [not(Annotation/MarkerAnnotation/Name[@Image='Test'])]
-                [not(Annotation/MarkerAnnotation/Name[@Image='InterfaceTest'])]
-            /MethodDeclaration/MethodDeclarator
-                [not(matches(@Image,'^(m_|\$)?([a-z][a-zA-Z0-9]*)$'))]
-            ]]>
-        </value></property></properties>
-    </rule>
-
-    <rule
-        name="InvalidUtilityClass"
-    	since="3.0"
-        message="Utility class does not provide any static methods, fields or interfaces"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#InvalidUtilityClass"
-        language="java"
-        >
-        <description>A class that has private constructors and does not have any static methods, fields or type declarations cannot be used.</description>
-        <priority>3</priority>
-        <properties><property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[@Nested='false'][
-                (
-                    count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration)>0
-                    and 
-                    count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration) = count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Private='true']) 
-                )
-                and count(.//MethodDeclaration[@Static='true'])=0
-                and count(.//FieldDeclaration[@Private='false'][@Static='true'])=0
-                and count(.//ClassOrInterfaceDeclaration[@Interface='true'])=0
-                and count(.//AnnotationTypeDeclaration)=0
-                and count(.//ClassOrInterfaceDeclaration[@Static='true' and @Private='false'])=0
-            ]
-            ]]>
-        </value></property></properties>
-    </rule>
-    
-    <rule
-        name="TooManyParams"
-    	since="3.0"
-        message="Avoid really long parameter lists."
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#TooManyParams"
-        language="java"
-        >
-        <description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.</description>
-        <priority>3</priority>
-        <properties>
-            <property name="maximum" type="Integer" description="The parameter count reporting threshold" min="1" max="1000" value="3"/>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceBodyDeclaration
-                [ MethodDeclaration/MethodDeclarator/FormalParameters[@ParameterCount>$maximum] ]
-                [ not(Annotation/MarkerAnnotation/Name[@Image='Override']) ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    
-    <rule
-        name="AvoidThreadGroup"
-        since="3.6"
-        message="Avoid using java.lang.ThreadGroup; it is not thread safe"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#AvoidThreadGroup"
-        language="java"
-        typeResolution="true"
-        >
-        <description>Avoid using java.lang.ThreadGroup; although it is intended to be used in a threaded environment it contains methods that are not thread safe.</description>
-        <priority>3</priority>
-        <properties>
-            <property name="xpath"><value>
-            <![CDATA[
-            //AllocationExpression/ClassOrInterfaceType
-                [ typeof(@Image, 'java.lang.ThreadGroup') and contains(@Image, 'ThreadGroup') ]
-            |
-            //PrimarySuffix[contains(@Image, 'getThreadGroup')]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    
-    <rule
-        name="UseSingleton"
-    	since="3.0"
-        message="All methods are static.  Consider using Singleton instead.  Alternatively, you could add a private constructor or make the class abstract to silence this warning."
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#UseSingleton"
-        language="java"
-        >
-        <description><![CDATA[If you have a class that has nothing but static methods, consider making it a Singleton. If you want this class to be a Singleton, remember to add a private constructor to prevent instantiation.]]></description>
-        <priority>3</priority>
-        <properties>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[
-                @Interface='false' and @Abstract='false'
-                and not(ExtendsList)
-                and not(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/MethodDeclaration[
-                    @Private!='true' and @Static='false'
-                ]) 
-                and not(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/FieldDeclaration[
-                    @Private!='true' and @Static='false'
-                ])
-                and not(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/MethodDeclaration[
-                    @MethodName='main' and
-                    @Static='true' and
-                    @Public='true' and
-                    @Void='true' and
-                    MethodDeclarator/FormalParameters[@ParameterCount=1] and
-                    MethodDeclarator/FormalParameters/FormalParameter/Type[@Array='true' and @TypeImage='String']
-                ])
-                and (
-                    @Final='false' or
-                    count(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration)!=1
-                    or not(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[
-                        @Private='true'
-                        and FormalParameters[@ParameterCount=0]
-                    ])
-                )
-            ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    
-    
-    <rule
-        name="TooManyFields"
-        since="4.3"
-        message="Too many fields"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#TooManyFields"
-        typeResolution="true"
-        language="java"
-        >
-        <description><![CDATA[Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information.  For example, a class with city/state/zip fields could instead have one Address field.]]></description>
-        <priority>3</priority>
-        <properties>
-            <property name="maximum" type="Integer" description="The field count reporting threshold " min="1" max="1000" value="15"/>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[
-                count(
-                    ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/FieldDeclaration
-                    [@Final='false']
-                    [@Static='false']
-                ) > $maximum
-            ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-
-    <rule name="UnusedParameter"
-              language="java"
-              since="5.3"
-              message="Avoid unused {0} parameters such as ''{1}''."
-              class="net.ranides.assira.rules.UnusedParameterRule"
-              externalInfoUrl="${pmd.website.baseurl}/rules/java/unusedcode.html#UnusedFormalParameter">
-        <description>
-            Avoid passing parameters to methods or constructors without actually referencing them in the method body.
-            Note: that rule ignores parameters prefixed with $ or _.
-        </description>
-        <priority>3</priority>
-        <example>
-<![CDATA[
-public class Foo {
-	private void bar(String howdy) {
-	// howdy is not used
-	}
-}
-]]>
-        </example>
-    </rule>
-    
-    <!--
-    <rule
-        name="LexicableConstructor"
-        since="4.3"
-        message="Lexicable class must be constructable from LexicalContext"
-        class="net.sourceforge.pmd.lang.rule.XPathRule"
-        externalInfoUrl="http://java.ranides.net/docs/pmd.htm#TooManyFields"
-        typeResolution="true"
-        >
-        <description><![CDATA[Classes that implement Lexicable interface must declare apriotiate ocnstructor with signature: Construct(LexicalContext context). It can be public but this is not obligatory.]]></description>
-        <priority>3</priority>
-        <properties>
-            <property name="xpath"><value>
-            <![CDATA[
-            //ClassOrInterfaceDeclaration[
-                ImplementsList/ClassOrInterfaceType[
-                    @Image='Lexicable' or @Image='net.ranides.assira.text.Lexicable'
-                ]
-                and
-                not(ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[
-                    FormalParameters[
-                        @ParameterCount='1' 
-                        and 
-                        FormalParameter/Type[@Array='false'][@TypeImage='LexicalContext' or @TypeImage='net.ranides.assira.text.LexicalContext']
-                    ]
-                ])
-            ]
-            ]]>
-            </value></property>
-        </properties>
-    </rule>
-    -->
-
-</ruleset>

+ 0 - 34
assira.rules/src/main/resources/rulesets/java/assira.test.xml

@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<ruleset name="net.ranides.assira.standard"
-         xmlns="http://pmd.sf.net/ruleset/1.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
-    <description>TEST</description>
-
-    <rule
-        name="TEST-ECB"
-        ref="rulesets/java/empty.xml/EmptyCatchBlock"
-        message="TEST: Must handle exceptions">
-        <priority>2</priority>
-    </rule>
-        
-    <rule name="TEST-UF"
-              language="java"
-              since="2.0.1"
-              message="TEST-UF: message"
-              class="net.ranides.assira.rules.UFRule"
-              externalInfoUrl="..."
-    >
-        <description>TEST-UF: description</description>
-        <priority>3</priority>
-        <properties>
-            <property name="allowCommentedBlocks" type="Boolean" value="false" description="text" />
-        </properties>
-    </rule>
-        
-    <rule name="TEST-UP" ref="rulesets/java/assira.custom.xml/UnusedParameter"/>
-
-</ruleset>

+ 0 - 296
assira.rules/src/main/resources/rulesets/java/assira.xml

@@ -1,296 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<ruleset name="net.ranides.assira.standard"
-    xmlns="http://pmd.sf.net/ruleset/1.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
-    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
-
-    <description>
-    Assira Quality Policy - Default Inherited Rules
-    </description>
-    
-    <rule ref="rulesets/java/basic.xml/JumbledIncrementer"/>
-    <rule ref="rulesets/java/basic.xml/ForLoopShouldBeWhileLoop"/>
-    <rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode"/>
-    <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking"/>
-    <rule ref="rulesets/java/basic.xml/ReturnFromFinallyBlock"/>
-    <rule ref="rulesets/java/basic.xml/UnconditionalIfStatement"/>
-    <rule ref="rulesets/java/basic.xml/BooleanInstantiation"/>
-    <rule ref="rulesets/java/basic.xml/CollapsibleIfStatements"/>
-    <rule ref="rulesets/java/basic.xml/ClassCastExceptionWithToArray"/>
-    <rule ref="rulesets/java/basic.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/>
-    <rule ref="rulesets/java/basic.xml/MisplacedNullCheck"/>
-    <rule ref="rulesets/java/basic.xml/BrokenNullCheck"/>
-    <rule ref="rulesets/java/basic.xml/AvoidThreadGroup"/>
-    <rule ref="rulesets/java/basic.xml/AvoidUsingOctalValues"/>
-    <rule ref="rulesets/java/basic.xml/AvoidUsingHardCodedIP"/>
-    <rule ref="rulesets/java/basic.xml/CheckResultSet"/>
-    <rule ref="rulesets/java/basic.xml/AvoidMultipleUnaryOperators"/>
-    <rule ref="rulesets/java/basic.xml/BigIntegerInstantiation"/>
-    <rule ref="rulesets/java/basic.xml/AvoidUsingHardCodedIP"/>
-    <rule ref="rulesets/java/basic.xml/CheckResultSet"/>
-    <rule ref="rulesets/java/basic.xml/ExtendsObject"/>
-    <rule ref="rulesets/java/basic.xml/CheckSkipResult"/>
-    <rule ref="rulesets/java/basic.xml/AvoidBranchingStatementAsLastInLoop"/>
-    <rule ref="rulesets/java/basic.xml/DontCallThreadRun"/>
-    
-    <rule ref="rulesets/java/braces.xml"/>
-    
-    <rule ref="rulesets/java/clone.xml"/>  
-    
-    <rule ref="rulesets/java/codesize.xml/NPathComplexity" />
-    <rule ref="rulesets/java/codesize.xml/ExcessiveMethodLength" />
-    <rule ref="rulesets/java/codesize.xml/ExcessiveClassLength">
-        <properties>
-            <property name="minimum" value="2000"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/codesize.xml/ExcessiveParameterList">
-        <properties>
-            <property name="minimum" value="7"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/codesize.xml/StdCyclomaticComplexity" name="CyclomaticComplexity">
-        <properties>
-            <property name="showClassesComplexity" value="false"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/codesize.xml/NcssMethodCount">
-        <properties>
-            <property name="minimum" value="50"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/codesize.xml/NcssTypeCount">
-        <properties>
-            <property name="minimum" value="2000"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/codesize.xml/NcssConstructorCount">
-        <properties>
-            <property name="minimum" value="50"/>
-        </properties>
-    </rule>
-    
-    <rule ref="rulesets/java/controversial.xml/DontImportSun"/>
-    <rule ref="rulesets/java/controversial.xml/UnnecessaryParentheses"/>
-    <rule ref="rulesets/java/controversial.xml/DoNotCallGarbageCollectionExplicitly"/>
-    <rule ref="rulesets/java/controversial.xml/AvoidFinalLocalVariable"/>
-
-    <rule ref="rulesets/java/coupling.xml/CouplingBetweenObjects">
-        <properties>
-            <property name="threshold" value="15"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/coupling.xml/ExcessiveImports">
-        <properties>
-            <property name="minimum" value="30"/>
-        </properties>
-    </rule>
-    
-    <rule ref="rulesets/java/design.xml/AccessorClassGeneration" />
-    <rule ref="rulesets/java/design.xml/AssignmentToNonFinalStatic" />
-    <rule ref="rulesets/java/design.xml/AvoidDeeplyNestedIfStmts" />
-    <rule ref="rulesets/java/design.xml/AvoidSynchronizedAtMethodLevel" />
-<!--<rule ref="rulesets/java/design.xml/AvoidReassigningParameters" />-->
-    <rule ref="rulesets/java/design.xml/BadComparison" />
-    <rule ref="rulesets/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
-    <rule ref="rulesets/java/design.xml/CloseResource" />
-    <rule ref="rulesets/java/design.xml/CompareObjectsWithEquals" />
-    <rule ref="rulesets/java/design.xml/ConstructorCallsOverridableMethod" />
-    <rule ref="rulesets/java/design.xml/DefaultLabelNotLastInSwitchStmt" />
-    <rule ref="rulesets/java/design.xml/EqualsNull" />
-    <rule ref="rulesets/java/design.xml/FinalFieldCouldBeStatic" />
-<!--<rule ref="rulesets/java/design.xml/GodClass" />-->
-    <rule ref="rulesets/java/design.xml/IdempotentOperations" />
-    <rule ref="rulesets/java/design.xml/ImmutableField" />
-    <rule ref="rulesets/java/design.xml/InstantiationToGetClass" />
-    <rule ref="rulesets/java/design.xml/MissingBreakInSwitch" />
-    <rule ref="rulesets/java/design.xml/MissingStaticMethodInNonInstantiatableClass" name="PackageClass" />
-    <rule ref="rulesets/java/design.xml/NonCaseLabelInSwitchStatement" />
-    <rule ref="rulesets/java/design.xml/NonThreadSafeSingleton" />
-    <rule ref="rulesets/java/design.xml/NonStaticInitializer" />
-    <rule ref="rulesets/java/design.xml/OptimizableToArrayCall" />
-    <rule ref="rulesets/java/design.xml/PositionLiteralsFirstInComparisons" />
-    <rule ref="rulesets/java/design.xml/PositionLiteralsFirstInCaseInsensitiveComparisons" />
-    <rule ref="rulesets/java/design.xml/ReturnEmptyArrayRatherThanNull" />
-    <rule ref="rulesets/java/design.xml/SimpleDateFormatNeedsLocale" />
-    <rule ref="rulesets/java/design.xml/SimplifyBooleanReturns" />
-    <rule ref="rulesets/java/design.xml/SimplifyBooleanExpressions" />
-    <rule ref="rulesets/java/design.xml/SimplifyConditional" />
-    <rule ref="rulesets/java/design.xml/SingularField" />
-    <rule ref="rulesets/java/design.xml/SwitchDensity">
-        <properties>
-            <property name="minimum" value="5"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/design.xml/SwitchStmtsShouldHaveDefault"/>
-    <rule ref="rulesets/java/design.xml/TooFewBranchesForASwitchStatement">
-        <properties>
-            <property name="minimumNumberCaseForASwitch" value="3"/>
-        </properties>
-    </rule>
-<!--<rule ref="rulesets/java/design.xml/UncommentedEmptyMethodBody" />-->
-    <rule ref="rulesets/java/design.xml/UnnecessaryLocalBeforeReturn" />
-    <rule ref="rulesets/java/design.xml/UnsynchronizedStaticDateFormatter" />
-    <rule ref="rulesets/java/design.xml/UseCollectionIsEmpty" />
-    <rule ref="rulesets/java/design.xml/UseLocaleWithCaseConversions" />
-    <rule ref="rulesets/java/design.xml/UseNotifyAllInsteadOfNotify" />
-    <rule ref="rulesets/java/design.xml/UseUtilityClass" />
-    
-    
-    
-    
-    
-    
-    <rule ref="rulesets/java/empty.xml/EmptyCatchBlock"/>
-    <rule ref="rulesets/java/empty.xml/EmptyIfStmt"/>
-    <rule ref="rulesets/java/empty.xml/EmptyWhileStmt"/>
-    <rule ref="rulesets/java/empty.xml/EmptyTryBlock"/>
-    <rule ref="rulesets/java/empty.xml/EmptyFinallyBlock"/>
-    <rule ref="rulesets/java/empty.xml/EmptySwitchStatements"/>
-    <rule ref="rulesets/java/empty.xml/EmptySynchronizedBlock"/>
-    <rule ref="rulesets/java/empty.xml/EmptyStaticInitializer"/>
-    <rule ref="rulesets/java/empty.xml/EmptyStatementNotInLoop"/>
-    <rule ref="rulesets/java/empty.xml/EmptyInitializer"/>
-    
-    <rule ref="rulesets/java/finalizers.xml" />
-    
-    <rule ref="rulesets/java/imports.xml/DuplicateImports" />
-    <rule ref="rulesets/java/imports.xml/DontImportJavaLang" />
-    <rule ref="rulesets/java/imports.xml/UnusedImports" />
-    <rule ref="rulesets/java/imports.xml/ImportFromSamePackage" />
-    <rule ref="rulesets/java/imports.xml/TooManyStaticImports">
-        <properties>
-            <property name="maximumStaticImports" value="3"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/imports.xml/UnnecessaryFullyQualifiedName" />
-
-    <rule ref="rulesets/java/javabeans.xml/MissingSerialVersionUID" />
-
-    <rule ref="rulesets/java/junit.xml/JUnitStaticSuite" />
-    <rule ref="rulesets/java/junit.xml/JUnitSpelling" />
-    <rule ref="rulesets/java/junit.xml/JUnitTestsShouldIncludeAssert" />
-    <rule ref="rulesets/java/junit.xml/TestClassWithoutTestCases" />
-    <rule ref="rulesets/java/junit.xml/SimplifyBooleanAssertion" />
-    <rule ref="rulesets/java/junit.xml/JUnitTestContainsTooManyAsserts" >
-        <properties>
-            <property name="maximumAsserts" value="20"/>
-        </properties>
-    </rule>
-
-    <rule ref="rulesets/java/logging-java.xml/LoggerIsNotStaticFinal" />
-    <rule ref="rulesets/java/logging-java.xml/SystemPrintln" />
-    <rule ref="rulesets/java/logging-jakarta-commons.xml/ProperLogger">
-        <properties>
-            <property name="staticLoggerName" value="LOGGER"/>
-        </properties>
-    </rule>
-
-    <rule ref="rulesets/java/migrating.xml/ReplaceVectorWithList" />
-    <rule ref="rulesets/java/migrating.xml/ReplaceHashtableWithMap" />
-    <rule ref="rulesets/java/migrating.xml/ReplaceEnumerationWithIterator" />
-    <rule ref="rulesets/java/migrating.xml/AvoidEnumAsIdentifier" />
-    <rule ref="rulesets/java/migrating.xml/AvoidAssertAsIdentifier" />
-    <rule ref="rulesets/java/migrating.xml/IntegerInstantiation" />
-    <rule ref="rulesets/java/migrating.xml/ByteInstantiation" />
-    <rule ref="rulesets/java/migrating.xml/ShortInstantiation" />
-    <rule ref="rulesets/java/migrating.xml/LongInstantiation" />
-    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseBeforeAnnotation" />
-    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseAfterAnnotation" />
-    <rule ref="rulesets/java/migrating.xml/JUnit4TestShouldUseTestAnnotation" />
-    <rule ref="rulesets/java/migrating.xml/JUnit4SuitesShouldUseSuiteAnnotation" />
-    
-
-    <rule ref="rulesets/java/naming.xml/ClassNamingConventions" />
-    <rule ref="rulesets/java/naming.xml/MethodWithSameNameAsEnclosingClass" />
-    <rule ref="rulesets/java/naming.xml/SuspiciousHashcodeMethodName" />
-    <rule ref="rulesets/java/naming.xml/SuspiciousConstantFieldName" />
-    <rule ref="rulesets/java/naming.xml/SuspiciousEqualsMethodName" />
-    <rule ref="rulesets/java/naming.xml/AvoidFieldNameMatchingTypeName" />
-    <rule ref="rulesets/java/naming.xml/NoPackage" />
-    <rule ref="rulesets/java/naming.xml/PackageCase" />
-
-
-    <rule ref="rulesets/java/optimizations.xml/AddEmptyString" />
-    <rule ref="rulesets/java/optimizations.xml/AvoidArrayLoops" />
-    <rule ref="rulesets/java/optimizations.xml/PrematureDeclaration" />
-    <rule ref="rulesets/java/optimizations.xml/UnnecessaryWrapperObjectCreation" />
-    <rule ref="rulesets/java/optimizations.xml/UseArraysAsList" />
-    <rule ref="rulesets/java/optimizations.xml/UseArrayListInsteadOfVector" />
-    <rule ref="rulesets/java/optimizations.xml/UseStringBufferForStringAppends" />
-    
-
-
-
-    <rule ref="rulesets/java/strictexception.xml/AvoidCatchingThrowable" />
-    <rule ref="rulesets/java/strictexception.xml/ExceptionAsFlowControl" />
-    <rule ref="rulesets/java/strictexception.xml/AvoidCatchingNPE" />
-    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNullPointerException" />
-    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingRawExceptionTypes" />
-    <rule ref="rulesets/java/strictexception.xml/DoNotThrowExceptionInFinally" />
-    <rule ref="rulesets/java/strictexception.xml/AvoidThrowingNewInstanceOfSameException" />
-    <rule ref="rulesets/java/strictexception.xml/AvoidRethrowingException" />
-
-    
-    <rule ref="rulesets/java/strings.xml/AvoidDuplicateLiterals">
-        <properties>
-            <property name="skipAnnotations" value="true"/>
-            <property name="minimumLength" value="8"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/strings.xml/StringInstantiation" />
-    <rule ref="rulesets/java/strings.xml/StringToString" />
-    <rule ref="rulesets/java/strings.xml/InefficientStringBuffering" />
-    <rule ref="rulesets/java/strings.xml/UnnecessaryCaseChange" />
-    <rule ref="rulesets/java/strings.xml/UseStringBufferLength" />
-    <rule ref="rulesets/java/strings.xml/AppendCharacterWithChar" />
-    <rule ref="rulesets/java/strings.xml/ConsecutiveLiteralAppends" />
-    <rule ref="rulesets/java/strings.xml/InefficientEmptyStringCheck" />
-    <rule ref="rulesets/java/strings.xml/UselessStringValueOf" />
-    <rule ref="rulesets/java/strings.xml/StringBufferInstantiationWithChar" />
-    <rule ref="rulesets/java/strings.xml/UseEqualsToCompareStrings" />
-    <rule ref="rulesets/java/strings.xml/AvoidStringBufferField" />
-
-    <rule ref="rulesets/java/sunsecure.xml" />
-    
-    <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateField" />
-    <rule ref="rulesets/java/unusedcode.xml/UnusedLocalVariable" />
-    <rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod" />
-    <rule ref="rulesets/java/unusedcode.xml/UnusedModifier" />
-    
-    <rule ref="rulesets/java/unnecessary.xml/UnnecessaryConversionTemporary"/>
-    <rule ref="rulesets/java/unnecessary.xml/UnnecessaryFinalModifier"/>
-    <rule ref="rulesets/java/unnecessary.xml/UselessOperationOnImmutable"/>
-    <rule ref="rulesets/java/unnecessary.xml/UnusedNullCheckInEquals"/>
-    
-    <rule ref="rulesets/java/assira.custom.xml/TooManyDifferentMethods">
-        <properties>
-            <property name="maximum" value="15"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/assira.custom.xml/TooManyPublicMethods">
-        <properties>
-            <property name="maximum" value="40"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/assira.custom.xml/LongVar"/>
-    <rule ref="rulesets/java/assira.custom.xml/FieldNameRules"/>
-    <rule ref="rulesets/java/assira.custom.xml/MethodNameRules"/>
-    <rule ref="rulesets/java/assira.custom.xml/InvalidUtilityClass"/>
-    <rule ref="rulesets/java/assira.custom.xml/TooManyParams">
-        <properties>
-            <property name="maximum" value="5"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/assira.custom.xml/AvoidThreadGroup"/>
-    <rule ref="rulesets/java/assira.custom.xml/UseSingleton"/>
-    <rule ref="rulesets/java/assira.custom.xml/TooManyFields">
-        <properties>
-            <property name="maximum" value="15"/>
-        </properties>
-    </rule>
-    <rule ref="rulesets/java/assira.custom.xml/UnusedParameter"/>
-
-</ruleset>

+ 0 - 2
pom.xml

@@ -75,8 +75,6 @@
             <id>common</id>
             <modules>
                 <module>assira.junit</module>
-                <module>assira.rules</module>
-                <module>assira.rules.test</module>
                 <module>assira.test</module>
                 <module>assira.core</module>
                 <module>assira.enterprise</module>