1
0
mirror of synced 2026-05-22 21:33:16 +00:00

Update exception variable names

Consistently use `ex` for caught exception and `cause` for Exception
constructor arguments.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-28 23:53:30 -07:00
committed by Rob Winch
parent e9130489a6
commit 8d80166aaf
194 changed files with 635 additions and 633 deletions
@@ -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);
}
}
@@ -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);
}
}
@@ -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;
@@ -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;
}
}