Skip to content

Have org.apache.logging.log4j.util.Base64Util invoke java.util.Base64 directly instead of reflectively #3686

Closed
@jluehe

Description

@jluehe

Description

org.apache.logging.log4j:log4j-api:2.24.3 is not Jakarta EE9 compatible, because its log4j-api/src/main/java/org/apache/logging/log4j/util/Base64Util.java resource contains a reference to javax.xml.bind.DataTypeConverter, see https://github.com/apache/logging-log4j2/blob/rel/2.24.3/log4j-api/src/main/java/org/apache/logging/log4j/util/Base64Util.java#L45

javax.xml.bind.DataTypeConverter has been used as a fallback in case java.util.Base64 was not available.

However, given that Java 8 has been the baseline since 2.13.0, java.util.Base64 can be invoked directly (instead of reflectively), and the javax.xml.bind.DataTypeConverter fallback is no longer required.

See #3682 for more details.

Configuration

Version: [Log4j version]
2.24.3

Operating system: [OS and version]

JDK: [JDK distribution and version]

Logs

[Stacktraces, errors, etc. relevant applications logs.]

Reproduction

[An isolated test reproducing the test.
JUnit tests similar to the ones in the code base are extremely appreciated.]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions