mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-09-27 14:13:05 +02:00
Fix a dupe bug
This commit is contained in:
parent
f5771c28d8
commit
e29f9681a1
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user