feat: Using @Serial (#2806)

This commit is contained in:
cboy authored and GitHub committed 2024-03-10 11:44:40 +02:00
1 parent 4dd758b1be
commit eacfb13ebf
2 files changed
+6

No files matched your search

@@ -24,6 +24,8 @@
*/ */
package com.iluwatar.retry; package com.iluwatar.retry;
import java.io.Serial;
/** /**
* The top-most type in our exception hierarchy that signifies that an unexpected error condition * The top-most type in our exception hierarchy that signifies that an unexpected error condition
* occurred. Its use is reserved as a "catch-all" for cases where no other subtype captures the * occurred. Its use is reserved as a "catch-all" for cases where no other subtype captures the
@@ -33,6 +35,7 @@ package com.iluwatar.retry;
* @author George Aristy (george.aristy@gmail.com) * @author George Aristy (george.aristy@gmail.com)
*/ */
public class BusinessException extends Exception { public class BusinessException extends Exception {
@Serial
private static final long serialVersionUID = 6235833142062144336L; private static final long serialVersionUID = 6235833142062144336L;
/** /**
@@ -24,12 +24,15 @@
*/ */
package com.iluwatar.retry; package com.iluwatar.retry;
import java.io.Serial;
/** /**
* Catastrophic error indicating that we have lost connection to our database. * Catastrophic error indicating that we have lost connection to our database.
* *
* @author George Aristy (george.aristy@gmail.com) * @author George Aristy (george.aristy@gmail.com)
*/ */
public final class DatabaseNotAvailableException extends BusinessException { public final class DatabaseNotAvailableException extends BusinessException {
@Serial
private static final long serialVersionUID = -3750769625095997799L; private static final long serialVersionUID = -3750769625095997799L;
/** /**