final String rightArg = workString.substring(xPos + 1).trim();
if (leftArg.endsWith("<=")) {
final String leftVersionStr = leftArg.substring(0, leftArg.length() - 2).
trim();
Version lowerVersion;
try {
lowerVersion = new Version(leftVersionStr);
} catch (NumberFormatException nfe) {
logger.error("Error in lower version number conversion", nfe);
return false;
}
if (lowerVersion.compareTo(currentJDKVersion) > 0) {
return false;
}
} else if (leftArg.endsWith("<")) {
final String leftVersionStr = leftArg.substring(0, leftArg.length() - 1).
trim();
Version lowerVersion;
try {
lowerVersion = new Version(leftVersionStr);
} catch (NumberFormatException nfe) {
logger.error("Error in lower number conversion", nfe);
return false;
}
if (lowerVersion.compareTo(currentJDKVersion) >= 0) {
return false;
}
} else {
logger.error("Invalid supported_jdk_versions initialization " +
" parameter in web.xml, it MUST be in the " +
" following format : 1.2 < x <= 1.3. Current string : [" +
supportedJDKString + "] )");
return false;
}
if (rightArg.startsWith("<=")) {
final String rightVersionStr = rightArg.substring(2).trim();
Version upperVersion;
try {
upperVersion = new Version(rightVersionStr);
} catch (NumberFormatException nfe) {
logger.error("Error in upper number conversion", nfe);
return false;
}
if (upperVersion.compareTo(currentJDKVersion) < 0) {
return false;
}
} else if (rightArg.startsWith("<")) {
final String rightVersionStr = rightArg.substring(1).trim();
Version upperVersion;
try {
upperVersion = new Version(rightVersionStr);
} catch (NumberFormatException nfe) {
logger.error("Error in upper number conversion", nfe);
return false;
}
if (upperVersion.compareTo(currentJDKVersion) <= 0) {
return false;
}
} else {
logger.error("Invalid supported_jdk_versions initialization " +
" parameter in web.xml, it MUST be in the " +