Checkstyle fixes
This commit is contained in:
@ -566,7 +566,7 @@ public class PMDConfiguration extends AbstractConfiguration {
|
||||
* @return The currently used analysis cache. Never null.
|
||||
*/
|
||||
public AnalysisCache getAnalysisCache() {
|
||||
return analysisCache ;
|
||||
return analysisCache;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -244,7 +244,7 @@ public class RuleSetFactory {
|
||||
private RuleSet parseRuleSetNode(RuleSetReferenceId ruleSetReferenceId,
|
||||
boolean withDeprecatedRuleReferences) throws RuleSetNotFoundException {
|
||||
try (
|
||||
final CheckedInputStream inputStream = new CheckedInputStream(
|
||||
CheckedInputStream inputStream = new CheckedInputStream(
|
||||
ruleSetReferenceId.getInputStream(this.classLoader), new Adler32());
|
||||
) {
|
||||
if (!ruleSetReferenceId.isExternal()) {
|
||||
|
@ -21,7 +21,6 @@ import net.sourceforge.pmd.PMDConfiguration;
|
||||
import net.sourceforge.pmd.PMDException;
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import net.sourceforge.pmd.RuleContext;
|
||||
import net.sourceforge.pmd.RulePriority;
|
||||
import net.sourceforge.pmd.RuleSet;
|
||||
import net.sourceforge.pmd.RuleSetFactory;
|
||||
import net.sourceforge.pmd.RuleSetNotFoundException;
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import java.io.File;
|
||||
@ -109,4 +110,4 @@ public abstract class AbstractAnalysisCache implements AnalysisCache {
|
||||
// Not interested in metrics
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import java.io.File;
|
||||
@ -38,4 +39,4 @@ public interface AnalysisCache extends ReportListener {
|
||||
* @param classLoader The class loader configured for this analysis.
|
||||
*/
|
||||
void checkValidity(RuleSets ruleSets, ClassLoader classLoader);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
@ -36,7 +37,7 @@ public class AnalysisResult {
|
||||
|
||||
private static long computeFileChecksum(final File sourceFile) {
|
||||
try (
|
||||
final CheckedInputStream stream = new CheckedInputStream(
|
||||
CheckedInputStream stream = new CheckedInputStream(
|
||||
new BufferedInputStream(new FileInputStream(sourceFile)), new Adler32());
|
||||
) {
|
||||
// Just read it, the CheckedInputStream will update the checksum on it's own
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
@ -41,7 +42,7 @@ public class FileAnalysisCache extends AbstractAnalysisCache {
|
||||
private void loadFromFile(final File cacheFile) {
|
||||
if (cacheFile.exists()) {
|
||||
try (
|
||||
final DataInputStream inputStream = new DataInputStream(
|
||||
DataInputStream inputStream = new DataInputStream(
|
||||
new BufferedInputStream(new FileInputStream(cacheFile)));
|
||||
) {
|
||||
final String cacheVersion = inputStream.readUTF();
|
||||
@ -74,7 +75,7 @@ public class FileAnalysisCache extends AbstractAnalysisCache {
|
||||
@Override
|
||||
public void persist() {
|
||||
try (
|
||||
final DataOutputStream outputStream = new DataOutputStream(
|
||||
DataOutputStream outputStream = new DataOutputStream(
|
||||
new BufferedOutputStream(new FileOutputStream(cacheFile)));
|
||||
) {
|
||||
outputStream.writeUTF(pmdVersion);
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -59,7 +59,7 @@ public class MultiThreadProcessor extends AbstractPMDProcessor {
|
||||
|
||||
}
|
||||
|
||||
private void processReports(final List<Renderer> renderers, List<Future<Report>> tasks) throws Error {
|
||||
private void processReports(final List<Renderer> renderers, List<Future<Report>> tasks) {
|
||||
|
||||
while (!tasks.isEmpty()) {
|
||||
Future<Report> future = tasks.remove(0);
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd;
|
||||
|
||||
@ -59,8 +62,4 @@ public class FileSelectorTest {
|
||||
boolean selected = fileSelector.accept(javaFile.getParentFile(), javaFile.getName());
|
||||
assertEquals("Unwanted java file must not be selected!", false, selected);
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(FileSelectorTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.cache;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.jaxen;
|
||||
|
||||
@ -61,7 +64,7 @@ public class MatchesFunctionTest {
|
||||
list.add(attrs);
|
||||
list.add(exp);
|
||||
Context c = new Context(null);
|
||||
c.setNodeSet(new ArrayList());
|
||||
c.setNodeSet(new ArrayList<>());
|
||||
return function.call(c, list);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.properties;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
@ -24,8 +27,4 @@ public class EmacsRendererTest extends AbstractRendererTst {
|
||||
public String getExpectedMultiple() {
|
||||
return "n/a:1: blah" + PMD.EOL + "n/a:1: blah" + PMD.EOL;
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(EmacsRendererTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
@ -52,8 +55,4 @@ public class HTMLRendererTest extends AbstractRendererTst {
|
||||
+ "<td>file</td>" + PMD.EOL + "<td>Error</td>" + PMD.EOL + "</tr>" + PMD.EOL + "</table></body></html>"
|
||||
+ PMD.EOL;
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(HTMLRendererTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
@ -29,8 +32,4 @@ public class IDEAJRendererTest extends AbstractRendererTst {
|
||||
return "blah" + PMD.EOL + " at Foo <init>(Foo.java:1)" + PMD.EOL + "blah" + PMD.EOL
|
||||
+ " at Foo <init>(Foo.java:1)" + PMD.EOL;
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(IDEAJRendererTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
@ -30,8 +33,4 @@ public class TextRendererTest extends AbstractRendererTst {
|
||||
public String getExpectedError(ProcessingError error) {
|
||||
return "file\t-\tError" + PMD.EOL;
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(TextRendererTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
|
||||
package net.sourceforge.pmd.renderers;
|
||||
|
||||
@ -73,8 +76,4 @@ public class YAHTMLRendererTest extends AbstractRendererTst {
|
||||
public String getExpectedError(ProcessingError error) {
|
||||
return getExpected();
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(YAHTMLRendererTest.class);
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
/**
|
||||
* <copyright>
|
||||
* Copyright 1997-2002 BBNT Solutions, LLC
|
||||
@ -84,8 +87,4 @@ public class MetricTest {
|
||||
Metric IUT = new Metric(testName, 0, 0.0, 0.0, 0.0, 0.0, stdev);
|
||||
assertEquals(stdev, IUT.getStandardDeviation(), 0.05);
|
||||
}
|
||||
|
||||
public static junit.framework.Test suite() {
|
||||
return new junit.framework.JUnit4TestAdapter(MetricTest.class);
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user