From c73486c38bb3914a85387a403b3c3c5b280140d1 Mon Sep 17 00:00:00 2001 From: Wagyourtail Date: Mon, 30 Sep 2024 17:49:37 -0500 Subject: [PATCH] just make all private ctor package-private to fix lambda's referencing --- .../xyz/wagyourtail/jvmdg/providers/Java11Downgrader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java-api/src/main/java/xyz/wagyourtail/jvmdg/providers/Java11Downgrader.java b/java-api/src/main/java/xyz/wagyourtail/jvmdg/providers/Java11Downgrader.java index b2ded25..23db466 100644 --- a/java-api/src/main/java/xyz/wagyourtail/jvmdg/providers/Java11Downgrader.java +++ b/java-api/src/main/java/xyz/wagyourtail/jvmdg/providers/Java11Downgrader.java @@ -123,6 +123,11 @@ public ClassNode otherTransforms(ClassNode clazz, Set extra, Function } public void fixNests(ClassNode clazz, Function getReadOnly) { + for (MethodNode method : clazz.methods) { + if (method.name.equals("")) { + method.access &= ~Opcodes.ACC_PRIVATE; + } + } if (clazz.nestHostClass == null) { fixNestsForParent(clazz, getReadOnly); } else {