summaryrefslogtreecommitdiff
path: root/same
diff options
context:
space:
mode:
Diffstat (limited to 'same')
-rw-r--r--same/src/main/java/com/orbekk/util/DelayedOperation.java6
-rw-r--r--same/src/test/java/com/orbekk/util/DelayedOperationTest.java7
2 files changed, 5 insertions, 8 deletions
diff --git a/same/src/main/java/com/orbekk/util/DelayedOperation.java b/same/src/main/java/com/orbekk/util/DelayedOperation.java
index cf6ca30..21215e7 100644
--- a/same/src/main/java/com/orbekk/util/DelayedOperation.java
+++ b/same/src/main/java/com/orbekk/util/DelayedOperation.java
@@ -1,6 +1,6 @@
package com.orbekk.util;
-public class DelayedOperation<T> {
+public class DelayedOperation {
public static class Status {
public final static int OK = 1;
public final static int CONFLICT = 2;
@@ -53,13 +53,11 @@ public class DelayedOperation<T> {
}
}
- private T argument;
private Status status;
private boolean isDone;
private int identifier;
- public DelayedOperation(T argument) {
- this.argument = argument;
+ public DelayedOperation() {
}
public Status getStatus() {
diff --git a/same/src/test/java/com/orbekk/util/DelayedOperationTest.java b/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
index b15830f..b65ceed 100644
--- a/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
+++ b/same/src/test/java/com/orbekk/util/DelayedOperationTest.java
@@ -6,20 +6,19 @@ import org.junit.Test;
public class DelayedOperationTest {
@Test public void initialOperationStatus() {
- DelayedOperation<String> operation = new DelayedOperation<String>("NotFinished");
+ DelayedOperation operation = new DelayedOperation();
assertFalse(operation.isDone());
}
@Test public void completedOperationReturns() {
- DelayedOperation<String> operation = new DelayedOperation<String>("Test");
+ DelayedOperation operation = new DelayedOperation();
operation.complete(DelayedOperation.Status.createOk());
assertTrue(operation.isDone());
assertEquals(DelayedOperation.Status.createOk(), operation.getStatus());
}
@Test public void concurrentTest() throws Exception {
- final DelayedOperation<String> operation =
- new DelayedOperation<String>("ConcurrentTest");
+ final DelayedOperation operation = new DelayedOperation();
Thread t = new Thread(new Runnable() {
@Override