Skip to content

Commit

Permalink
[MNG-8493] 'serialVersionUID' can be annotated with '@serial' annotat…
Browse files Browse the repository at this point in the history
…ion (#2025)
  • Loading branch information
Stellar1999 committed Jan 8, 2025
1 parent 0b7235c commit ab705b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@
*/
package org.apache.maven.internal.impl.model.reflection;

import java.io.Serial;

public class IntrospectionException extends Exception {

/**
*
*/
@Serial
private static final long serialVersionUID = -6090771282553728784L;

IntrospectionException(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package org.apache.maven.internal.impl.model.reflection;

import java.io.Serial;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Hashtable;
Expand Down Expand Up @@ -118,6 +119,7 @@ Method find(String methodName, Object... args) throws AmbiguousException {
*/
static class AmbiguousException extends Exception {

@Serial
private static final long serialVersionUID = 751688436639650618L;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@
*/
public class MavenBaseLogger extends LegacyAbstractLogger {

private static final long serialVersionUID = -632788891211436180L;

private static final Clock MONOTONIC_CLOCK = Clock.tick(Clock.systemUTC(), Duration.ofMillis(1));
private static final Instant START_TIME = MonotonicClock.now();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import javax.xml.stream.XMLStreamException;

import java.io.Serial;
import java.io.Serializable;
import java.io.StringWriter;
import java.util.ArrayList;
Expand All @@ -41,6 +42,7 @@
* NOTE: remove all the util code in here when separated, this class should be pure data.
*/
public class XmlNodeImpl implements Serializable, XmlNode {
@Serial
private static final long serialVersionUID = 2567894443061173996L;

protected final String prefix;
Expand Down

0 comments on commit ab705b1

Please sign in to comment.