37106: serialVersionUIDs should be private (static final long)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@348444 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James W. Carman 2005-11-23 14:06:56 +00:00
parent 420a1017eb
commit 3bedf271e8
48 changed files with 53 additions and 48 deletions

View File

@ -86,7 +86,7 @@ public class ReferenceMap extends AbstractMap {
/**
* For serialization.
*/
final private static long serialVersionUID = -3370601314380922368L;
private static final long serialVersionUID = -3370601314380922368L;
/**

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class AllPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -3094696765038308799L;
private static final long serialVersionUID = -3094696765038308799L;
/** The array of predicates to call */
private final Predicate[] iPredicates;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class AndPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = 4189014213763186912L;
private static final long serialVersionUID = 4189014213763186912L;
/** The array of predicates to call */
private final Predicate iPredicate1;

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class AnyPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7429999530934647542L;
private static final long serialVersionUID = 7429999530934647542L;
/** The array of predicates to call */
private final Predicate[] iPredicates;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Closure;
public class ChainedClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = -3520677225766901240L;
private static final long serialVersionUID = -3520677225766901240L;
/** The closures to call in turn */
private final Closure[] iClosures;

View File

@ -35,7 +35,7 @@ import org.apache.commons.collections.Transformer;
public class ChainedTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3514945074733160196L;
private static final long serialVersionUID = 3514945074733160196L;
/** The transformers to call in turn */
private final Transformer[] iTransformers;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public class CloneTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = -8188742709499652567L;
private static final long serialVersionUID = -8188742709499652567L;
/** Singleton predicate instance */
public static final Transformer INSTANCE = new CloneTransformer();

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public class ClosureTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 478466901448617286L;
private static final long serialVersionUID = 478466901448617286L;
/** The closure to wrap */
private final Closure iClosure;

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.Factory;
public class ConstantFactory implements Factory, Serializable {
/** Serial version UID */
static final long serialVersionUID = -3520677225766901240L;
private static final long serialVersionUID = -3520677225766901240L;
/** Returns null each time */
public static final Factory NULL_INSTANCE = new ConstantFactory(null);

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.Transformer;
public class ConstantTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 6374440726369055124L;
private static final long serialVersionUID = 6374440726369055124L;
/** Returns null each time */
public static final Transformer NULL_INSTANCE = new ConstantTransformer(null);

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class EqualPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 5633766978029907089L;
private static final long serialVersionUID = 5633766978029907089L;
/** The value to compare to */
private final Object iValue;

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.FunctorException;
public final class ExceptionClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7179106032121985545L;
private static final long serialVersionUID = 7179106032121985545L;
/** Singleton predicate instance */

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.FunctorException;
public final class ExceptionFactory implements Factory, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7179106032121985545L;
private static final long serialVersionUID = 7179106032121985545L;
/** Singleton predicate instance */

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class ExceptionPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7179106032121985545L;
private static final long serialVersionUID = 7179106032121985545L;
/** Singleton predicate instance */
public static final Predicate INSTANCE = new ExceptionPredicate();

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Transformer;
public final class ExceptionTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7179106032121985545L;
private static final long serialVersionUID = 7179106032121985545L;
/** Singleton predicate instance */

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Transformer;
public class FactoryTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = -6817674502475353160L;
private static final long serialVersionUID = -6817674502475353160L;
/** The factory to wrap */
private final Factory iFactory;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class FalsePredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7533784454832764388L;
private static final long serialVersionUID = 7533784454832764388L;
/** Singleton predicate instance */
public static final Predicate INSTANCE = new FalsePredicate();

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Closure;
public class ForClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = -1190120533393621674L;
private static final long serialVersionUID = -1190120533393621674L;
/** The number of times to loop */
private final int iCount;

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class IdentityPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = -89901658494523293L;
private static final long serialVersionUID = -89901658494523293L;
/** The value to compare to */

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Predicate;
public class IfClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3518477308466486130L;
private static final long serialVersionUID = 3518477308466486130L;
/** The test */
private final Predicate iPredicate;

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class InstanceofPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = -6682656911025165584L;
private static final long serialVersionUID = -6682656911025165584L;
/** The type to compare to */
private final Class iType;

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.FunctorException;
public class InstantiateFactory implements Factory, Serializable {
/** The serial version */
static final long serialVersionUID = -7732226881069447957L;
private static final long serialVersionUID = -7732226881069447957L;
/** The class to create */
private final Class iClassToInstantiate;

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.Transformer;
public class InstantiateTransformer implements Transformer, Serializable {
/** The serial version */
static final long serialVersionUID = 3786388740793356347L;
private static final long serialVersionUID = 3786388740793356347L;
/** Singleton instance that uses the no arg constructor */
public static final Transformer NO_ARG_INSTANCE = new InstantiateTransformer();

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.Transformer;
public class InvokerTransformer implements Transformer, Serializable {
/** The serial version */
static final long serialVersionUID = -8653385846894047688L;
private static final long serialVersionUID = -8653385846894047688L;
/** The method name to call */
private final String iMethodName;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public final class MapTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 862391807045468939L;
private static final long serialVersionUID = 862391807045468939L;
/** The map of data to lookup in */
private final Map iMap;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Closure;
public class NOPClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3518477308466486130L;
private static final long serialVersionUID = 3518477308466486130L;
/** Singleton predicate instance */
public static final Closure INSTANCE = new NOPClosure();

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Transformer;
public class NOPTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 2133891748318574490L;
private static final long serialVersionUID = 2133891748318574490L;
/** Singleton predicate instance */
public static final Transformer INSTANCE = new NOPTransformer();

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class NonePredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = 2007613066565892961L;
private static final long serialVersionUID = 2007613066565892961L;
/** The array of predicates to call */
private final Predicate[] iPredicates;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class NotNullPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7533784454832764388L;
private static final long serialVersionUID = 7533784454832764388L;
/** Singleton predicate instance */
public static final Predicate INSTANCE = new NotNullPredicate();

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class NotPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -2654603322338049674L;
private static final long serialVersionUID = -2654603322338049674L;
/** The predicate to decorate */
private final Predicate iPredicate;

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class NullIsExceptionPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3243449850504576071L;
private static final long serialVersionUID = 3243449850504576071L;
/** The predicate to decorate */
private final Predicate iPredicate;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class NullIsFalsePredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -2997501534564735525L;
private static final long serialVersionUID = -2997501534564735525L;
/** The predicate to decorate */
private final Predicate iPredicate;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class NullIsTruePredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -7625133768987126273L;
private static final long serialVersionUID = -7625133768987126273L;
/** The predicate to decorate */
private final Predicate iPredicate;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class NullPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7533784454832764388L;
private static final long serialVersionUID = 7533784454832764388L;
/** Singleton predicate instance */
public static final Predicate INSTANCE = new NullPredicate();

View File

@ -31,7 +31,7 @@ import org.apache.commons.collections.Predicate;
public final class OnePredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -8125389089924745785L;
private static final long serialVersionUID = -8125389089924745785L;
/** The array of predicates to call */
private final Predicate[] iPredicates;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class OrPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -8791518325735182855L;
private static final long serialVersionUID = -8791518325735182855L;
/** The array of predicates to call */
private final Predicate iPredicate1;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public class PredicateTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 5278818408044349346L;
private static final long serialVersionUID = 5278818408044349346L;
/** The closure to wrap */
private final Predicate iPredicate;

View File

@ -95,7 +95,7 @@ public class PrototypeFactory {
static class PrototypeCloneFactory implements Factory, Serializable {
/** The serial version */
static final long serialVersionUID = 5604271422565175555L;
private static final long serialVersionUID = 5604271422565175555L;
/** The object to clone each time */
private final Object iPrototype;
@ -153,7 +153,7 @@ public class PrototypeFactory {
static class PrototypeSerializationFactory implements Factory, Serializable {
/** The serial version */
static final long serialVersionUID = -8704966966139178833L;
private static final long serialVersionUID = -8704966966139178833L;
/** The object to clone via serialization each time */
private final Serializable iPrototype;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Transformer;
public final class StringValueTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = 7511110693171758606L;
private static final long serialVersionUID = 7511110693171758606L;
/** Singleton predicate instance */
public static final Transformer INSTANCE = new StringValueTransformer();

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.Predicate;
public class SwitchClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3518477308466486130L;
private static final long serialVersionUID = 3518477308466486130L;
/** The tests to consider */
private final Predicate[] iPredicates;

View File

@ -34,7 +34,7 @@ import org.apache.commons.collections.Transformer;
public class SwitchTransformer implements Transformer, Serializable {
/** Serial version UID */
static final long serialVersionUID = -6404460890903469332L;
private static final long serialVersionUID = -6404460890903469332L;
/** The tests to consider */
private final Predicate[] iPredicates;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public final class TransformedPredicate implements Predicate, PredicateDecorator, Serializable {
/** Serial version UID */
static final long serialVersionUID = -5596090919668315834L;
private static final long serialVersionUID = -5596090919668315834L;
/** The transformer to call */
private final Transformer iTransformer;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public class TransformerClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = -5194992589193388969L;
private static final long serialVersionUID = -5194992589193388969L;
/** The transformer to wrap */
private final Transformer iTransformer;

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Transformer;
public final class TransformerPredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = -2407966402920578741L;
private static final long serialVersionUID = -2407966402920578741L;
/** The transformer to call */
private final Transformer iTransformer;

View File

@ -30,7 +30,7 @@ import org.apache.commons.collections.Predicate;
public final class TruePredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = 3374767158756189740L;
private static final long serialVersionUID = 3374767158756189740L;
/** Singleton predicate instance */
public static final Predicate INSTANCE = new TruePredicate();

View File

@ -33,7 +33,7 @@ import org.apache.commons.collections.Predicate;
public final class UniquePredicate implements Predicate, Serializable {
/** Serial version UID */
static final long serialVersionUID = -3319417438027438040L;
private static final long serialVersionUID = -3319417438027438040L;
/** The set of previously seen objects */
private final Set iSet = new HashSet();

View File

@ -32,7 +32,7 @@ import org.apache.commons.collections.Predicate;
public class WhileClosure implements Closure, Serializable {
/** Serial version UID */
static final long serialVersionUID = -3110538116913760108L;
private static final long serialVersionUID = -3110538116913760108L;
/** The test condition */
private final Predicate iPredicate;

View File

@ -804,4 +804,9 @@ public class TestMapUtils extends BulkTest {
assertEquals(false, MapUtils.isNotEmpty(map));
}
public void testPopulateMap() {
Map map = new HashMap();
}
}