Skip to content

Commit

Permalink
Polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed May 7, 2024
1 parent bd388d0 commit db47616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Expand Up @@ -98,7 +98,7 @@ public boolean isClosed() {
}

/**
* If a close action is configured, it will be called with all successfully
* If a {@link CloseAction} is configured, it will be called with all successfully
* stored values in reverse insertion order.
*
* <p>Closing a store does not close its parent or any of its children.
Expand Down Expand Up @@ -218,8 +218,8 @@ public <K, V> V getOrComputeIfAbsent(N namespace, K key, Function<K, V> defaultC
* @param key the key; never {@code null}
* @param value the value to store; may be {@code null}
* @return the previously stored value; may be {@code null}
* @throws NamespacedHierarchicalStoreException if the stored value cannot
* be cast to the required type
* @throws NamespacedHierarchicalStoreException if an error occurs while
* storing the value
* @throws IllegalStateException if this store has already been closed
*/
public Object put(N namespace, Object key, Object value) throws NamespacedHierarchicalStoreException {
Expand Down Expand Up @@ -348,7 +348,7 @@ private static class StoredValue {

private <N> EvaluatedValue<N> evaluateSafely(CompositeKey<N> compositeKey) {
try {
return new EvaluatedValue<>(compositeKey, order, evaluate());
return new EvaluatedValue<>(compositeKey, this.order, evaluate());
}
catch (Throwable t) {
UnrecoverableExceptions.rethrowIfUnrecoverable(t);
Expand All @@ -357,7 +357,7 @@ private <N> EvaluatedValue<N> evaluateSafely(CompositeKey<N> compositeKey) {
}

private Object evaluate() {
return supplier.get();
return this.supplier.get();
}

static Object evaluateIfNotNull(StoredValue value) {
Expand Down Expand Up @@ -444,7 +444,7 @@ public Failure(Throwable throwable) {
/**
* Called for each successfully stored non-null value in the store when a
* {@link NamespacedHierarchicalStore} is
* {@link NamespacedHierarchicalStore#close() closed}.
* {@linkplain NamespacedHierarchicalStore#close() closed}.
*/
@FunctionalInterface
public interface CloseAction<N> {
Expand Down
Expand Up @@ -29,7 +29,6 @@ public NamespacedHierarchicalStoreException(String message) {
super(message);
}

@SuppressWarnings("unused")
public NamespacedHierarchicalStoreException(String message, Throwable cause) {
super(message, cause);
}
Expand Down

0 comments on commit db47616

Please sign in to comment.