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);
|
entity.setUser(userRef);
|
||||||
em.persist(entity);
|
em.persist(entity);
|
||||||
MultivaluedHashMap<String, String> config = cred.getConfig();
|
MultivaluedHashMap<String, String> config = cred.getConfig();
|
||||||
if (config != null || !config.isEmpty()) {
|
if (config != null && !config.isEmpty()) {
|
||||||
|
|
||||||
for (String key : config.keySet()) {
|
for (String key : config.keySet()) {
|
||||||
List<String> values = config.getList(key);
|
List<String> values = config.getList(key);
|
||||||
|
|
|
@ -130,7 +130,7 @@ public class XMLTimeUtil {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static long inMilis(int valueInMins) {
|
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);
|
query.client(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (types != null & !types.isEmpty()) {
|
if (types != null && !types.isEmpty()) {
|
||||||
EventType[] t = new EventType[types.size()];
|
EventType[] t = new EventType[types.size()];
|
||||||
for (int i = 0; i < t.length; i++) {
|
for (int i = 0; i < t.length; i++) {
|
||||||
t[i] = EventType.valueOf(types.get(i));
|
t[i] = EventType.valueOf(types.get(i));
|
||||||
|
|
Loading…
Reference in a new issue