We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2cb64d commit 185caf1Copy full SHA for 185caf1
Java/src/org/mlarocca/containers/strings/tst/Tst.java
@@ -30,8 +30,8 @@ public Tst() {
30
31
@Override
32
public boolean add(String element) {
33
- if (element.isEmpty()) {
34
- throw new IllegalArgumentException("Keys must be non-empty");
+ if (element == null || element.isEmpty()) {
+ throw new IllegalArgumentException("Keys must be non-null and non-empty");
35
}
36
writeLock.lock();
37
try {
0 commit comments