DATAKV-187 - Remove restriction of ID type to be Serializable.

Original pull request: #25.
This commit is contained in:
Christoph Strobl
2017-07-20 11:26:45 +02:00
committed by Mark Paluch
parent 8f5fa59386
commit d6ee87ace5
11 changed files with 107 additions and 121 deletions

View File

@@ -22,7 +22,6 @@ import static org.hamcrest.core.IsNull.*;
import static org.junit.Assert.*;
import static org.springframework.data.keyvalue.test.util.IsEntry.*;
import java.io.Serializable;
import java.util.Map;
import org.junit.Before;
@@ -148,7 +147,7 @@ public class MapKeyValueAdapterUnitTests {
adapter.put("1", object1, COLLECTION_1);
adapter.put("2", object2, COLLECTION_1);
CloseableIterator<Map.Entry<Serializable, Object>> iterator = adapter.entries(COLLECTION_1);
CloseableIterator<Map.Entry<Object, Object>> iterator = adapter.entries(COLLECTION_1);
assertThat(iterator.next(), isEntry("1", object1));
assertThat(iterator.next(), isEntry("2", object2));
@@ -166,7 +165,7 @@ public class MapKeyValueAdapterUnitTests {
adapter.put("1", object1, COLLECTION_1);
adapter.put("2", object2, COLLECTION_2);
CloseableIterator<Map.Entry<Serializable, Object>> iterator = adapter.entries(COLLECTION_1);
CloseableIterator<Map.Entry<Object, Object>> iterator = adapter.entries(COLLECTION_1);
assertThat(iterator.next(), isEntry("1", object1));
assertThat(iterator.hasNext(), is(false));