Skip to content

Commit 5df7ce0

Browse files
committed
Add serialVersionUID to API exceptions
1 parent 1062d05 commit 5df7ce0

18 files changed

+85
-0
lines changed

api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactDeployerException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -31,6 +33,7 @@ public class ArtifactDeployerException extends MavenException {
3133
/**
3234
*
3335
*/
36+
@Serial
3437
private static final long serialVersionUID = 7421964724059077698L;
3538

3639
/**

api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactInstallerException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -29,6 +31,7 @@ public class ArtifactInstallerException extends MavenException {
2931
/**
3032
*
3133
*/
34+
@Serial
3235
private static final long serialVersionUID = 3652561971360586373L;
3336

3437
/**

api/maven-api-core/src/main/java/org/apache/maven/api/services/ArtifactResolverException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -28,6 +30,7 @@
2830
@Experimental
2931
public class ArtifactResolverException extends MavenException {
3032

33+
@Serial
3134
private static final long serialVersionUID = 7252294837746943917L;
3235

3336
/**

api/maven-api-core/src/main/java/org/apache/maven/api/services/ChecksumAlgorithmServiceException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
@Experimental
2426
public class ChecksumAlgorithmServiceException extends MavenException {
2527

28+
@Serial
2629
private static final long serialVersionUID = 1201171469179367694L;
2730

2831
public ChecksumAlgorithmServiceException(String message, Throwable cause) {

api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverException.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
@Experimental
2426
public class DependencyResolverException extends MavenException {
2527

28+
@Serial
2629
private static final long serialVersionUID = 1101171569179057614L;
2730

2831
public DependencyResolverException(String message, Throwable cause) {

api/maven-api-core/src/main/java/org/apache/maven/api/services/LookupException.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -28,6 +30,9 @@
2830
@Experimental
2931
public class LookupException extends MavenException {
3032

33+
@Serial
34+
private static final long serialVersionUID = -6259322450070320286L;
35+
3136
public LookupException(String message) {
3237
super(message);
3338
}

api/maven-api-core/src/main/java/org/apache/maven/api/services/MavenException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -27,6 +29,10 @@
2729
*/
2830
@Experimental
2931
public class MavenException extends RuntimeException {
32+
33+
@Serial
34+
private static final long serialVersionUID = 9027638326336093132L;
35+
3036
public MavenException() {}
3137

3238
public MavenException(String message) {

api/maven-api-core/src/main/java/org/apache/maven/api/services/ModelBuilderException.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
2122
import java.util.Collections;
2223
import java.util.List;
2324

@@ -31,6 +32,9 @@
3132
@Experimental
3233
public class ModelBuilderException extends MavenException {
3334

35+
@Serial
36+
private static final long serialVersionUID = -1865447022070650896L;
37+
3438
private final ModelBuilderResult result;
3539

3640
/**

api/maven-api-core/src/main/java/org/apache/maven/api/services/ProjectBuilderException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -27,6 +29,10 @@
2729
*/
2830
@Experimental
2931
public class ProjectBuilderException extends MavenException {
32+
33+
@Serial
34+
private static final long serialVersionUID = -7629871850875943799L;
35+
3036
/**
3137
* @param message the message to give
3238
* @param e the {@link Exception}

api/maven-api-core/src/main/java/org/apache/maven/api/services/PrompterException.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
*/
1919
package org.apache.maven.api.services;
2020

21+
import java.io.Serial;
22+
2123
import org.apache.maven.api.annotations.Experimental;
2224

2325
/**
@@ -27,6 +29,10 @@
2729
*/
2830
@Experimental
2931
public class PrompterException extends MavenException {
32+
33+
@Serial
34+
private static final long serialVersionUID = -3505070928479515081L;
35+
3036
/**
3137
* @param message the message to give
3238
* @param e the {@link Exception}

0 commit comments

Comments
 (0)