Handle the case where one username is null and the other is not.

pull/105/head
Brett Wooldridge 11 years ago
parent 8ab1b24a00
commit 82d506f67d

@ -273,13 +273,13 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
if (username != null && !username.equals(otherKey.username)) {
return false;
}
else if (username != otherKey.username) {
else if (username == null && otherKey.username != null) {
return false;
}
else if (password != null && !password.equals(otherKey.password)) {
return false;
}
else if (password != otherKey.password) {
else if (password == null && otherKey.password != null) {
return false;
}

@ -273,13 +273,13 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
if (username != null && !username.equals(otherKey.username)) {
return false;
}
else if (username != otherKey.username) {
else if (username == null && otherKey.username != null) {
return false;
}
else if (password != null && !password.equals(otherKey.password)) {
return false;
}
else if (password != otherKey.password) {
else if (password == null && otherKey.password != null) {
return false;
}

Loading…
Cancel
Save