Permalink
Browse files

using Integer instead of int to avoid autoboxing NPEs

  • Loading branch information...
Burt Beckwith
Burt Beckwith committed Feb 11, 2012
1 parent bc6b3b8 commit b590ebad484e562985161f08788311c562d36f85
@@ -96,8 +96,8 @@ class AclClassController extends AbstractS2UiController {
int totalCount = lookupClass().executeQuery("SELECT COUNT(DISTINCT c) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -110,7 +110,7 @@ class AclEntryController extends AbstractS2UiController {
}
for (name in ['granting', 'auditSuccess', 'auditFailure']) {
- int value = params.int(name)
+ Integer value = params.int(name)
if (value) {
hql.append " AND e.$name=:$name"
queryParams[name] = value == 1
@@ -125,8 +125,8 @@ class AclEntryController extends AbstractS2UiController {
int totalCount = lookupClass().executeQuery("SELECT COUNT(DISTINCT e) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -115,7 +115,7 @@ class AclObjectIdentityController extends AbstractS2UiController {
}
for (name in ['entriesInheriting']) {
- int value = params.int(name)
+ Integer value = params.int(name)
if (value) {
hql.append " AND oid.$name=:$name"
queryParams[name] = value == 1
@@ -124,8 +124,8 @@ class AclObjectIdentityController extends AbstractS2UiController {
int totalCount = lookupClass().executeQuery("SELECT COUNT(DISTINCT oid) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -97,7 +97,7 @@ class AclSidController extends AbstractS2UiController {
}
for (name in ['principal']) {
- int value = params.int(name)
+ Integer value = params.int(name)
if (value) {
hql.append " AND s.$name=:$name"
queryParams[name] = value == 1
@@ -106,8 +106,8 @@ class AclSidController extends AbstractS2UiController {
int totalCount = lookupClass().executeQuery("SELECT COUNT(DISTINCT s) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -85,8 +85,8 @@ class PersistentLoginController extends AbstractS2UiController {
int totalCount = lookupPersistentLoginClass().executeQuery(
"SELECT COUNT(DISTINCT pl) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -87,8 +87,8 @@ class RegistrationCodeController extends AbstractS2UiController {
int totalCount = RegistrationCode.executeQuery("SELECT COUNT(DISTINCT rc) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -41,8 +41,8 @@ class RequestmapController extends AbstractS2UiController {
int totalCount = lookupUserClass().executeQuery("SELECT COUNT(DISTINCT r) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {
@@ -129,8 +129,8 @@ class UserController extends AbstractS2UiController {
int totalCount = lookupUserClass().executeQuery("SELECT COUNT(DISTINCT u) $hql", queryParams)[0]
- int max = params.int('max')
- int offset = params.int('offset')
+ Integer max = params.int('max')
+ Integer offset = params.int('offset')
String orderBy = ''
if (params.sort) {

0 comments on commit b590eba

Please sign in to comment.