changed 'String COLLECTIONS_VERSION' to 'int COLLECTIONS_MAJOR_VERSION',
separated COLLECTIONS_MAJOR_VERSION from COMPATIBILITY_VERSION git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130573 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
52133cc2ef
commit
c7ec7fa5ef
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestMap.java,v 1.11 2002/02/22 22:21:50 morgand Exp $
|
||||
* $Revision: 1.11 $
|
||||
* $Date: 2002/02/22 22:21:50 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestMap.java,v 1.12 2002/02/25 20:57:08 morgand Exp $
|
||||
* $Revision: 1.12 $
|
||||
* $Date: 2002/02/25 20:57:08 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
|
@ -87,7 +87,7 @@ import java.util.NoSuchElementException;
|
|||
*
|
||||
* @author Michael Smith
|
||||
* @author Rodney Waldhoff
|
||||
* @version $Id: TestMap.java,v 1.11 2002/02/22 22:21:50 morgand Exp $
|
||||
* @version $Id: TestMap.java,v 1.12 2002/02/25 20:57:08 morgand Exp $
|
||||
*/
|
||||
public abstract class TestMap extends TestObject {
|
||||
|
||||
|
@ -936,8 +936,8 @@ public abstract class TestMap extends TestObject {
|
|||
String mapName = map.getClass().getName();
|
||||
mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
|
||||
retval.append(mapName);
|
||||
retval.append(".emptyMap.");
|
||||
retval.append(COLLECTIONS_VERSION);
|
||||
retval.append(".emptyMap.version");
|
||||
retval.append(COMPATIBILITY_VERSION);
|
||||
retval.append(".obj");
|
||||
return retval.toString();
|
||||
}
|
||||
|
@ -948,8 +948,8 @@ public abstract class TestMap extends TestObject {
|
|||
String mapName = map.getClass().getName();
|
||||
mapName = mapName.substring(mapName.lastIndexOf(".")+1,mapName.length());
|
||||
retval.append(mapName);
|
||||
retval.append(".fullMap.");
|
||||
retval.append(COLLECTIONS_VERSION);
|
||||
retval.append(".fullMap.version");
|
||||
retval.append(COMPATIBILITY_VERSION);
|
||||
retval.append(".obj");
|
||||
return retval.toString();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.5 2002/02/25 18:14:57 morgand Exp $
|
||||
* $Revision: 1.5 $
|
||||
* $Date: 2002/02/25 18:14:57 $
|
||||
* $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/test/org/apache/commons/collections/Attic/TestObject.java,v 1.6 2002/02/25 20:57:08 morgand Exp $
|
||||
* $Revision: 1.6 $
|
||||
* $Date: 2002/02/25 20:57:08 $
|
||||
*
|
||||
* ====================================================================
|
||||
*
|
||||
|
@ -90,18 +90,22 @@ import java.util.NoSuchElementException;
|
|||
* test case (method) your {@link Object} fails.
|
||||
*
|
||||
* @author Rodney Waldhoff
|
||||
* @version $Id: TestObject.java,v 1.5 2002/02/25 18:14:57 morgand Exp $
|
||||
* @version $Id: TestObject.java,v 1.6 2002/02/25 20:57:08 morgand Exp $
|
||||
*/
|
||||
public abstract class TestObject extends TestCase {
|
||||
public TestObject(String testName) {
|
||||
super(testName);
|
||||
}
|
||||
|
||||
// current major release for Collections
|
||||
public static final int COLLECTIONS_MAJOR_VERSION = 2;
|
||||
// This constant makes it possible for TestMap (and other subclasses,
|
||||
// if necessary) to automatically check CVS for a versionX copy of a
|
||||
// Serialized object, so we can make sure that compatibility is maintained.
|
||||
// See, for example, TestMap.getCanonicalFullMapName(Map map).
|
||||
public static final String COLLECTIONS_VERSION = "version2";
|
||||
// Subclasses can override this variable, indicating compatibility
|
||||
// with earlier Collections versions.
|
||||
public int COMPATIBILITY_VERSION = COLLECTIONS_MAJOR_VERSION;
|
||||
|
||||
/**
|
||||
* Return a new, empty {@link Object} to used for testing.
|
||||
|
|
Loading…
Reference in New Issue