Fix a dupe bug

This commit is contained in:
Andrzej Pomirski 2014-04-01 15:47:19 +02:00
parent f5771c28d8
commit e29f9681a1

View File

@ -37,7 +37,7 @@ public class PriceUtil {
if (NumberUtil.isDouble(part)) { if (NumberUtil.isDouble(part)) {
double price = Double.valueOf(part); double price = Double.valueOf(part);
if (price <= 0) { if (Double.isInfinite(price) || price <= 0) {
return NO_PRICE; return NO_PRICE;
} else { } else {
return price; return price;
@ -106,7 +106,7 @@ public class PriceUtil {
* @return Is the string a valid price * @return Is the string a valid price
*/ */
public static boolean isPrice(String text) { public static boolean isPrice(String text) {
if (NumberUtil.isFloat(text)) { if (NumberUtil.isDouble(text)) {
return true; return true;
} }