From 079aa3a355426139d5879833d09d4aa8e8755647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20No=C3=ABl?= Date: Sat, 8 May 2021 18:29:01 +0200 Subject: [PATCH] (#1335) Get rid of unused serialization markers in number package --- src/main/java/org/cactoos/number/AvgOf.java | 8 +++----- src/main/java/org/cactoos/number/ComparableNumber.java | 9 ++++----- src/main/java/org/cactoos/number/DivisionOf.java | 5 +++-- src/main/java/org/cactoos/number/MaxOf.java | 8 +++----- src/main/java/org/cactoos/number/MinOf.java | 8 +++----- src/main/java/org/cactoos/number/MultiplicationOf.java | 8 +++----- src/main/java/org/cactoos/number/NumberEnvelope.java | 9 ++++----- src/main/java/org/cactoos/number/NumberOf.java | 8 +++----- src/main/java/org/cactoos/number/NumberOfScalars.java | 8 +++----- src/main/java/org/cactoos/number/SumOf.java | 8 +++----- 10 files changed, 32 insertions(+), 47 deletions(-) diff --git a/src/main/java/org/cactoos/number/AvgOf.java b/src/main/java/org/cactoos/number/AvgOf.java index e09915501..ae0834694 100644 --- a/src/main/java/org/cactoos/number/AvgOf.java +++ b/src/main/java/org/cactoos/number/AvgOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigDecimal; import java.util.Iterator; import org.cactoos.iterable.IterableOf; @@ -45,13 +46,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class AvgOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = 3624862553221697558L; - /** * Ctor. * @param src Numbers diff --git a/src/main/java/org/cactoos/number/ComparableNumber.java b/src/main/java/org/cactoos/number/ComparableNumber.java index a21d00394..c87520c67 100644 --- a/src/main/java/org/cactoos/number/ComparableNumber.java +++ b/src/main/java/org/cactoos/number/ComparableNumber.java @@ -23,6 +23,8 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * {@link Number} as {@link Comparable}. * @@ -31,14 +33,11 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class ComparableNumber extends NumberEnvelope implements Comparable { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -1924406337256921883L; - /** * Ctor. * diff --git a/src/main/java/org/cactoos/number/DivisionOf.java b/src/main/java/org/cactoos/number/DivisionOf.java index d93210a48..cfec98916 100644 --- a/src/main/java/org/cactoos/number/DivisionOf.java +++ b/src/main/java/org/cactoos/number/DivisionOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigDecimal; import org.cactoos.Scalar; @@ -33,10 +34,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class DivisionOf extends NumberEnvelope { - private static final long serialVersionUID = -5276601257067346442L; - /** * Ctor. * @param dividend The dividend diff --git a/src/main/java/org/cactoos/number/MaxOf.java b/src/main/java/org/cactoos/number/MaxOf.java index dc3d0fd34..aed7e376c 100644 --- a/src/main/java/org/cactoos/number/MaxOf.java +++ b/src/main/java/org/cactoos/number/MaxOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.cactoos.iterable.IterableOf; import org.cactoos.iterable.Mapped; import org.cactoos.scalar.Reduced; @@ -44,13 +45,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class MaxOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -6057839494957475355L; - /** * Ctor. * @param src Numbers diff --git a/src/main/java/org/cactoos/number/MinOf.java b/src/main/java/org/cactoos/number/MinOf.java index 67646e81d..48afc7670 100644 --- a/src/main/java/org/cactoos/number/MinOf.java +++ b/src/main/java/org/cactoos/number/MinOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.cactoos.iterable.IterableOf; import org.cactoos.iterable.Mapped; import org.cactoos.scalar.Reduced; @@ -44,13 +45,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class MinOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = 7081070952159683108L; - /** * Ctor. * @param src Numbers diff --git a/src/main/java/org/cactoos/number/MultiplicationOf.java b/src/main/java/org/cactoos/number/MultiplicationOf.java index a922a8f95..c1d1dd12f 100644 --- a/src/main/java/org/cactoos/number/MultiplicationOf.java +++ b/src/main/java/org/cactoos/number/MultiplicationOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigDecimal; import org.cactoos.iterable.IterableOf; import org.cactoos.iterable.Joined; @@ -45,13 +46,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class MultiplicationOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -5039588861554829762L; - /** * Ctor. * @param arg Required argument diff --git a/src/main/java/org/cactoos/number/NumberEnvelope.java b/src/main/java/org/cactoos/number/NumberEnvelope.java index 19fc5d6fb..529db3c13 100644 --- a/src/main/java/org/cactoos/number/NumberEnvelope.java +++ b/src/main/java/org/cactoos/number/NumberEnvelope.java @@ -23,6 +23,8 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Envelope for the {@link Number}. * @@ -30,13 +32,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public abstract class NumberEnvelope extends Number { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -1924406337256921883L; - /** * Wrapped Number. */ diff --git a/src/main/java/org/cactoos/number/NumberOf.java b/src/main/java/org/cactoos/number/NumberOf.java index 3ea9e304d..ffcc87a61 100644 --- a/src/main/java/org/cactoos/number/NumberOf.java +++ b/src/main/java/org/cactoos/number/NumberOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigDecimal; import org.cactoos.Text; @@ -39,13 +40,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class NumberOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -1924406337256921883L; - /** * Ctor. * @param txt Number-string diff --git a/src/main/java/org/cactoos/number/NumberOfScalars.java b/src/main/java/org/cactoos/number/NumberOfScalars.java index ab2eaf97d..966cf3d98 100644 --- a/src/main/java/org/cactoos/number/NumberOfScalars.java +++ b/src/main/java/org/cactoos/number/NumberOfScalars.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.cactoos.Scalar; import org.cactoos.scalar.Unchecked; @@ -33,13 +34,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings({"SE_NO_SERIALVERSIONID", "SE_BAD_FIELD"}) public final class NumberOfScalars extends Number { - /** - * Serialization marker. - */ - private static final long serialVersionUID = -1924406337256921883L; - /** * The LONG number. */ diff --git a/src/main/java/org/cactoos/number/SumOf.java b/src/main/java/org/cactoos/number/SumOf.java index a72b4a899..bab74cf31 100644 --- a/src/main/java/org/cactoos/number/SumOf.java +++ b/src/main/java/org/cactoos/number/SumOf.java @@ -23,6 +23,7 @@ */ package org.cactoos.number; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.math.BigDecimal; import org.cactoos.iterable.IterableOf; import org.cactoos.scalar.Folded; @@ -42,13 +43,10 @@ * * @since 1.0.0 */ +@SuppressWarnings("serial") +@SuppressFBWarnings("SE_NO_SERIALVERSIONID") public final class SumOf extends NumberEnvelope { - /** - * Serialization marker. - */ - private static final long serialVersionUID = 7775359972001208403L; - /** * Ctor. * @param src Numbers