From 2caef35c172897cbdd21d163c55305a64649ce41 Mon Sep 17 00:00:00 2001 From: Rafael Winterhalter Date: Fri, 19 Jan 2024 13:12:03 +0100 Subject: [PATCH] Avoid compiler warnings. --- .../build/gradle/AbstractByteBuddyTaskConfiguration.java | 1 + .../main/java/net/bytebuddy/build/gradle/ByteBuddyJarTask.java | 1 + .../java/net/bytebuddy/build/gradle/ByteBuddySimpleTask.java | 1 + .../main/java/net/bytebuddy/build/gradle/ByteBuddyTask.java | 1 + .../main/java/net/bytebuddy/build/gradle/PluginArgument.java | 3 ++- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractByteBuddyTaskConfiguration.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractByteBuddyTaskConfiguration.java index c300b52ff0b..08270934203 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractByteBuddyTaskConfiguration.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/AbstractByteBuddyTaskConfiguration.java @@ -199,6 +199,7 @@ public void execute(TaskExecutionGraph graph) { * A closure to execute an action on the {@link TaskExecutionGraph}. Older Gradle versions do not offer an overloaded method that accepts an * action such that a dispatch requires an explicit wrapping with a {@link Closure}. */ + @SuppressWarnings("serial") protected static class TaskExecutionGraphClosure extends Closure { /** diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyJarTask.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyJarTask.java index ffc1e666c64..b3ace9a6809 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyJarTask.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyJarTask.java @@ -55,6 +55,7 @@ public class ByteBuddyJarTask extends AbstractByteBuddyTask { * Creates a new simple Byte Buddy task. */ @Inject + @SuppressWarnings("this-escape") public ByteBuddyJarTask() { new ByteBuddyJarTaskExtension(null).configure(this); } diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddySimpleTask.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddySimpleTask.java index e18c96e30b7..c351a8ae842 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddySimpleTask.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddySimpleTask.java @@ -55,6 +55,7 @@ public class ByteBuddySimpleTask extends AbstractByteBuddyTask { * Creates a new simple Byte Buddy task. */ @Inject + @SuppressWarnings("this-escape") public ByteBuddySimpleTask() { new ByteBuddySimpleTaskExtension(null).configure(this); } diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyTask.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyTask.java index c1a5b35433e..69a8ddfbac0 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyTask.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyTask.java @@ -51,6 +51,7 @@ public abstract class ByteBuddyTask extends AbstractByteBuddyTask { * Creates a new Byte Buddy task. */ @Inject + @SuppressWarnings("this-escape") public ByteBuddyTask() { new ByteBuddyTaskExtension(null).configure(this); } diff --git a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/PluginArgument.java b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/PluginArgument.java index ae7d0f587af..ad1cadf4e3f 100644 --- a/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/PluginArgument.java +++ b/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/PluginArgument.java @@ -25,7 +25,7 @@ import java.io.Serializable; /** - * Describes an argument to a {@link Plugin} constuctor. + * Describes an argument to a {@link Plugin} constructor. */ public class PluginArgument implements Serializable { @@ -43,6 +43,7 @@ public class PluginArgument implements Serializable { * The argument value. */ @MaybeNull + @SuppressWarnings("serial") private Object value; /**