Skip to content

Commit

Permalink
errorprone :: MixedMutabilityReturnType (#981)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-mlb authored Oct 18, 2024
1 parent fea7c17 commit 4ee0635
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/emissary/config/ServiceConfigGuide.java
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ public Map<String, String> findStringMatchMap(@Nullable final String theParamete
public Map<String, Set<String>> findStringMatchMultiMap(@Nullable final String param) {

if (param == null) {
return Collections.emptyMap();
return Map.of();
}

final Map<String, Set<String>> theHash = new HashMap<>();
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/emissary/directory/DirectoryPlace.java
Original file line number Diff line number Diff line change
Expand Up @@ -973,15 +973,15 @@ protected List<DirectoryEntry> nextKeys(final String dataId, final IBaseDataObje
// Nothing for the dataId or any wildcarded versions, we are done
if ((currentList == null) || currentList.isEmpty()) {
logger.debug("nextKey - nothing found here for {}", dataId);
return Collections.emptyList();
return List.of();
}

// remove denied entries
currentList.removeIf(de -> de.getLocalPlace() != null && de.getLocalPlace().isDenied(payload.currentForm()));

if (currentList.isEmpty()) {
logger.debug("nextKeys - no non-DENIED entries found here for {}", dataId);
return Collections.emptyList();
return List.of();
}
// The list we are building for return to the caller
final List<DirectoryEntry> keyList = new ArrayList<>();
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/emissary/util/DisposeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
Expand Down Expand Up @@ -84,7 +83,7 @@ public static void set(final IBaseDataObject ibdo, final Runnable newRunnable) {
public static List<Runnable> get(final IBaseDataObject ibdo) {
Validate.notNull(ibdo, VALIDATION_MSG_IBDO);
if (!ibdo.hasParameter(KEY)) {
return Collections.emptyList();
return List.of();
}

final List<Runnable> validatedAsRunnables = new ArrayList<>();
Expand Down

0 comments on commit 4ee0635

Please sign in to comment.