Skip to content

Commit 0d04cd5

Browse files
committed
Merge branch 'v2' into eb/v2-initial
# Conflicts: # src/main/java/com/launchdarkly/client/dynamodb/DynamoDbFeatureStoreCore.java
2 parents 0055cfd + 77c5733 commit 0d04cd5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/main/java/com/launchdarkly/client/dynamodb/DynamoDbFeatureStoreCore.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,17 @@ public void close() throws IOException {
8484
}
8585

8686
@Override
87-
public <T extends VersionedData> T getInternal(VersionedDataKind<T> kind, String key) {
87+
public VersionedData getInternal(VersionedDataKind<?> kind, String key) {
8888
GetItemResponse resp = getItemByKeys(namespaceForKind(kind), key);
8989
return unmarshalItem(kind, resp.item());
9090
}
9191

9292
@Override
93-
public <T extends VersionedData> Map<String, T> getAllInternal(VersionedDataKind<T> kind) {
94-
Map<String, T> itemsOut = new HashMap<>();
93+
public Map<String, VersionedData> getAllInternal(VersionedDataKind<?> kind) {
94+
Map<String, VersionedData> itemsOut = new HashMap<>();
9595
for (QueryResponse resp: client.queryPaginator(makeQueryForKind(kind).build())) {
9696
for (Map<String, AttributeValue> item: resp.items()) {
97-
T itemOut = unmarshalItem(kind, item);
97+
VersionedData itemOut = unmarshalItem(kind, item);
9898
if (itemOut != null) {
9999
itemsOut.put(itemOut.getKey(), itemOut);
100100
}
@@ -104,15 +104,15 @@ public <T extends VersionedData> Map<String, T> getAllInternal(VersionedDataKind
104104
}
105105

106106
@Override
107-
public void initInternal(Map<VersionedDataKind<?>, Map<String, ? extends VersionedData>> allData) {
107+
public void initInternal(Map<VersionedDataKind<?>, Map<String, VersionedData>> allData) {
108108
// Start by reading the existing keys; we will later delete any of these that weren't in allData.
109109
Set<Map.Entry<String, String>> unusedOldKeys = readExistingKeys(allData.keySet());
110110

111111
List<WriteRequest> requests = new ArrayList<>();
112112
int numItems = 0;
113113

114114
// Insert or update every provided item
115-
for (Map.Entry<VersionedDataKind<?>, Map<String, ? extends VersionedData>> entry: allData.entrySet()) {
115+
for (Map.Entry<VersionedDataKind<?>, Map<String, VersionedData>> entry: allData.entrySet()) {
116116
VersionedDataKind<?> kind = entry.getKey();
117117
for (VersionedData item: entry.getValue().values()) {
118118
Map<String, AttributeValue> encodedItem = marshalItem(kind, item);
@@ -148,7 +148,7 @@ public void initInternal(Map<VersionedDataKind<?>, Map<String, ? extends Version
148148
}
149149

150150
@Override
151-
public <T extends VersionedData> T upsertInternal(VersionedDataKind<T> kind, T item) {
151+
public VersionedData upsertInternal(VersionedDataKind<?> kind, VersionedData item) {
152152
Map<String, AttributeValue> encodedItem = marshalItem(kind, item);
153153

154154
if (updateHook != null) { // instrumentation for tests
@@ -252,7 +252,7 @@ private Map<String, AttributeValue> marshalItem(VersionedDataKind<?> kind, Versi
252252
);
253253
}
254254

255-
private <T extends VersionedData> T unmarshalItem(VersionedDataKind<T> kind, Map<String, AttributeValue> item) {
255+
private VersionedData unmarshalItem(VersionedDataKind<?> kind, Map<String, AttributeValue> item) {
256256
if (item == null || item.size() == 0) {
257257
return null;
258258
}

0 commit comments

Comments
 (0)