From 47fbcd586c0ab311bc85133531034784dbfac5ef Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Tue, 17 Dec 2024 17:27:33 +0100 Subject: [PATCH] fix "Self-causation not permitted" --- core/src/main/java/lucee/commons/lang/ExceptionUtil.java | 3 +++ loader/build.xml | 2 +- loader/pom.xml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/lucee/commons/lang/ExceptionUtil.java b/core/src/main/java/lucee/commons/lang/ExceptionUtil.java index e88d3e4fa3..391b39f5c5 100644 --- a/core/src/main/java/lucee/commons/lang/ExceptionUtil.java +++ b/core/src/main/java/lucee/commons/lang/ExceptionUtil.java @@ -318,9 +318,12 @@ public static void initCauseEL(Throwable e, Throwable cause) { if (--count <= 0) break; // in case cause point to a child tmp = e.getCause(); if (tmp == null) break; + if (tmp == cause) return; e = tmp; } while (true); + + if (e == cause) return; // attach to root cause try { e.initCause(cause); diff --git a/loader/build.xml b/loader/build.xml index b5a380d481..43abca4dfa 100644 --- a/loader/build.xml +++ b/loader/build.xml @@ -2,7 +2,7 @@ - + diff --git a/loader/pom.xml b/loader/pom.xml index 272402f4ee..54a716723b 100644 --- a/loader/pom.xml +++ b/loader/pom.xml @@ -3,7 +3,7 @@ org.lucee lucee - 6.2.0.225-SNAPSHOT + 6.2.0.226-SNAPSHOT jar Lucee Loader Build