Skip to content

Commit

Permalink
fix LOGBACK-1689
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <[email protected]>
  • Loading branch information
ceki committed Oct 2, 2022
1 parent 967d736 commit fc78b86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 29 deletions.
23 changes: 3 additions & 20 deletions logback-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<properties>
<module-name>ch.qos.logback.core</module-name>
</properties>

<dependencies>

<dependency>
Expand Down Expand Up @@ -72,20 +72,6 @@
<build>
<plugins>

<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.self="append">
<compilerArgs>
<arg>XXadd-reads</arg>
<arg>ch.qos.logback.core=ch.qos.logback.core=org.codehaus.janino.commons.compiler,org.codehaus.janino.janino</arg>
</compilerArgs>
</configuration>
</plugin>
-->


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -113,17 +99,14 @@
<!-- ConsoleAppenderTest redirects System.out which is not well tolerated by Maven -->
<exclude>**/ConsoleAppenderTest.java</exclude>

<!-- temporary -->
<exclude>**/IfThenElseTest.java</exclude>
<exclude>**/PropertyEvalScriptBuilderTest.java</exclude>

</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>

<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
Expand All @@ -145,7 +128,7 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>

<executions>
<execution>
<id>bundle-manifest</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ public void handle(ModelInterpretationContext mic, Model model) throws ModelHand
ifModel.setBranchState(BranchState.IN_ERROR);
return;
}
PropertyEvalScriptBuilder pesb = new PropertyEvalScriptBuilder(mic);
pesb.setContext(context);

try {
PropertyEvalScriptBuilder pesb = new PropertyEvalScriptBuilder(mic);
pesb.setContext(context);
condition = pesb.build(conditionStr);
} catch (Exception e) {
} catch (Exception|NoClassDefFoundError e) {
ifModel.setBranchState(BranchState.IN_ERROR);
addError("Failed to parse condition [" + conditionStr + "] on line "+lineNum, e);
return;
Expand Down
8 changes: 2 additions & 6 deletions logback-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
requires static transitive java.naming;
requires static transitive java.xml;
requires static transitive jakarta.mail;
//requires static jakarta.activation;

// jakarta.servlet 5.0 is not modular
// jakarta.servlet 5.0 is not modular so it cannot be declared 'transitive'
requires static jakarta.servlet;

requires static janino;
requires static commons.compiler;

//requires static org.codehaus.janino.janino;
//requires static org.codehaus.janino.commons.compiler;


exports ch.qos.logback.core;
exports ch.qos.logback.core.boolex;

Expand Down

0 comments on commit fc78b86

Please sign in to comment.