Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package logback for openSUSE:Factory checked in at 2026-07-15 22:20:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logback (Old) and /work/SRC/openSUSE:Factory/.logback.new.1991 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logback" Wed Jul 15 22:20:24 2026 rev:17 rq:1366016 version:1.5.38 Changes: -------- --- /work/SRC/openSUSE:Factory/logback/logback.changes 2026-07-15 16:53:31.850737375 +0200 +++ /work/SRC/openSUSE:Factory/.logback.new.1991/logback.changes 2026-07-15 22:20:26.769112134 +0200 @@ -1,0 +2,16 @@ +Wed Jul 15 15:16:22 UTC 2026 - Fridrich Strba <[email protected]> + +- Upgrade to upstream version 1.5.38 + * Change of 1.5.38 + + In HardenedObjectInputStream, fixed a typo preventing + Throwable objects from being white-filtered + * Change of 1.5.37 + + Given the numerous vulnerabilities related to conditional + configuration processing based on the evaluation of Java + expressions using the Janino library, support for such + expressions has been removed +- Removed patch: + * new-janino.patch + + not needed + +------------------------------------------------------------------- Old: ---- logback-1.5.36.tar.xz new-janino.patch New: ---- logback-1.5.38.tar.xz ----------(Old B)---------- Old:- Removed patch: * new-janino.patch + not needed ----------(Old E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logback.spec ++++++ --- /var/tmp/diff_new_pack.HCy7L0/_old 2026-07-15 22:20:27.585139822 +0200 +++ /var/tmp/diff_new_pack.HCy7L0/_new 2026-07-15 22:20:27.589139958 +0200 @@ -17,36 +17,27 @@ Name: logback -Version: 1.5.36 +Version: 1.5.38 Release: 0 Summary: A Java logging library License: EPL-1.0 OR LGPL-2.1-or-later +Group: Development/Libraries/Java URL: https://logback.qos.ch/ Source0: %{name}-%{version}.tar.xz -Patch0: new-janino.patch -Patch1: filtering.patch +Patch0: filtering.patch BuildRequires: fdupes BuildRequires: java-devel >= 11 BuildRequires: maven-local +BuildRequires: mvn(ch.qos.reload4j:reload4j) +BuildRequires: mvn(jakarta.activation:jakarta.activation-api) BuildRequires: mvn(jakarta.mail:jakarta.mail-api) BuildRequires: mvn(jakarta.servlet:jakarta.servlet-api) -BuildRequires: mvn(javax.mail:mail) -BuildRequires: mvn(javax.servlet:javax.servlet-api) -BuildRequires: mvn(junit:junit) -BuildRequires: mvn(log4j:log4j) -BuildRequires: mvn(org.apache.ant:ant-junit) -BuildRequires: mvn(org.apache.ant:ant-junitlauncher) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin) -BuildRequires: mvn(org.apache.tomcat:tomcat-catalina) -BuildRequires: mvn(org.apache.tomcat:tomcat-coyote) -BuildRequires: mvn(org.codehaus.janino:janino) -BuildRequires: mvn(org.eclipse.jetty:jetty-server) -BuildRequires: mvn(org.eclipse.jetty:jetty-util) BuildRequires: mvn(org.fusesource.jansi:jansi) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-ext) +BuildRequires: mvn(org.tukaani:xz) BuildArch: noarch %description @@ -66,12 +57,14 @@ %package javadoc Summary: Javadoc for %{name} +Group: Documentation/HTML %description javadoc API documentation for the Logback library %package access Summary: Logback-access module for Servlet integration +Group: Development/Libraries/Java %description access The logback-access module integrates with Servlet containers, such as Tomcat @@ -80,6 +73,7 @@ %package examples Summary: Logback Examples Module +Group: Development/Libraries/Java %description examples logback-examples module. @@ -95,6 +89,8 @@ %pom_remove_plugin :findbugs-maven-plugin %pom_remove_plugin -r :maven-dependency-plugin %pom_remove_plugin -r :central-publishing-maven-plugin +# needed for tests only +%pom_remove_plugin -r :maven-antrun-plugin rm -r %{name}-*/src/test/java/* # remove test deps ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.HCy7L0/_old 2026-07-15 22:20:27.613140772 +0200 +++ /var/tmp/diff_new_pack.HCy7L0/_new 2026-07-15 22:20:27.617140907 +0200 @@ -1,6 +1,6 @@ -mtime: 1783944873 -commit: 317d6b82f07f9ebcfc1769548c794a8a2c0489cd20b8dace4527c90e9f0a7ba1 +mtime: 1784142638 +commit: d757198a9da754d6dfd300c48818663e74f90cfe3d6ba27c8a74190f2c895497 url: https://src.opensuse.org/java-packages/logback -revision: 317d6b82f07f9ebcfc1769548c794a8a2c0489cd20b8dace4527c90e9f0a7ba1 +revision: d757198a9da754d6dfd300c48818663e74f90cfe3d6ba27c8a74190f2c895497 projectscmsync: https://src.opensuse.org/java-packages/_ObsPrj ++++++ _service ++++++ --- /var/tmp/diff_new_pack.HCy7L0/_old 2026-07-15 22:20:27.633141450 +0200 +++ /var/tmp/diff_new_pack.HCy7L0/_new 2026-07-15 22:20:27.637141586 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="disabled"> <param name="scm">git</param> <param name="url">https://github.com/qos-ch/logback.git</param> - <param name="revision">v_1.5.36</param> + <param name="revision">v_1.5.38</param> <param name="match-tag">v_*</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v_(.*)</param> ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-07-15 21:10:38.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ logback-1.5.36.tar.xz -> logback-1.5.38.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-access/pom.xml new/logback-1.5.38/logback-access/pom.xml --- old/logback-1.5.36/logback-access/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-access/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-access</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic/pom.xml new/logback-1.5.38/logback-classic/pom.xml --- old/logback-1.5.36/logback-classic/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-classic</artifactId> @@ -29,19 +29,6 @@ <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> - <!-- <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-ext</artifactId> - <version>${slf4j.version}</version> - <scope>test</scope> - </dependency> --> - - <!-- <dependency> - <groupId>ch.qos.cal10n.plugins</groupId> - <artifactId>maven-cal10n-plugin</artifactId> - <version>${cal10n.version}</version> - <scope>test</scope> - </dependency> --> <dependency> <groupId>org.slf4j</groupId> @@ -99,12 +86,6 @@ </dependency> <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <optional>true</optional> - </dependency> - - <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <type>test-jar</type> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/pom.xml new/logback-1.5.38/logback-classic-blackbox/pom.xml --- old/logback-1.5.36/logback-classic-blackbox/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-classic-blackbox</artifactId> @@ -56,12 +56,6 @@ <scope>compile</scope> </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <scope>compile</scope> - </dependency> - <dependency> <groupId>org.dom4j</groupId> <artifactId>dom4j</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp.xml 2026-07-09 10:49:48.000000000 +0200 @@ -13,7 +13,10 @@ </root> - <if condition='property("HOSTNAME").contains("${aHost}")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyContains("HOSTNAME", "${aHost}")</expression> + </condition> + <if> <then> <appender name="CON" class="ch.qos.logback.core.ConsoleAppender"> <encoder> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp_ELSE.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp_ELSE.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp_ELSE.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalConsoleApp_ELSE.xml 2026-07-09 10:49:48.000000000 +0200 @@ -1,7 +1,10 @@ <configuration> - <if condition='property("HOSTNAME").equals("XYZ87")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("HOSTNAME", "XYZ87")</expression> + </condition> + <if> <then> <appender name="CON" class="ch.qos.logback.core.ConsoleAppender"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalIncludeExistingFile.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalIncludeExistingFile.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalIncludeExistingFile.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/conditionalIncludeExistingFile.xml 2026-07-09 10:49:48.000000000 +0200 @@ -23,8 +23,11 @@ class="ch.qos.logback.core.property.FileExistsPropertyDefiner"> <path>src/test/blackboxInput/joran/conditional/includedFile.xml</path> </define> - - <if condition='property("INCLUDED_FILE_EXISTS").equals("true")'> + + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("INCLUDED_FILE_EXISTS", "true")</expression> + </condition> + <if> <then> <include file="src/test/blackboxInput/joran/conditional/includedFile.xml"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includeWithVariableAndConditional.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includeWithVariableAndConditional.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includeWithVariableAndConditional.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includeWithVariableAndConditional.xml 2026-07-09 10:49:48.000000000 +0200 @@ -16,8 +16,11 @@ <variable scope="system" name="JO_PREFIX" value="src/test/blackboxInput/joran"/> - - <if condition='isDefined("JO_PREFIX")'> + + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>isDefined("JO_PREFIX")</expression> + </condition> + <if> <then> <include file="${JO_PREFIX}/conditional/includedFile.xml"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedConditionalWithAppenderInclusion.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedConditionalWithAppenderInclusion.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedConditionalWithAppenderInclusion.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedConditionalWithAppenderInclusion.xml 2026-07-09 10:49:48.000000000 +0200 @@ -4,7 +4,10 @@ <appender name="LIST" class="ch.qos.logback.core.read.ListAppender"/> <root level="INFO"> - <if condition='p("missing").equals("true")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("missing","true")</expression> + </condition> + <if> <then> <appender-ref ref="MISSING" /> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedWithInnerConditional.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedWithInnerConditional.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedWithInnerConditional.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/includedWithInnerConditional.xml 2026-07-09 10:49:48.000000000 +0200 @@ -13,7 +13,10 @@ --> <included> - <if condition="true"> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>true</expression> + </condition> + <if> <then> <appender name="CON" class="ch.qos.logback.core.ConsoleAppender"> <encoder> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/siftNestedWithinIfThen.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/siftNestedWithinIfThen.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/siftNestedWithinIfThen.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/siftNestedWithinIfThen.xml 2026-07-09 10:49:48.000000000 +0200 @@ -3,7 +3,10 @@ <configuration debug="false"> - <if condition='property("HOSTNAME") != null'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>isDefined("HOSTNAME")</expression> + </condition> + <if> <then> <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/topConditionalWithAppenderInclusion.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/topConditionalWithAppenderInclusion.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/topConditionalWithAppenderInclusion.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/conditional/topConditionalWithAppenderInclusion.xml 2026-07-09 10:49:48.000000000 +0200 @@ -1,6 +1,9 @@ <configuration> - <if condition='p("missing").equals("true")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("missing","true")</expression> + </condition> + <if> <then> <include optional="true" resource="missing.xml"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/issues/logback_1673bis.xml new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/issues/logback_1673bis.xml --- old/logback-1.5.36/logback-classic-blackbox/src/test/blackboxInput/joran/issues/logback_1673bis.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/blackboxInput/joran/issues/logback_1673bis.xml 2026-07-09 10:49:48.000000000 +0200 @@ -7,7 +7,10 @@ <root level="INFO"/> - <if condition='isDefined("EXTRA")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>isDefined("EXTRA")</expression> + </condition> + <if> <then> <root> <appender-ref ref="LIST_THEN"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-blackbox/src/test/java/module-info.java new/logback-1.5.38/logback-classic-blackbox/src/test/java/module-info.java --- old/logback-1.5.36/logback-classic-blackbox/src/test/java/module-info.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-blackbox/src/test/java/module-info.java 2026-07-09 10:49:48.000000000 +0200 @@ -3,7 +3,6 @@ requires ch.qos.logback.core; requires ch.qos.logback.classic; requires jakarta.mail; - requires janino; requires org.dom4j; requires greenmail; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-classic-misc/pom.xml new/logback-1.5.38/logback-classic-misc/pom.xml --- old/logback-1.5.36/logback-classic-misc/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-classic-misc/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-classic-misc</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/pom.xml new/logback-1.5.38/logback-core/pom.xml --- old/logback-1.5.36/logback-core/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-core</artifactId> @@ -23,18 +23,6 @@ <dependencies> <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>commons-compiler</artifactId> - <scope>compile</scope> - <optional>true</optional> - </dependency> - <dependency> <groupId>org.fusesource.jansi</groupId> <artifactId>jansi</artifactId> <optional>true</optional> @@ -220,8 +208,6 @@ jakarta.*;resolution:=optional, org.xml.*;resolution:=optional, org.fusesource.jansi;resolution:=optional, - org.codehaus.janino;resolution:=optional, - org.codehaus.commons.compiler;resolution:=optional, org.tukaani.xz;resolution:=optional, * </Import-Package> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/boolex/ExpressionPropertyCondition.java new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/boolex/ExpressionPropertyCondition.java --- old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/boolex/ExpressionPropertyCondition.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/boolex/ExpressionPropertyCondition.java 2026-07-09 10:49:48.000000000 +0200 @@ -26,12 +26,13 @@ /** * This class evaluates boolean expressions based on property lookups. - * <p>It supports logical operators (NOT, AND, OR) and functions like isNull, isDefined, - * propertyEquals, and propertyContains. Expressions are parsed using the Shunting-Yard - * algorithm into Reverse Polish Notation (RPN) for evaluation. + * <p>It supports logical operators (NOT, AND, OR), boolean literals ({@code true} and + * {@code false}), and functions like isNull, isDefined, propertyEquals, and propertyContains. + * Expressions are parsed using the Shunting-Yard algorithm into Reverse Polish Notation (RPN) + * for evaluation. * </p> * - * <p>Example expression: {@code isDefined("key1") && propertyEquals("key2", "value")}</p> + * <p>Example expression: {@code true && isDefined("key1") && propertyEquals("key2", "value")}</p> * * <p>Properties are resolved via {@link PropertyConditionBase#property(String)}.</p> * @@ -40,6 +41,8 @@ public class ExpressionPropertyCondition extends PropertyConditionBase { + public static final String MALFORMED_EXPRESSION = "Malformed expression: "; + /** * A map that associates a string key with a function for evaluating boolean conditions. * @@ -64,11 +67,14 @@ protected Map<String, BiFunction<String, String, Boolean>> biFunctionMap = new HashMap<>(); private static final String IS_NULL_FUNCTION_KEY = "isNull"; - private static final String IS_DEFINEDP_FUNCTION_KEY = "isDefined"; + private static final String IS_DEFINED_FUNCTION_KEY = "isDefined"; private static final String PROPERTY_EQUALS_FUNCTION_KEY = "propertyEquals"; private static final String PROPERTY_CONTAINS_FUNCTION_KEY = "propertyContains"; + private static final String TRUE_LITERAL = "true"; + private static final String FALSE_LITERAL = "false"; + private static final char QUOTE = '"'; private static final char COMMA = ','; private static final char LEFT_PAREN = '('; @@ -84,7 +90,7 @@ } enum TokenType { - NOT, AND, OR, FUNCTION, BI_FUNCTION, LEFT_PAREN, RIGHT_PAREN; + NOT, AND, OR, TRUE, FALSE, FUNCTION, BI_FUNCTION, LEFT_PAREN, RIGHT_PAREN; boolean isLogicalOperator() { return this == NOT || this == AND || this == OR; @@ -107,6 +113,8 @@ case NOT: case AND: case OR: + case TRUE: + case FALSE: break; default: throw new IllegalStateException("Unexpected value: " + tokenType); @@ -140,7 +148,7 @@ */ public ExpressionPropertyCondition() { functionMap.put(IS_NULL_FUNCTION_KEY, this::isNull); - functionMap.put(IS_DEFINEDP_FUNCTION_KEY, this::isDefined); + functionMap.put(IS_DEFINED_FUNCTION_KEY, this::isDefined); biFunctionMap.put(PROPERTY_EQUALS_FUNCTION_KEY, this::propertyEquals); biFunctionMap.put(PROPERTY_CONTAINS_FUNCTION_KEY, this::propertyContains); } @@ -161,7 +169,7 @@ List<Token> tokens = tokenize(expression.trim()); this.rpn = infixToReversePolishNotation(tokens); } catch (IllegalArgumentException|IllegalStateException e) { - addError("Malformed expression: " + e.getMessage()); + addError(MALFORMED_EXPRESSION + e.getMessage()); return; } super.start(); @@ -262,7 +270,18 @@ while (i < expr.length() && Character.isLetter(expr.charAt(i))) { sb.append(expr.charAt(i++)); } - String functionName = sb.toString(); + String identifier = sb.toString(); + + if (TRUE_LITERAL.equals(identifier)) { + tokens.add(new Token(TokenType.TRUE)); + continue; + } + if (FALSE_LITERAL.equals(identifier)) { + tokens.add(new Token(TokenType.FALSE)); + continue; + } + + String functionName = identifier; // Skip spaces i = skipWhitespaces(i); @@ -294,6 +313,8 @@ continue; } + + throw new IllegalArgumentException("Unexpected character '" + c + "' at position " + i + " in [" + expr + "]"); } return tokens; } @@ -383,7 +404,11 @@ } private boolean isPredicate(Token token) { - return token.tokenType == TokenType.FUNCTION || token.tokenType == TokenType.BI_FUNCTION; + TokenType tokenType = token.tokenType; + return tokenType == TokenType.FUNCTION + || tokenType == TokenType.BI_FUNCTION + || tokenType == TokenType.TRUE + || tokenType == TokenType.FALSE; } private int precedence(Token token) { @@ -444,8 +469,15 @@ return resultStack.pop(); } - // Evaluate a single predicate like isNull("key1") + // Evaluate a single predicate like isNull("key1") or a boolean literal private boolean evaluateFunctions(Token token) throws IllegalStateException { + if (token.tokenType == TokenType.TRUE) { + return true; + } + if (token.tokenType == TokenType.FALSE) { + return false; + } + String functionName = token.functionName; String param0 = token.param0; String param1 = token.param1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilder.java new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilder.java --- old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilder.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/joran/conditional/PropertyEvalScriptBuilder.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ -/* - * Logback: the reliable, generic, fast and flexible logging framework. - * Copyright (C) 1999-2026, QOS.ch. All rights reserved. - * - * This program and the accompanying materials are dual-licensed under - * either the terms of the Eclipse Public License v2.0 as published by - * the Eclipse Foundation - * - * or (per the licensee's choosing) - * - * under the terms of the GNU Lesser General Public License version 2.1 - * as published by the Free Software Foundation. - */ -package ch.qos.logback.core.joran.conditional; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; - -import ch.qos.logback.core.spi.PropertyContainer; -import org.codehaus.commons.compiler.CompileException; -import org.codehaus.janino.ClassBodyEvaluator; - -import ch.qos.logback.core.spi.ContextAwareBase; - -public class PropertyEvalScriptBuilder extends ContextAwareBase { - - private static String SCRIPT_PREFIX = "" + "public boolean evaluate() { return "; - private static String SCRIPT_SUFFIX = "" + "; }"; - - final PropertyContainer localPropContainer; - - public PropertyEvalScriptBuilder(PropertyContainer localPropContainer) { - this.localPropContainer = localPropContainer; - } - - Map<String, String> map = new HashMap<String, String>(); - - public Condition build(String script) throws IllegalAccessException, CompileException, InstantiationException, - SecurityException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException { - - ClassBodyEvaluator cbe = new ClassBodyEvaluator(); - cbe.setImplementedInterfaces(new Class[] { Condition.class }); - cbe.setExtendedClass(PropertyWrapperForScripts.class); - cbe.setParentClassLoader(ClassBodyEvaluator.class.getClassLoader()); - cbe.cook(SCRIPT_PREFIX + script + SCRIPT_SUFFIX); - - Class<?> clazz = cbe.getClazz(); - Condition instance = (Condition) clazz.getDeclaredConstructor().newInstance(); - Method setMapMethod = clazz.getMethod("setPropertyContainers", PropertyContainer.class, - PropertyContainer.class); - setMapMethod.invoke(instance, localPropContainer, context); - - return instance; - } - -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/ByPropertiesConditionModelHandler.java new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/ByPropertiesConditionModelHandler.java --- old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/ByPropertiesConditionModelHandler.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/ByPropertiesConditionModelHandler.java 2026-07-09 10:49:48.000000000 +0200 @@ -29,6 +29,10 @@ public class ByPropertiesConditionModelHandler extends ModelHandlerBase { + static final String EVALUTATOR_IS_IN_ERROR_MSG0 = "The [if] statement will be marked IN_ERROR and none of its branches will be executed."; + static final String EVALUTATOR_IS_IN_ERROR_MSG1 = "The [if] statement will be marked IN_ERROR and none of its branches will be executed."; + + private boolean inError = false; PropertyCondition propertyEvaluator; @@ -88,6 +92,7 @@ propertyEvaluator.start(); if(!propertyEvaluator.isStarted()) { addError("PropertyEvaluator of type ["+propertyEvaluator.getClass().getName()+"] did not start successfully."); + addError(EVALUTATOR_IS_IN_ERROR_MSG0); mic.pushObject(IfModel.BranchState.IN_ERROR); return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/IfModelHandler.java new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/IfModelHandler.java --- old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/IfModelHandler.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/model/processor/conditional/IfModelHandler.java 2026-07-09 10:49:48.000000000 +0200 @@ -18,7 +18,6 @@ import ch.qos.logback.core.Context; import ch.qos.logback.core.CoreConstants; import ch.qos.logback.core.joran.conditional.Condition; -import ch.qos.logback.core.joran.conditional.PropertyEvalScriptBuilder; import ch.qos.logback.core.model.Model; import ch.qos.logback.core.model.conditional.IfModel; import ch.qos.logback.core.model.conditional.IfModel.BranchState; @@ -75,62 +74,6 @@ ifModel.setBranchState(branchState); // consume the BranchState at top of the object stack mic.popObject(); - } else { - janinoFallback(mic, model, conditionStr); - } - } - - private void janinoFallback(ModelInterpretationContext mic, Model model, String conditionStr) { - if (!EnvUtil.isJaninoAvailable()) { - addError(MISSING_JANINO_MSG); - addError(MISSING_JANINO_SEE); - return; - } - - Condition condition = null; - int lineNum = model.getLineNumber(); - - if (!OptionHelper.isNullOrEmptyOrAllSpaces(conditionStr)) { - try { - conditionStr = OptionHelper.substVars(conditionStr, mic, context); - } catch (ScanException e) { - addError("Failed to parse input [" + conditionStr + "] on line "+lineNum, e); - ifModel.setBranchState(BranchState.IN_ERROR); - return; - } - - if(OptionHelper.containsUnicodeEscape(conditionStr)) { - addError(UNICODE_DISALLOWED_MSG); - addError(UNICODE_DISALLOWED_SEE); - return; - } - - // do not allow 'new' operator - if(hasBlacklistedReferences(conditionStr)) { - addError(BLACKLISTED_REF_DISALLOWED_MSG); - addError(BLACKLISTED_REF_DISALLOWED_SEE); - return; - } - - try { - PropertyEvalScriptBuilder pesb = new PropertyEvalScriptBuilder(mic); - pesb.setContext(context); - condition = pesb.build(conditionStr); - } catch (Exception|NoClassDefFoundError e) { - ifModel.setBranchState(BranchState.IN_ERROR); - addError("Failed to parse condition [" + conditionStr + "] on line "+lineNum, e); - return; - } - - if (condition != null) { - boolean boolResult = condition.evaluate(); - addInfo("Condition ["+conditionStr+"] evaluated to "+boolResult+ " on line "+lineNum); - ifModel.setBranchState(boolResult); - } else { - addError("The condition variable is null. This should not occur."); - ifModel.setBranchState(BranchState.IN_ERROR); - return; - } } } @@ -143,16 +86,6 @@ } - static String[] BLACKLISTED_REFERENCES_IN_CONDITIONAL = new String[] {"new ", "Runtime", "springframework"}; - - static boolean hasBlacklistedReferences(String conditionStr) { - for (String fishyReference : BLACKLISTED_REFERENCES_IN_CONDITIONAL) { - if (conditionStr.contains(fishyReference)) { - return true; - } - } - return false; - } @Override public void postHandle(ModelInterpretationContext mic, Model model) throws ModelHandlerException { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/net/HardenedObjectInputStream.java new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/net/HardenedObjectInputStream.java --- old/logback-1.5.36/logback-core/src/main/java/ch/qos/logback/core/net/HardenedObjectInputStream.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/ch/qos/logback/core/net/HardenedObjectInputStream.java 2026-07-09 10:49:48.000000000 +0200 @@ -53,7 +53,7 @@ "java.lang.Number", "java.lang.Short", "java.lang.String", - "java,lang.Throwable", + "java.lang.Throwable", "java.util.ArrayList", "java.util.Collections$EmptyMap", "java.util.Collections$UnmodifiableMap", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/main/java/module-info.java new/logback-1.5.38/logback-core/src/main/java/module-info.java --- old/logback-1.5.36/logback-core/src/main/java/module-info.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/main/java/module-info.java 2026-07-09 10:49:48.000000000 +0200 @@ -5,9 +5,6 @@ // required by the optional SMTPAppenderBase component requires static java.naming; - requires static janino; - requires static commons.compiler; - // transitive _imposes_ the presence of jakarta.mail on downstream users, // let them declare it if they need it requires static jakarta.mail; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/test/java/ch/qos/logback/core/boolex/ExpressionPropertyConditionTest.java new/logback-1.5.38/logback-core/src/test/java/ch/qos/logback/core/boolex/ExpressionPropertyConditionTest.java --- old/logback-1.5.36/logback-core/src/test/java/ch/qos/logback/core/boolex/ExpressionPropertyConditionTest.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/test/java/ch/qos/logback/core/boolex/ExpressionPropertyConditionTest.java 2026-07-09 10:49:48.000000000 +0200 @@ -17,9 +17,12 @@ import ch.qos.logback.core.Context; import ch.qos.logback.core.ContextBase; import ch.qos.logback.core.model.processor.ModelInterpretationContext; +import ch.qos.logback.core.status.testUtil.StatusChecker; +import ch.qos.logback.core.util.StatusPrinter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import static ch.qos.logback.core.boolex.ExpressionPropertyCondition.MALFORMED_EXPRESSION; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -29,7 +32,7 @@ Context context = new ContextBase(); ModelInterpretationContext mic = new ModelInterpretationContext(context); ExpressionPropertyCondition epc = new ExpressionPropertyCondition(); - + StatusChecker statusChecker = new StatusChecker(context); static final String SMOKE_KEY = "SMOKE_KEY"; static final String UNDEFINED_KEY = "UNDEFINED_KEY"; @@ -105,6 +108,59 @@ check(expression, false); } + @Test + public void trueLiteral() { + check("true", true); + } + + @Test + public void falseLiteral() { + check("false", false); + } + + @Test + public void trueAndSmokeDefined() { + String expression = String.format("true && isDefined(\"%s\")", SMOKE_KEY); + check(expression, true); + } + + @Test + public void falseOrSmokeDefined() { + String expression = String.format("false || isDefined(\"%s\")", SMOKE_KEY); + check(expression, true); + } + + @Test + public void notFalse() { + check("!false", true); + } + + @Test + public void trueAndFalse() { + check("true && false", false); + } + + @Test + public void dotIsUnexpectedCharacter() { + epc.setExpression("."); + epc.start(); + + assertFalse(epc.isStarted()); + assertFalse(epc.evaluate()); + + statusChecker.assertContainsMatch(MALFORMED_EXPRESSION); + } + + @Test + public void numerical() { + epc.setExpression("1 != 2"); + epc.start(); + assertFalse(epc.isStarted()); + assertFalse(epc.evaluate()); + statusChecker.assertContainsMatch(MALFORMED_EXPRESSION); + } + + void check(String expression, boolean expected) { epc.setExpression(expression); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core/src/test/java/ch/qos/logback/core/model/processor/conditional/IfModelHandlerTest.java new/logback-1.5.38/logback-core/src/test/java/ch/qos/logback/core/model/processor/conditional/IfModelHandlerTest.java --- old/logback-1.5.36/logback-core/src/test/java/ch/qos/logback/core/model/processor/conditional/IfModelHandlerTest.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core/src/test/java/ch/qos/logback/core/model/processor/conditional/IfModelHandlerTest.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,18 +0,0 @@ -package ch.qos.logback.core.model.processor.conditional; - -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; - -public class IfModelHandlerTest { - - - @Test - public void testBlacklistedRefs() throws Exception { - assertFalse(IfModelHandler.hasBlacklistedReferences("true")); - assertTrue(IfModelHandler.hasBlacklistedReferences("new Integer(1)")); - assertTrue(IfModelHandler.hasBlacklistedReferences("org.springframework")); - assertTrue(IfModelHandler.hasBlacklistedReferences("java.lang.Runtime")); - } -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/pom.xml new/logback-1.5.38/logback-core-blackbox/pom.xml --- old/logback-1.5.36/logback-core-blackbox/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-core-blackbox</artifactId> @@ -24,12 +24,6 @@ </dependency> <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <scope>compile</scope> - </dependency> - - <dependency> <groupId>org.fusesource.jansi</groupId> <artifactId>jansi</artifactId> <scope>compile</scope> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if0.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if0.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if0.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if0.xml 2026-07-09 10:49:48.000000000 +0200 @@ -2,7 +2,10 @@ <x> <stack name="BEGIN"/> - <if condition='p("ki1").equals("val1")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("ki1", "val1")</expression> + </condition> + <if> <then> <stack name="a"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifBogusExpression0.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifBogusExpression0.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifBogusExpression0.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifBogusExpression0.xml 2026-07-09 10:49:48.000000000 +0200 @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<x> + <stack name="BEGIN"/> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>property("ki1").equals("val1")</expression> + </condition> + <if> + <then> + <stack name="a"/> + </then> + <else> + <stack name="b"/> + </else> + </if> + <stack name="END"/> +</x> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNew.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNew.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNew.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNew.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<x> - <stack name="BEGIN"/> - <if condition='new Integer(1).equals(1)'> - <then> - <stack name="a"/> - </then> - <else> - <stack name="b"/> - </else> - </if> - <stack name="END"/> -</x> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNewSlashU.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNewSlashU.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNewSlashU.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifNewSlashU.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<x> - <stack name="BEGIN"/> - <if condition='n\u0067w Integer(1).equals(1)'> - <then> - <stack name="a"/> - </then> - <else> - <stack name="b"/> - </else> - </if> - <stack name="END"/> -</x> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifSystem.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifSystem.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifSystem.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifSystem.xml 2026-07-09 10:49:48.000000000 +0200 @@ -3,6 +3,9 @@ <x> <stack name="BEGIN"/> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>isNull("sysKey")</expression> + </condition> <if condition='isNull("sysKey")'> <then> <property scope="context" name="dynaKey" value="dynaVal"/> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifWithoutElse.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifWithoutElse.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifWithoutElse.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/ifWithoutElse.xml 2026-07-09 10:49:48.000000000 +0200 @@ -2,7 +2,10 @@ <x> <stack name="BEGIN"/> - <if condition='p("ki1").equals("val1")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("ki1", "val1")</expression> + </condition> + <if> <then> <stack name="a"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if_localProperty.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if_localProperty.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if_localProperty.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/if_localProperty.xml 2026-07-09 10:49:48.000000000 +0200 @@ -3,7 +3,10 @@ <x> <stack name="BEGIN"/> <property name="Ki1" value="Val1"/> - <if condition='p("Ki1").equals("Val1")'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>propertyEquals("Ki1","Val1")</expression> + </condition> + <if> <then> <stack name="a"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/nestedIf.xml new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/nestedIf.xml --- old/logback-1.5.36/logback-core-blackbox/src/test/blackboxInput/joran/conditional/nestedIf.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/blackboxInput/joran/conditional/nestedIf.xml 2026-07-09 10:49:48.000000000 +0200 @@ -4,10 +4,16 @@ <x> <stack name="BEGIN"/> - <if condition='1 == 1'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>true</expression> + </condition> + <if> <then> <stack name="a"/> - <if condition='1 != 1'> + <condition class="ch.qos.logback.core.boolex.ExpressionPropertyCondition"> + <expression>false</expression> + </condition> + <if> <then> <stack name="b"/> </then> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/IfThenElseTest.java new/logback-1.5.38/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/IfThenElseTest.java --- old/logback-1.5.36/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/IfThenElseTest.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/IfThenElseTest.java 2026-07-09 10:49:48.000000000 +0200 @@ -48,6 +48,7 @@ import ch.qos.logback.core.status.Status; import ch.qos.logback.core.status.StatusUtil; import ch.qos.logback.core.testUtil.RandomUtil; +import ch.qos.logback.core.util.StatusPrinter; import ch.qos.logback.core.util.StatusPrinter2; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; @@ -121,13 +122,7 @@ System.clearProperty(sysKey); } - @Test - public void ifWithExec() throws JoranException { - context.putProperty(ki1, val1); - simpleConfigurator.doConfigure(CONDITIONAL_DIR_PREFIX + "ifWithExec.xml"); - checker.containsException(org.codehaus.commons.compiler.CompileException.class); - checker.containsMatch(Status.ERROR, "Failed to parse condition"); - } + // ---------------------------------------------------------------------------------------------------- @Test public void whenContextPropertyIsSet_IfThenBranchIsEvaluated() throws JoranException { @@ -146,25 +141,6 @@ verifyConfig(new String[] { "BEGIN", "a", "END" }); } // ---------------------------------------------------------------------------------------------------- - @Test - public void ifWithNew() throws JoranException { - context.putProperty(ki1, val1); - simpleConfigurator.doConfigure(CONDITIONAL_DIR_PREFIX + "ifNew.xml"); - assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.BLACKLISTED_REF_DISALLOWED_MSG)); - assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.BLACKLISTED_REF_DISALLOWED_SEE)); - verifyConfig(new String[] { "BEGIN", "END" }); - } - - @Test - public void ifWithNewSlashU() throws JoranException { - context.putProperty(ki1, val1); - simpleConfigurator.doConfigure(CONDITIONAL_DIR_PREFIX + "ifNewSlashU.xml"); - assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.UNICODE_DISALLOWED_MSG)); - assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.UNICODE_DISALLOWED_SEE)); - // assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.NEW_OPERATOR_DISALLOWED_MSG)); - //assertTrue(checker.containsMatch(Status.ERROR, IfModelHandler.NEW_OPERATOR_DISALLOWED_SEE)); - verifyConfig(new String[] { "BEGIN", "END" }); - } // ---------------------------------------------------------------------------------------------------- @@ -272,7 +248,15 @@ System.out.println(dynaKey + "=" + context.getProperty(dynaKey)); Assertions.assertNull(context.getProperty(dynaKey)); } - // ---------------------------------------------------------------------------------------------------- + @Test + public void badExpression0() throws JoranException { + simpleConfigurator.doConfigure(CONDITIONAL_DIR_PREFIX + "ifBogusExpression0.xml"); + StatusPrinter.print(context); + // the whole if block is skipped + verifyConfig(new String[] { "BEGIN", "END" }); + } + + // ---------------------------------------------------------------------------------------------------- private void verifyConfig(String[] expected) { Stack<String> witness = new Stack<>(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/PropertyEvalScriptBuilderTest.java new/logback-1.5.38/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/PropertyEvalScriptBuilderTest.java --- old/logback-1.5.36/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/PropertyEvalScriptBuilderTest.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/java/ch/qos/logback/core/blackbox/joran/conditional/PropertyEvalScriptBuilderTest.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,122 +0,0 @@ -/* - * Logback: the reliable, generic, fast and flexible logging framework. - * Copyright (C) 1999-2026, QOS.ch. All rights reserved. - * - * This program and the accompanying materials are dual-licensed under - * either the terms of the Eclipse Public License v2.0 as published by - * the Eclipse Foundation - * - * or (per the licensee's choosing) - * - * under the terms of the GNU Lesser General Public License version 2.1 - * as published by the Free Software Foundation. - */ -package ch.qos.logback.core.blackbox.joran.conditional; - -import ch.qos.logback.core.joran.conditional.Condition; -import ch.qos.logback.core.joran.conditional.PropertyEvalScriptBuilder; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import ch.qos.logback.core.Context; -import ch.qos.logback.core.ContextBase; -import ch.qos.logback.core.model.processor.ModelInterpretationContext; -import ch.qos.logback.core.testUtil.RandomUtil; - -public class PropertyEvalScriptBuilderTest { - - Context context = new ContextBase(); - ModelInterpretationContext localPropContainer = new ModelInterpretationContext(context); - PropertyEvalScriptBuilder pesb = new PropertyEvalScriptBuilder(localPropContainer); - int diff = RandomUtil.getPositiveInt(); - - String k = "ka" + diff; - String v = "va"; - String containsScript = "p(\"" + k + "\").contains(\"" + v + "\")"; - - String isNullScriptStr = "isNull(\"" + k + "\")"; - String isDefiedScriptStr = "isDefined(\"" + k + "\")"; - - @BeforeEach - public void setUp() { - context.setName("c" + diff); - pesb.setContext(context); - } - - @AfterEach - public void tearDown() { - System.clearProperty(k); - } - - void buildAndAssertTrue(String scriptStr) throws Exception { - Condition condition = pesb.build(scriptStr); - Assertions.assertNotNull(condition); - Assertions.assertTrue(condition.evaluate()); - } - - void buildAndAssertFalse(String scriptStr) throws Exception { - Condition condition = pesb.build(scriptStr); - Assertions.assertNotNull(condition); - Assertions.assertFalse(condition.evaluate()); - } - - @Test - public void existingLocalPropertyShouldEvaluateToTrue() throws Exception { - localPropContainer.addSubstitutionProperty(k, v); - buildAndAssertTrue(containsScript); - } - - @Test - public void existingContextPropertyShouldEvaluateToTrue() throws Exception { - context.putProperty(k, v); - buildAndAssertTrue(containsScript); - } - - @Test - public void existingSystemPropertyShouldEvaluateToTrue() throws Exception { - System.setProperty(k, v); - buildAndAssertTrue(containsScript); - } - - @Test - public void isNullForExistingLocalProperty() throws Exception { - localPropContainer.addSubstitutionProperty(k, v); - buildAndAssertFalse(isNullScriptStr); - } - - @Test - public void isNullForExistingContextProperty() throws Exception { - context.putProperty(k, v); - buildAndAssertFalse(isNullScriptStr); - } - - @Test - public void isNullForExistingSystemProperty() throws Exception { - System.setProperty(k, v); - buildAndAssertFalse(isNullScriptStr); - } - - @Test - public void inexistentPropertyShouldEvaluateToFalse() throws Exception { - buildAndAssertFalse(containsScript); - } - - @Test - public void isNullForInexistentPropertyShouldEvaluateToTrue() throws Exception { - buildAndAssertTrue(isNullScriptStr); - } - - public void isDefinedForIExistimgtPropertyShouldEvaluateToTrue() throws Exception { - localPropContainer.addSubstitutionProperty(k, v); - buildAndAssertTrue(isDefiedScriptStr); - } - - @Test - public void isDefinedForInexistentPropertyShouldEvaluateToTrue() throws Exception { - buildAndAssertFalse(isDefiedScriptStr); - } - -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-core-blackbox/src/test/java/module-info.java new/logback-1.5.38/logback-core-blackbox/src/test/java/module-info.java --- old/logback-1.5.36/logback-core-blackbox/src/test/java/module-info.java 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-core-blackbox/src/test/java/module-info.java 2026-07-09 10:49:48.000000000 +0200 @@ -5,9 +5,6 @@ requires org.junit.jupiter.api; requires org.junit.jupiter.engine; - requires janino; - requires commons.compiler; - requires org.fusesource.jansi; requires org.tukaani.xz; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/logback-examples/pom.xml new/logback-1.5.38/logback-examples/pom.xml --- old/logback-1.5.36/logback-examples/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/logback-examples/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <parent> <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> </parent> <artifactId>logback-examples</artifactId> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logback-1.5.36/pom.xml new/logback-1.5.38/pom.xml --- old/logback-1.5.36/pom.xml 2026-06-25 21:10:00.000000000 +0200 +++ new/logback-1.5.38/pom.xml 2026-07-09 10:49:48.000000000 +0200 @@ -8,7 +8,7 @@ <groupId>ch.qos.logback</groupId> <artifactId>logback-parent</artifactId> - <version>1.5.36</version> + <version>1.5.38</version> <packaging>pom</packaging> <name>Logback-Parent</name> @@ -55,7 +55,7 @@ <properties> <!-- yyyy-MM-dd'T'HH:mm:ss'Z' --> - <project.build.outputTimestamp>2026-06-25T19:09:00Z</project.build.outputTimestamp> + <project.build.outputTimestamp>2026-07-09T08:49:00Z</project.build.outputTimestamp> <!-- minimal JDK version at runtime --> <jdk.version>11</jdk.version> @@ -76,7 +76,6 @@ <jakarta.servlet.version>5.0.0</jakarta.servlet.version> <greenmail.version>2.1.7</greenmail.version> - <janino.version>3.1.8</janino.version> <!-- slf4j.version property is used below, in logback-classic/pom.xml, /logback-examples/src/main/resources/setClasspath.cmd, download.html --> @@ -110,6 +109,7 @@ <maven-dependency-plugin.version>3.2.0</maven-dependency-plugin.version> <maven-bundle-plugin.version>5.1.9</maven-bundle-plugin.version> <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version> + <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version> <ant.version>1.10.13</ant.version> <cobertura.maven.plugin.version>2.7</cobertura.maven.plugin.version> <jetty.version>12.0.13</jetty.version> @@ -213,16 +213,6 @@ <artifactId>xz</artifactId> <version>${xz.version}</version> </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>janino</artifactId> - <version>${janino.version}</version> - </dependency> - <dependency> - <groupId>org.codehaus.janino</groupId> - <artifactId>commons-compiler</artifactId> - <version>${janino.version}</version> - </dependency> <dependency> <groupId>org.fusesource.jansi</groupId> @@ -501,36 +491,6 @@ <maven.test.skip>true</maven.test.skip> </properties> </profile> - <profile> - <id>license</id> - <build> - <plugins> - <plugin> - <groupId>com.mycila</groupId> - <artifactId>license-maven-plugin</artifactId> - <version>${license-maven-plugin.version}</version> - <configuration> - <header>src/main/licenseHeader.txt</header> - <quiet>false</quiet> - <failIfMissing>true</failIfMissing> - <aggregate>true</aggregate> - <includes> - <include>src/**/*.java</include> - <include>src/**/*.groovy</include> - </includes> - <useDefaultExcludes>true</useDefaultExcludes> - <useDefaultMapping>true</useDefaultMapping> - <properties> - <year>1999</year> - </properties> - <headerDefinitions> - <headerDefinition>src/main/javadocHeaders.xml</headerDefinition> - </headerDefinitions> - </configuration> - </plugin> - </plugins> - </build> - </profile> <profile> <id>javadocjar</id> @@ -566,7 +526,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> - <version>1.6</version> + <version>${maven-gpg-plugin.version}</version> <executions> <execution> <id>sign-artifacts</id>
