Merge pull request #4104 from sjvs/master
Fix three lgtm.com alerts: two possible NPEs, one possible int overflow
This commit is contained in:
commit
8da766e02e
3 changed files with 4 additions and 4 deletions
|
@ -119,7 +119,7 @@ public class JpaUserCredentialStore implements UserCredentialStore {
|
|||
entity.setUser(userRef);
|
||||
em.persist(entity);
|
||||
MultivaluedHashMap<String, String> config = cred.getConfig();
|
||||
if (config != null || !config.isEmpty()) {
|
||||
if (config != null && !config.isEmpty()) {
|
||||
|
||||
for (String key : config.keySet()) {
|
||||
List<String> values = config.getList(key);
|
||||
|
|
|
@ -130,7 +130,7 @@ public class XMLTimeUtil {
|
|||
* @return
|
||||
*/
|
||||
public static long inMilis(int valueInMins) {
|
||||
return valueInMins * 60 * 1000;
|
||||
return (long) valueInMins * 60 * 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -541,7 +541,7 @@ public class RealmAdminResource {
|
|||
query.client(client);
|
||||
}
|
||||
|
||||
if (types != null & !types.isEmpty()) {
|
||||
if (types != null && !types.isEmpty()) {
|
||||
EventType[] t = new EventType[types.size()];
|
||||
for (int i = 0; i < t.length; i++) {
|
||||
t[i] = EventType.valueOf(types.get(i));
|
||||
|
|
Loading…
Reference in a new issue