Skip to content

Commit

Permalink
add Nullable to new getParameterAsConcatString method (#1032)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke committed Dec 31, 2024
1 parent 59f7185 commit 2e3b1c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/emissary/core/IBaseDataObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.annotation.Nullable;

public interface IBaseDataObject {

Expand Down Expand Up @@ -434,6 +435,7 @@ default String getParameterAsConcatString(final String key) {
* @param sep the separator for multivalued fields
* @return the string value or null if no such element
*/
@Nullable
default String getParameterAsConcatString(final String key, final String sep) {
Collection<String> strings = getParameterAsStrings(key);
if (strings.stream().anyMatch(Objects::nonNull)) {
Expand Down

0 comments on commit 2e3b1c4

Please sign in to comment.