diff --git a/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java b/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java index 32824f308..1d8038bc3 100644 --- a/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/AnnotationUtilsTest.java @@ -388,6 +388,8 @@ public class AnnotationUtilsTest { long timeout() default 0L; class None extends Throwable { + + private static final long serialVersionUID = 1L; } } diff --git a/src/test/java/org/apache/commons/lang3/exception/CustomCheckedException.java b/src/test/java/org/apache/commons/lang3/exception/CustomCheckedException.java index 9982d094c..ba7829355 100644 --- a/src/test/java/org/apache/commons/lang3/exception/CustomCheckedException.java +++ b/src/test/java/org/apache/commons/lang3/exception/CustomCheckedException.java @@ -19,6 +19,8 @@ package org.apache.commons.lang3.exception; public class CustomCheckedException extends Exception { + private static final long serialVersionUID = 1L; + public CustomCheckedException() { super(); } diff --git a/src/test/java/org/apache/commons/lang3/exception/CustomUncheckedException.java b/src/test/java/org/apache/commons/lang3/exception/CustomUncheckedException.java index fc53005af..d0f53674e 100644 --- a/src/test/java/org/apache/commons/lang3/exception/CustomUncheckedException.java +++ b/src/test/java/org/apache/commons/lang3/exception/CustomUncheckedException.java @@ -19,6 +19,8 @@ package org.apache.commons.lang3.exception; public class CustomUncheckedException extends RuntimeException { + private static final long serialVersionUID = 1L; + public CustomUncheckedException() { super(); } diff --git a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java index acbc438bd..10fd6af2c 100644 --- a/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/exception/ExceptionUtilsTest.java @@ -702,6 +702,8 @@ public class ExceptionUtilsTest { @DisplayName("getStackFrames returns empty string array when the argument is null") public void testgetStackFramesHappyPath() { final String[] actual = ExceptionUtils.getStackFrames(new Throwable() { + private static final long serialVersionUID = 1L; + // provide static stack trace to make test stable @Override public void printStackTrace(final PrintWriter s) {