Skip to content

Commit

Permalink
use instanceof pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
sephiroth-j committed Nov 27, 2024
1 parent c13d8aa commit 366e240
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public void setTags(final Object value) {
setTagsIntern(string);
} else if (value instanceof String[] strings) {
setTagsIntern(strings);
} else if (value instanceof Collection && areAllElementsOfType((Collection) value, String.class)) {
setTagsIntern((Collection<String>) value);
} else if (value instanceof Collection collection && areAllElementsOfType(collection, String.class)) {
setTagsIntern(collection);
} else if (value == null) {
tags = null;
} else {
Expand Down

0 comments on commit 366e240

Please sign in to comment.