} else if (ad._maxValue != null && intVal.compareTo((Integer) ad._maxValue) > 0) {
rangeError = true;
}
break;
case AttributeDefinition.LONG :
<BUG>Long longVal = new Long(s);
</BUG>
if (ad._minValue != null && longVal.compareTo((Long) ad._minValue) < 0) {
rangeError = true;
} else if (ad._maxValue != null && longVal.compareTo((Long) ad._maxValue) > 0) {

} else if (ad._maxValue != null && intVal.compareTo((Integer) ad._maxValue) > 0) {
rangeError = true;
}
break;
case AttributeDefinition.LONG :
Long longVal = Long.valueOf(s);
if (ad._minValue != null && longVal.compareTo((Long) ad._minValue) < 0) {
rangeError = true;
} else if (ad._maxValue != null && longVal.compareTo((Long) ad._maxValue) > 0) {
