You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/26 15:43:01 UTC
(commons-logging) branch master updated: Remove code that accounts for Java 1.1 and 1.2
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git
The following commit(s) were added to refs/heads/master by this push:
new 4b13fda Remove code that accounts for Java 1.1 and 1.2
4b13fda is described below
commit 4b13fdaf945adbf566e5ce69372e453079f4f4fe
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 26 10:42:56 2023 -0500
Remove code that accounts for Java 1.1 and 1.2
Didn't get quite right in the previous commit
---
src/main/java/org/apache/commons/logging/impl/SimpleLog.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
index 4ee0b3b..c731618 100644
--- a/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
+++ b/src/main/java/org/apache/commons/logging/impl/SimpleLog.java
@@ -173,7 +173,7 @@ public class SimpleLog implements Log, Serializable {
// Get the thread context class loader (if there is one)
try {
classLoader = Thread.currentThread().getContextClassLoader();
- } catch (final SecurityException e) {
+ } catch (final RuntimeException e) {
/**
* getContextClassLoader() throws SecurityException when the context class loader isn't an ancestor of the calling class's class loader, or if
* security permissions are restricted.
@@ -183,7 +183,9 @@ public class SimpleLog implements Log, Serializable {
*/
// Capture 'e.getTargetException()' exception for details
// alternate: log 'e.getTargetException()', and pass back 'e'.
- throw new LogConfigurationException("Unexpected SecurityException", e);
+ if (!(e instanceof SecurityException)) {
+ throw new LogConfigurationException("Unexpected SecurityException", e);
+ }
}
if (classLoader == null) {