@@ -272,9 +272,7 @@ public Object get(Object id, String keyspace) {
272
272
public <T > T get (Object id , String keyspace , Class <T > type ) {
273
273
274
274
String stringId = asString (id );
275
- String stringKeyspace = asString (keyspace );
276
-
277
- byte [] binId = createKey (stringKeyspace , stringId );
275
+ byte [] binId = createKey (keyspace , stringId );
278
276
279
277
RedisCallback <Map <byte [], byte []>> command = connection -> connection .hGetAll (binId );
280
278
@@ -287,7 +285,7 @@ public <T> T get(Object id, String keyspace, Class<T> type) {
287
285
RedisData data = new RedisData (raw );
288
286
289
287
data .setId (stringId );
290
- data .setKeyspace (stringKeyspace );
288
+ data .setKeyspace (keyspace );
291
289
292
290
return readBackTimeToLiveIfSet (binId , converter .read (type , data ));
293
291
}
@@ -307,13 +305,13 @@ public <T> T delete(Object id, String keyspace, Class<T> type) {
307
305
308
306
if (value != null ) {
309
307
310
- byte [] keyToDelete = createKey (asString ( keyspace ) , asString (id ));
308
+ byte [] keyToDelete = createKey (keyspace , asString (id ));
311
309
312
310
redisOps .execute ((RedisCallback <Void >) connection -> {
313
311
314
312
connection .del (keyToDelete );
315
313
connection .sRem (binKeyspace , binId );
316
- new IndexWriter (connection , converter ).removeKeyFromIndexes (asString ( keyspace ) , binId );
314
+ new IndexWriter (connection , converter ).removeKeyFromIndexes (keyspace , binId );
317
315
318
316
if (RedisKeyValueAdapter .this .keepShadowCopy ()) {
319
317
@@ -384,7 +382,7 @@ public void deleteAllOf(String keyspace) {
384
382
redisOps .execute ((RedisCallback <Void >) connection -> {
385
383
386
384
connection .del (toBytes (keyspace ));
387
- new IndexWriter (connection , converter ).removeAllIndexes (asString ( keyspace ) );
385
+ new IndexWriter (connection , converter ).removeAllIndexes (keyspace );
388
386
return null ;
389
387
});
390
388
}
0 commit comments