Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Jun 18, 2024
1 parent 66da83b commit 5675fc2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ public Object getNativeCache() {
@Override
@SuppressWarnings("NullableProblems")
public <T> T get(Object key, Callable<T> valueLoader) {
Key dbKey = getKey(key);
Record record = client.get(null, dbKey);
if (valueLoader != null) {
Key dbKey = getKey(key);
Record record = client.get(null, dbKey);
if (record == null) {
synchronized (this) {
record = client.get(null, dbKey);
Expand All @@ -128,7 +128,8 @@ record = client.get(null, dbKey);
return value;
}
}
} else if (record.getValue(VALUE) != null) {
}
if (record.getValue(VALUE) != null) {
AerospikeReadData data = AerospikeReadData.forRead(dbKey, record);
Class<T> type = getValueType(valueLoader); // determine the class of T
return aerospikeConverter.read(type, data);
Expand Down

0 comments on commit 5675fc2

Please sign in to comment.