Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove needless cleanup #162

Merged
merged 1 commit into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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