Simplified if statement

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2017-05-03 10:44:57 +02:00
parent 36a9e84fbe
commit 5919c0c204
1 changed files with 1 additions and 4 deletions

View File

@ -12,10 +12,7 @@ public class Helper {
*/
public static boolean compareObjects(Object a, Object b) {
if(a == null) {
if(b == null)
return true; //a and b both null
return false; //a null, b not null
return b == null;
}
if(b == null)