diff options
author | Vitaly Takmazov | 2017-06-10 01:37:57 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-10 01:37:57 +0300 |
commit | b43fa0a5acc122ebbf3a0c7f28a28f8a052a2e9c (patch) | |
tree | 3c9c02524a0d6201710e536f9d8be417be263f3e /juick-server/src/main/java/com/juick | |
parent | 6a31ef273d0f6c2117b564a608ac1c1405370c1e (diff) |
www: fix exception when email options is not set
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r-- | juick-server/src/main/java/com/juick/service/UserServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java index 1b33a6d3..0b8ed13b 100644 --- a/juick-server/src/main/java/com/juick/service/UserServiceImpl.java +++ b/juick-server/src/main/java/com/juick/service/UserServiceImpl.java @@ -640,7 +640,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService { List<EmailOpts> list = getJdbcTemplate().query( "SELECT email,subscr_hour FROM emails WHERE user_id=? AND subscr_hour IS NOT NULL", (rs, num) -> new EmailOpts(rs.getString(1), rs.getInt(2)), user.getUid()); - return list.isEmpty() ? null : list.get(0); + return list.isEmpty() ? new EmailOpts("", 0) : list.get(0); } @Transactional(readOnly = true) |