Update exception variable names
Consistently use `ex` for caught exception and `cause` for Exception constructor arguments. Issue gh-8945
This commit is contained in:
+3
-3
@@ -34,10 +34,10 @@ public class IdentityUnavailableException extends RuntimeException {
|
||||
* Constructs an <code>IdentityUnavailableException</code> with the specified message
|
||||
* and root cause.
|
||||
* @param msg the detail message
|
||||
* @param t root cause
|
||||
* @param cause root cause
|
||||
*/
|
||||
public IdentityUnavailableException(String msg, Throwable t) {
|
||||
super(msg, t);
|
||||
public IdentityUnavailableException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ public class ObjectIdentityImpl implements ObjectIdentity {
|
||||
Method method = typeClass.getMethod("getId", new Class[] {});
|
||||
result = method.invoke(object);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IdentityUnavailableException("Could not extract identity from object " + object, e);
|
||||
catch (Exception ex) {
|
||||
throw new IdentityUnavailableException("Could not extract identity from object " + object, ex);
|
||||
}
|
||||
|
||||
Assert.notNull(result, "getId() is required to return a non-null value");
|
||||
|
||||
@@ -85,8 +85,8 @@ class AclClassIdUtils {
|
||||
try {
|
||||
hasClassIdType = classIdTypeFrom(resultSet) != null;
|
||||
}
|
||||
catch (SQLException e) {
|
||||
log.debug("Unable to obtain the class id type", e);
|
||||
catch (SQLException ex) {
|
||||
log.debug("Unable to obtain the class id type", ex);
|
||||
}
|
||||
return hasClassIdType;
|
||||
}
|
||||
@@ -101,8 +101,8 @@ class AclClassIdUtils {
|
||||
try {
|
||||
targetType = Class.forName(className);
|
||||
}
|
||||
catch (ClassNotFoundException e) {
|
||||
log.debug("Unable to find class id type on classpath", e);
|
||||
catch (ClassNotFoundException ex) {
|
||||
log.debug("Unable to find class id type on classpath", ex);
|
||||
}
|
||||
}
|
||||
return targetType;
|
||||
|
||||
@@ -194,8 +194,8 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
try {
|
||||
return (List<AccessControlEntryImpl>) this.fieldAces.get(acl);
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
throw new IllegalStateException("Could not obtain AclImpl.aces field", e);
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException("Could not obtain AclImpl.aces field", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
try {
|
||||
this.fieldAcl.set(ace, acl);
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
throw new IllegalStateException("Could not or set AclImpl on AccessControlEntryImpl fields", e);
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException("Could not or set AclImpl on AccessControlEntryImpl fields", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,8 +212,8 @@ public class BasicLookupStrategy implements LookupStrategy {
|
||||
try {
|
||||
this.fieldAces.set(acl, aces);
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
throw new IllegalStateException("Could not set AclImpl entries", e);
|
||||
catch (IllegalAccessException ex) {
|
||||
throw new IllegalStateException("Could not set AclImpl entries", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -34,10 +34,10 @@ public class AlreadyExistsException extends AclDataAccessException {
|
||||
* Constructs an <code>AlreadyExistsException</code> with the specified message and
|
||||
* root cause.
|
||||
* @param msg the detail message
|
||||
* @param t root cause
|
||||
* @param cause root cause
|
||||
*/
|
||||
public AlreadyExistsException(String msg, Throwable t) {
|
||||
super(msg, t);
|
||||
public AlreadyExistsException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -34,10 +34,10 @@ public class ChildrenExistException extends AclDataAccessException {
|
||||
* Constructs an <code>ChildrenExistException</code> with the specified message and
|
||||
* root cause.
|
||||
* @param msg the detail message
|
||||
* @param t root cause
|
||||
* @param cause root cause
|
||||
*/
|
||||
public ChildrenExistException(String msg, Throwable t) {
|
||||
super(msg, t);
|
||||
public ChildrenExistException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,10 +34,10 @@ public class NotFoundException extends AclDataAccessException {
|
||||
* Constructs an <code>NotFoundException</code> with the specified message and root
|
||||
* cause.
|
||||
* @param msg the detail message
|
||||
* @param t root cause
|
||||
* @param cause root cause
|
||||
*/
|
||||
public NotFoundException(String msg, Throwable t) {
|
||||
super(msg, t);
|
||||
public NotFoundException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,10 +36,10 @@ public class UnloadedSidException extends AclDataAccessException {
|
||||
* Constructs an <code>NotFoundException</code> with the specified message and root
|
||||
* cause.
|
||||
* @param msg the detail message
|
||||
* @param t root cause
|
||||
* @param cause root cause
|
||||
*/
|
||||
public UnloadedSidException(String msg, Throwable t) {
|
||||
super(msg, t);
|
||||
public UnloadedSidException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -628,8 +628,8 @@ public class AclImplTests {
|
||||
((AuditableAccessControlEntry) ac).isAuditFailure()));
|
||||
}
|
||||
}
|
||||
catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
catch (IllegalAccessException ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
return acl;
|
||||
|
||||
+3
-3
@@ -121,9 +121,9 @@ public class JdbcMutableAclServiceTests extends AbstractTransactionalJUnit4Sprin
|
||||
// new DatabaseSeeder(dataSource, new
|
||||
// ClassPathResource("createAclSchemaPostgres.sql"));
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw e;
|
||||
catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user