Add missing serialVersionUID declarations in tests

This commit is contained in:
Gary Gregory 2022-05-30 08:49:50 -04:00
parent 6ebaad61fe
commit 803aa24db0
4 changed files with 8 additions and 0 deletions

View File

@ -388,6 +388,8 @@ public class AnnotationUtilsTest {
long timeout() default 0L;
class None extends Throwable {
private static final long serialVersionUID = 1L;
}
}

View File

@ -19,6 +19,8 @@ package org.apache.commons.lang3.exception;
public class CustomCheckedException extends Exception {
private static final long serialVersionUID = 1L;
public CustomCheckedException() {
super();
}

View File

@ -19,6 +19,8 @@ package org.apache.commons.lang3.exception;
public class CustomUncheckedException extends RuntimeException {
private static final long serialVersionUID = 1L;
public CustomUncheckedException() {
super();
}

View File

@ -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) {