Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-16374984: Upgrade held back libraries because of dropped java 8 support #13765

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,18 +154,7 @@ static void doValidateArguments(List<String> arguments) {
public static void exploreJdkModules(Set<String> packages) {
boot().modules()
.stream()
.filter(module -> {
final String moduleName = module.getName();

// Original intention is to only expose standard java modules...
return moduleName.startsWith("java.")
// TODO W-16374984:
// ... but because we need to keep compatibility with Java 8, older versions of some libraries use internal JDK
// modules packages:
// * caffeine 2.x still uses sun.misc.Unsafe. Ref: https://github.com/ben-manes/caffeine/issues/273
// * obgenesis SunReflectionFactoryHelper, used by Mockito
|| moduleName.startsWith("jdk.");
})
.filter(module -> module.getName().startsWith("java."))
.forEach(module -> packages.addAll(module.getPackages()));
}

Expand Down
3 changes: 0 additions & 3 deletions modules/logging/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
*/
module org.mule.runtime.logging {

// Allows usage of Unsafe for caffeine and disruptor libraries, used by the logging framework
requires jdk.unsupported;

// Logging framework
requires org.slf4j;
requires org.apache.logging.log4j;
Expand Down