RESOLVED - BATCH-601: Findbugs code audit
This commit is contained in:
@@ -3,6 +3,7 @@ package org.springframework.batch.sample.domain;
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
|
||||
public class Game implements Serializable {
|
||||
|
||||
@@ -212,4 +213,9 @@ public class Game implements Serializable {
|
||||
public boolean equals(Object obj) {
|
||||
return EqualsBuilder.reflectionEquals(this, obj);
|
||||
}
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.springframework.batch.sample.domain;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Domain object representing the summary of a given Player's
|
||||
@@ -105,4 +106,8 @@ public class PlayerSummary {
|
||||
public boolean equals(Object obj) {
|
||||
return EqualsBuilder.reflectionEquals(this, obj);
|
||||
}
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class StagingItemReader extends JdbcDaoSupport implements ItemStream, Ite
|
||||
return false;
|
||||
}
|
||||
|
||||
private class StagingBuffer {
|
||||
private static class StagingBuffer {
|
||||
|
||||
private List list = new ArrayList();
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ public class JdbcJobRepositoryTests extends AbstractTransactionalDataSourceSprin
|
||||
JobExecution execution = null;
|
||||
long t0 = System.currentTimeMillis();
|
||||
try {
|
||||
execution = doConcurrentStart();
|
||||
doConcurrentStart();
|
||||
fail("Expected JobExecutionAlreadyRunningException");
|
||||
}
|
||||
catch (JobExecutionAlreadyRunningException e) {
|
||||
@@ -141,7 +141,7 @@ public class JdbcJobRepositoryTests extends AbstractTransactionalDataSourceSprin
|
||||
|
||||
long t0 = System.currentTimeMillis();
|
||||
try {
|
||||
execution = doConcurrentStart();
|
||||
doConcurrentStart();
|
||||
fail("Expected JobExecutionAlreadyRunningException");
|
||||
}
|
||||
catch (JobExecutionAlreadyRunningException e) {
|
||||
|
||||
@@ -11,8 +11,6 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean {
|
||||
|
||||
private String dataDirectory = "derby-home";
|
||||
|
||||
DataSource dataSource;
|
||||
|
||||
public void setDataDirectory(String dataDirectory) {
|
||||
this.dataDirectory = dataDirectory;
|
||||
}
|
||||
@@ -26,7 +24,6 @@ public class DerbyDataSourceFactoryBean extends AbstractFactoryBean {
|
||||
final EmbeddedDataSource ds = new EmbeddedDataSource();
|
||||
ds.setDatabaseName("derbydb");
|
||||
ds.setCreateDatabase("create");
|
||||
dataSource = ds;
|
||||
ds.getConnection().close();
|
||||
ds.setCreateDatabase(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user