Skip to content

Commit aa1012b

Browse files
committed
Throw IllegalArgumentException at all such cases
1 parent 56d4d56 commit aa1012b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/redis/clients/jedis/util/JedisURIHelper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import redis.clients.jedis.HostAndPort;
66
import redis.clients.jedis.Protocol;
77
import redis.clients.jedis.RedisProtocol;
8-
import redis.clients.jedis.exceptions.JedisValidationException;
98

109
public final class JedisURIHelper {
1110

@@ -110,15 +109,15 @@ public static ClientSideCache getClientSideCache(URI uri) {
110109
try {
111110
maxSize = Integer.parseInt(val);
112111
} catch (NumberFormatException nfe) {
113-
throw new JedisValidationException("Value of cache_max_size must be an integer.", nfe);
112+
throw new IllegalArgumentException("Value of cache_max_size must be an integer.", nfe);
114113
}
115114
break;
116115

117116
case "cache_ttl":
118117
try {
119118
ttl = Integer.parseInt(val);
120119
} catch (NumberFormatException nfe) {
121-
throw new JedisValidationException("Value of cache_ttl must be an integer denoting seconds.", nfe);
120+
throw new IllegalArgumentException("Value of cache_ttl must be an integer denoting seconds.", nfe);
122121
}
123122
break;
124123
}

0 commit comments

Comments
 (0)