Skip to content

Commit

Permalink
Update src/main/java/com/eternalcode/parcellockers/deliverycode/repos…
Browse files Browse the repository at this point in the history
…itory/DeliveryCodeRepositoryImpl.java

Co-authored-by: DMK <[email protected]>
  • Loading branch information
Jakubk15 and imDMK authored Oct 22, 2023
1 parent 7b1770c commit eb726db
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ public CompletableFuture<DeliveryCode> findByUUID(UUID parcelUUID) {
return null;
}

this.cache.putIfAbsent(parcelUUID, new DeliveryCode(
UUID.fromString(rs.getString("parcelUUID")),
rs.getString("code")
));

return new DeliveryCode(
UUID.fromString(rs.getString("parcelUUID")),
rs.getString("code")
);
DeliveryCode deliveryCode = new DeliveryCode(UUID.fromString(rs.getString("parcelUUID")), rs.getString("code"));

this.cache.putIfAbsent(parcelUUID, deliveryCode);

return Optional.of(deliveryCode);
});
}

Expand Down

0 comments on commit eb726db

Please sign in to comment.