* Convert current version string to double.
*/
try {
expectedVersion = Double.parseDouble(expectedVersionStr);
} catch (NumberFormatException nfe) {
UserPropertiesException upe;
expectedVersion = 0;
upe = new UserPropertiesException(
acr.getString(acr.E_BAD_INT_OBJSTORE_LIST_VER, expectedVersionStr));
throw(upe);
}
/*
* Convert first version string to double.
*/
try {
firstVersion = Double.parseDouble(firstVersionStr);
} catch (NumberFormatException nfe) {
UserPropertiesException upe;
firstVersion = 0;
upe = new UserPropertiesException(
acr.getString(acr.E_BAD_INT_OBJSTORE_LIST_VER, firstVersionStr));
throw(upe);
}
/*
* Convert file version string to double.
*/
try {
fileVersion = Double.parseDouble(fileVersionStr);
} catch (NumberFormatException nfe) {
UserPropertiesException upe;
Object args[] = new Object [ 4 ];
fileVersion = 0;
args[0] = getAbsoluteFileName();
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = acr.getString(acr.E_BAD_FILE_OBJSTORE_LIST_VER, args);
upe = new UserPropertiesException(s);
throw(upe);
}
/*
* File version is less than our first version - error !
*/
if (fileVersion < firstVersion) {
UserPropertiesException upe;
Object args[] = new Object [ 4 ];
args[0] = getAbsoluteFileName();
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = acr.getString(acr.E_BAD_FILE_OBJSTORE_LIST_VER, args);
upe = new UserPropertiesException(s);
throw (upe);
}
/*
* File version is greater than our current version - error !
*/
if (fileVersion > expectedVersion) {
UserPropertiesException upe;
Object args[] = new Object [ 4 ];
args[0] = getAbsoluteFileName();
args[1] = PROP_NAME_VERSION;
args[2] = fileVersionStr;
args[3] = expectedVersionStr;
String s = acr.getString(acr.E_BAD_FILE_OBJSTORE_LIST_VER, args);
upe = new UserPropertiesException(s);
throw (upe);
}
/*
* Add checks for