You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mb...@apache.org on 2023/01/08 18:04:03 UTC
[db-jdo] 05/18: JDO-823: A conditionally executed single line should be denoted by indentation
This is an automated email from the ASF dual-hosted git repository.
mbo pushed a commit to branch JDO-823-2
in repository https://gitbox.apache.org/repos/asf/db-jdo.git
commit a5c71b321d0a337dd766bafecf3220aaa66cd147
Author: Michael Bouschen <Mi...@akquinet.de>
AuthorDate: Sat Jan 7 20:37:38 2023 +0100
JDO-823: A conditionally executed single line should be denoted by indentation
---
api/src/main/java/javax/jdo/JDOHelper.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/api/src/main/java/javax/jdo/JDOHelper.java b/api/src/main/java/javax/jdo/JDOHelper.java
index e28bf1eb..1ffb13f6 100644
--- a/api/src/main/java/javax/jdo/JDOHelper.java
+++ b/api/src/main/java/javax/jdo/JDOHelper.java
@@ -1708,9 +1708,13 @@ public class JDOHelper implements Constants {
(PrivilegedExceptionAction<Object>) () -> method.invoke(instance, parameters));
} catch (PrivilegedActionException ex) {
Exception cause = ex.getException();
- if (cause instanceof IllegalAccessException) throw (IllegalAccessException) cause;
- else // if (cause instanceof InvocationTargetException)
- throw (InvocationTargetException) cause;
+ if (cause instanceof IllegalAccessException) {
+ throw (IllegalAccessException) cause;
+ } else if (cause instanceof InvocationTargetException) {
+ throw (InvocationTargetException) cause;
+ } else {
+ throw new RuntimeException(cause);
+ }
}
}