Skip to content

Commit

Permalink
Remove needless cleanup (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
elharo authored Nov 24, 2024
1 parent 6c1c802 commit b0ce8f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@
import junit.framework.TestCase;

public class CheckstyleReportListenerMultiSourceTest extends TestCase {
private Map<SeverityLevel, CheckstyleCheckerListener> listenerMap;
private Map<SeverityLevel, CheckstyleCheckerListener> listenerMap = new HashMap<>();

/**
* {@inheritDoc}
*/
@Override
protected void setUp() throws Exception {
listenerMap = new HashMap<>();

CheckstyleCheckerListener listener = new CheckstyleCheckerListener(new File("/source/path"));
listener.addSourceDirectory(new File("/source/path2"));
listener.setSeverityLevelFilter(SeverityLevel.INFO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@
*
*/
public class CheckstyleReportListenerTest extends TestCase {
private Map<SeverityLevel, CheckstyleCheckerListener> listenerMap;
private Map<SeverityLevel, CheckstyleCheckerListener> listenerMap = new HashMap<>();

/** {@inheritDoc} */
@Override
protected void setUp() throws Exception {
listenerMap = new HashMap<>();

CheckstyleCheckerListener listener = new CheckstyleCheckerListener(new File("/source/path"));
listener.setSeverityLevelFilter(SeverityLevel.INFO);
listenerMap.put(listener.getSeverityLevelFilter(), listener);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,7 @@
*
*/
public class CheckstyleResultsTest extends TestCase {
private CheckstyleResults results;

/** {@inheritDoc} */
protected void setUp() throws Exception {
results = new CheckstyleResults();
}

/** {@inheritDoc} */
protected void tearDown() throws Exception {
results = null;
}
private CheckstyleResults results = new CheckstyleResults();

public void testEmptyResults() {
assertEquals("test total files", 0, results.getFiles().size());
Expand Down

0 comments on commit b0ce8f7

Please sign in to comment.