diff --git a/src/main/java/org/dataloader/impl/NoOpValueCache.java b/src/main/java/org/dataloader/impl/NoOpValueCache.java index bd82f03..c854f6a 100644 --- a/src/main/java/org/dataloader/impl/NoOpValueCache.java +++ b/src/main/java/org/dataloader/impl/NoOpValueCache.java @@ -20,14 +20,16 @@ @Internal public class NoOpValueCache implements ValueCache { - public static NoOpValueCache NOOP = new NoOpValueCache<>(); + public static final NoOpValueCache NOOP = new NoOpValueCache<>(); + + private static final Exception NOOP_GET_FAILURE = new UnsupportedOperationException(); /** * {@inheritDoc} */ @Override public CompletableFuture get(K key) { - return CompletableFutureKit.failedFuture(new UnsupportedOperationException()); + return CompletableFutureKit.failedFuture(NOOP_GET_FAILURE); } /**