Project

General

Profile

« Previous | Next » 

Revision 55937de8

Added by Andreas Müller almost 4 years ago

ref #9038 try to improve BigDecimal handling in TaxEditor

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/BigDecimalWithLabelElement.java
40 40
        }
41 41

  
42 42
        try{
43
            String pattern = "-?\\d{0,9}.?\\d{0,9}";
43
            String pattern = "-?\\d{1,9}(.\\d{0,9})?";
44 44
            if (value.matches(pattern)){
45
                if ("-".equals(value)){
46
                    return;
47
                }
45 48
                BigDecimal number = new BigDecimal(value);
46 49
                if((start != null && number.compareTo(start) < 0 || (end != null && number.compareTo(end) > 0))){
47 50
                    exception = new NumberFormatException("You entered a number that is not within the allowed bounds.");

Also available in: Unified diff