Fix a dupe bug

This commit is contained in:
Andrzej Pomirski 2014-04-01 15:47:19 +02:00
parent f5771c28d8
commit e29f9681a1
1 changed files with 2 additions and 2 deletions

View File

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