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 files changed
+4
-4
No files matched your search
@@ -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);
|
||||
|
||||
+2
-2
@@ -130,7 +130,7 @@ public class XMLTimeUtil {
|
||||
* @return
|
||||
*/
|
||||
public static long inMilis(int valueInMins) {
|
||||
return valueInMins * 60 * 1000;
|
||||
return (long) valueInMins * 60 * 1000;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,4 +241,4 @@ public class XMLTimeUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user