Skip to content

Commit

Permalink
Issue #4985 - adding requireNonNull to name in setAttribute
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Jun 19, 2020
1 parent 4abd8b1 commit d79ceb2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
Expand Down Expand Up @@ -75,6 +76,7 @@ public void removeAttribute(String name)
@Override
public void setAttribute(String name, Object attribute)
{
Objects.requireNonNull(name, "name must not be null");
if (attribute == null)
removeAttribute(name);
else
Expand Down

0 comments on commit d79ceb2

Please sign in to comment.