From 4f1a46600720c332b592c53f7c2f817da5a4fbc0 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 28 Feb 2018 00:49:47 +0100 Subject: [PATCH] Replaced NullPointerException with IllegalArgumentException. --- src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java b/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java index c0aab47..151dae2 100644 --- a/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java +++ b/src/fr/devinsy/sikevadb/sql/SQLSikevaDB.java @@ -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."); } //