Replaced NullPointerException with IllegalArgumentException.

This commit is contained in:
Christian P. MOMON 2018-02-28 00:49:47 +01:00
parent ca91a15396
commit 4f1a466007

View file

@ -90,19 +90,19 @@ public class SQLSikevaDB implements SikevaDB
{ {
if (StringUtils.isBlank(driverClassName)) if (StringUtils.isBlank(driverClassName))
{ {
throw new NullPointerException("driverClassName is null."); throw new IllegalArgumentException("driverClassName is null.");
} }
else if (StringUtils.isBlank(url)) else if (StringUtils.isBlank(url))
{ {
throw new NullPointerException("url is null."); throw new IllegalArgumentException("url is null.");
} }
else if (StringUtils.isBlank(login)) else if (StringUtils.isBlank(login))
{ {
throw new NullPointerException("login is null."); throw new IllegalArgumentException("login is null.");
} }
else if (password == null) else if (password == null)
{ {
throw new NullPointerException("password is null"); throw new IllegalArgumentException("password is null");
} }
else else
{ {
@ -476,7 +476,7 @@ public class SQLSikevaDB implements SikevaDB
} }
else else
{ {
throw new NullPointerException("Connection is not initialized."); throw new IllegalArgumentException("Connection is not initialized.");
} }
// //