Cleanup unnecessary unboxing

Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This commit is contained in:
Lars Grefer
2019-08-01 23:30:53 +02:00
committed by Josh Cummings
parent 2306d987e9
commit 2056834432
16 changed files with 21 additions and 23 deletions

View File

@@ -127,8 +127,7 @@ public class AclPermissionEvaluator implements PermissionEvaluator {
List<Permission> resolvePermission(Object permission) {
if (permission instanceof Integer) {
return Arrays.asList(permissionFactory.buildFromMask(((Integer) permission)
.intValue()));
return Arrays.asList(permissionFactory.buildFromMask((Integer) permission));
}
if (permission instanceof Permission) {

View File

@@ -146,10 +146,9 @@ public class JdbcMutableAclService extends JdbcAclService implements MutableAclS
"Unknown ACE class");
AccessControlEntryImpl entry = (AccessControlEntryImpl) entry_;
stmt.setLong(1, ((Long) acl.getId()).longValue());
stmt.setLong(1, (Long) acl.getId());
stmt.setInt(2, i);
stmt.setLong(3, createOrRetrieveSidPrimaryKey(entry.getSid(), true)
.longValue());
stmt.setLong(3, createOrRetrieveSidPrimaryKey(entry.getSid(), true));
stmt.setInt(4, entry.getPermission().getMask());
stmt.setBoolean(5, entry.isGranting());
stmt.setBoolean(6, entry.isAuditSuccess());