Fixing travis build from failing
@@ -53,7 +53,7 @@ import lombok.extern.slf4j.Slf4j;
@Slf4j
final class SafeDatasetCommit implements Callable<Void> {
- private static final String GLOBAL_LOCK = "LOCK";
+ private static final Object GLOBAL_LOCK = new Object();
private final boolean shouldCommitDataInJob;
private final DeliverySemantics deliverySemantics;
@@ -184,14 +184,14 @@ final class SafeDatasetCommit implements Callable<Void> {
private final TaskFactory taskFactory;
public boolean equals(Object other) {
- if (canEqual(other)) {
+ if (!(other instanceof TaskFactoryWrapper)) {
+ return false;
+ }
if (this.taskFactory == null) {
return ((TaskFactoryWrapper) other).taskFactory == null;
}
- return ((TaskFactoryWrapper) other).taskFactory != null &&
- this.taskFactory.getClass().equals(((TaskFactoryWrapper) other).taskFactory.getClass());
- }
- return false;
+ return ((TaskFactoryWrapper) other).taskFactory != null && this.taskFactory.getClass()
+ .equals(((TaskFactoryWrapper) other).taskFactory.getClass());
}
public int hashCode() {
@@ -201,10 +201,6 @@ final class SafeDatasetCommit implements Callable<Void> {
result = result * PRIME + (klazz == null ? 43 : klazz.hashCode());
return result;
}
-
- protected boolean canEqual(Object other) {
- return other instanceof TaskFactoryWrapper;
- }
}
private synchronized void buildAndExecuteCommitSequence(CommitSequence.Builder builder, JobState.DatasetState datasetState,
