From a928f1b9930ad1794ea57aee24435afe16a86df9 Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Fri, 6 Jul 2018 15:09:33 +0800 Subject: [PATCH] Add "serialVersionUID" for exceptions to avoid InvalidClassException Signed-off-by: Yanming Zhou --- .../exceptions/BaggageRestrictionManagerException.java | 3 +++ .../io/jaegertracing/internal/exceptions/EmptyIpException.java | 3 +++ .../internal/exceptions/EmptyTracerStateStringException.java | 3 +++ .../exceptions/MalformedTracerStateStringException.java | 3 +++ .../internal/exceptions/NotFourOctetsException.java | 3 +++ .../internal/exceptions/SamplingStrategyErrorException.java | 3 +++ .../io/jaegertracing/internal/exceptions/SenderException.java | 3 +++ .../internal/exceptions/UnsupportedFormatException.java | 3 +++ 8 files changed, 24 insertions(+) diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/BaggageRestrictionManagerException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/BaggageRestrictionManagerException.java index ec1f707b6..3fd08622c 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/BaggageRestrictionManagerException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/BaggageRestrictionManagerException.java @@ -17,6 +17,9 @@ import java.io.IOException; public class BaggageRestrictionManagerException extends IOException { + + private static final long serialVersionUID = -7154971918992152963L; + public BaggageRestrictionManagerException(String msg) { super(msg); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyIpException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyIpException.java index bc402c3ef..6828259f6 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyIpException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyIpException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class EmptyIpException extends RuntimeException { + + private static final long serialVersionUID = 2084472238515931215L; + public EmptyIpException() { super("Empty string given for ip"); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyTracerStateStringException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyTracerStateStringException.java index 505f87425..0a8fb4838 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyTracerStateStringException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/EmptyTracerStateStringException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class EmptyTracerStateStringException extends RuntimeException { + + private static final long serialVersionUID = 9082120636922517100L; + public EmptyTracerStateStringException() { super("Cannot convert empty string to tracer state"); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/MalformedTracerStateStringException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/MalformedTracerStateStringException.java index 6cf6c09a6..fe6cb7abe 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/MalformedTracerStateStringException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/MalformedTracerStateStringException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class MalformedTracerStateStringException extends RuntimeException { + + private static final long serialVersionUID = 6132770324736429065L; + public MalformedTracerStateStringException(String value) { super("String does not match tracer state format: " + value); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/NotFourOctetsException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/NotFourOctetsException.java index 0227b0d55..cc2639fa2 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/NotFourOctetsException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/NotFourOctetsException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class NotFourOctetsException extends RuntimeException { + + private static final long serialVersionUID = 5270319844335906266L; + public NotFourOctetsException() { super("Wrong number of octets"); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SamplingStrategyErrorException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SamplingStrategyErrorException.java index f6ee9b201..75df05794 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SamplingStrategyErrorException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SamplingStrategyErrorException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class SamplingStrategyErrorException extends RuntimeException { + + private static final long serialVersionUID = -3749650864768854563L; + public SamplingStrategyErrorException(String msg) { super(msg); } diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SenderException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SenderException.java index dcf34e253..c36a59d00 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SenderException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/SenderException.java @@ -15,6 +15,9 @@ package io.jaegertracing.internal.exceptions; public class SenderException extends Exception { + + private static final long serialVersionUID = 6770312992584114078L; + private int droppedSpans; public SenderException(String msg, Throwable cause, int droppedSpans) { diff --git a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/UnsupportedFormatException.java b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/UnsupportedFormatException.java index ba8bb972e..f9189224c 100644 --- a/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/UnsupportedFormatException.java +++ b/jaeger-core/src/main/java/io/jaegertracing/internal/exceptions/UnsupportedFormatException.java @@ -17,6 +17,9 @@ import io.opentracing.propagation.Format; public class UnsupportedFormatException extends RuntimeException { + + private static final long serialVersionUID = 3589851499963551948L; + public UnsupportedFormatException(Format format) { super(format.toString()); }