mehb-groww / test2

Collection and array length checks must be sensible JAVA-W1005
Anti-pattern
Major
1 occurrence in this check
101            String sql = "select * from user where userID =" + id + " and role = 1";
102            result = jdbcTemplate.query(sql, (rs, rowNum) -> new User(rs.getLong("userID"), rs.getString("firstName"), rs.getString("lastName"), rs.getString("email"), rs.getString("username"), rs.getString("password"), rs.getString("role"),rs.getString("salt")));
103        }
104        if (result.size() <= 0)105            return null;
106        return result.get(0);
107    }