Replaced NullPointerException with IllegalArgumentException.
This commit is contained in:
parent
ca91a15396
commit
4f1a466007
1 changed files with 5 additions and 5 deletions
|
@ -90,19 +90,19 @@ public class SQLSikevaDB implements SikevaDB
|
|||
{
|
||||
if (StringUtils.isBlank(driverClassName))
|
||||
{
|
||||
throw new NullPointerException("driverClassName is null.");
|
||||
throw new IllegalArgumentException("driverClassName is null.");
|
||||
}
|
||||
else if (StringUtils.isBlank(url))
|
||||
{
|
||||
throw new NullPointerException("url is null.");
|
||||
throw new IllegalArgumentException("url is null.");
|
||||
}
|
||||
else if (StringUtils.isBlank(login))
|
||||
{
|
||||
throw new NullPointerException("login is null.");
|
||||
throw new IllegalArgumentException("login is null.");
|
||||
}
|
||||
else if (password == null)
|
||||
{
|
||||
throw new NullPointerException("password is null");
|
||||
throw new IllegalArgumentException("password is null");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -476,7 +476,7 @@ public class SQLSikevaDB implements SikevaDB
|
|||
}
|
||||
else
|
||||
{
|
||||
throw new NullPointerException("Connection is not initialized.");
|
||||
throw new IllegalArgumentException("Connection is not initialized.");
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue