Skip to content

Commit

Permalink
(yegor256#1335) Get rid of unused serialization markers in number pac…
Browse files Browse the repository at this point in the history
…kage
  • Loading branch information
victornoel committed May 8, 2021
1 parent f9ab37b commit 079aa3a
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 47 deletions.
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/AvgOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/cactoos/number/ComparableNumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
*/
package org.cactoos.number;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* {@link Number} as {@link Comparable}.
*
Expand All @@ -31,14 +33,11 @@
*
* @since 1.0.0
*/
@SuppressWarnings("serial")
@SuppressFBWarnings("SE_NO_SERIALVERSIONID")
public final class ComparableNumber extends NumberEnvelope
implements Comparable<Number> {

/**
* Serialization marker.
*/
private static final long serialVersionUID = -1924406337256921883L;

/**
* Ctor.
*
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/cactoos/number/DivisionOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.cactoos.number;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.math.BigDecimal;
import org.cactoos.Scalar;

Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/MaxOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/MinOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/MultiplicationOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions src/main/java/org/cactoos/number/NumberEnvelope.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@
*/
package org.cactoos.number;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

/**
* Envelope for the {@link Number}.
*
* <p>There is no thread-safety guarantee.
*
* @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.
*/
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/NumberOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.cactoos.number;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.math.BigDecimal;
import org.cactoos.Text;

Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/NumberOfScalars.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package org.cactoos.number;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.cactoos.Scalar;
import org.cactoos.scalar.Unchecked;

Expand All @@ -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.
*/
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/org/cactoos/number/SumOf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 079aa3a

Please sign in to comment.