From 68ec78a0af84124ccb3726bae7aa05d6d150c236 Mon Sep 17 00:00:00 2001 From: aisensiy Date: Thu, 17 Aug 2017 14:31:27 +0800 Subject: [PATCH] flip equals --- src/main/java/io/spring/core/user/User.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/io/spring/core/user/User.java b/src/main/java/io/spring/core/user/User.java index bb41f43..91e1563 100644 --- a/src/main/java/io/spring/core/user/User.java +++ b/src/main/java/io/spring/core/user/User.java @@ -27,23 +27,23 @@ public class User { } public void update(String email, String username, String password, String bio, String image) { - if (!email.equals("")) { + if (!"".equals(email)) { this.email = email; } - if (!username.equals("")) { + if (!"".equals(username)) { this.username = username; } - if (!password.equals("")) { + if (!"".equals(password)) { this.password = password; } - if (!bio.equals("")) { + if (!"".equals(bio)) { this.bio = bio; } - if (!image.equals("")) { + if (!"".equals(image)) { this.image = image; } }