diff --git a/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 240a290a36..f94e85f668 100644 --- a/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -132,7 +132,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +import org.apache.logging.log4j.core.appender.rewrite.RewritePolicy; +import org.apache.logging.log4j.core.config.plugins.Plugin; +import org.apache.logging.log4j.core.config.plugins.PluginFactory; -+import org.jetbrains.annotations.NotNull; ++import org.apache.logging.log4j.core.impl.Log4jLogEvent; ++import org.checkerframework.checker.nullness.qual.NonNull; + +@Plugin( + name = "StacktraceDeobfuscatingRewritePolicy", @@ -141,17 +142,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + printObject = true +) +public final class StacktraceDeobfuscatingRewritePolicy implements RewritePolicy { ++ private StacktraceDeobfuscatingRewritePolicy() { ++ } ++ + @Override -+ public @NotNull LogEvent rewrite(final @NotNull LogEvent rewrite) { ++ public @NonNull LogEvent rewrite(final @NonNull LogEvent rewrite) { + final Throwable thrown = rewrite.getThrown(); + if (thrown != null) { + StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thrown); ++ return new Log4jLogEvent.Builder(rewrite) ++ .setThrownProxy(null) ++ .build(); + } + return rewrite; + } + + @PluginFactory -+ public static @NotNull StacktraceDeobfuscatingRewritePolicy createPolicy() { ++ public static @NonNull StacktraceDeobfuscatingRewritePolicy createPolicy() { + return new StacktraceDeobfuscatingRewritePolicy(); + } +} diff --git a/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch index dd46eae415..a6c29fb1fd 100644 --- a/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch +++ b/patches/server/Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch @@ -234,22 +234,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -0,0 +0,0 @@ - - - -- -+ -@@ -0,0 +0,0 @@ - - - ++ ++ + + -+ -+ - - - + + +