Changeset 2ea3f9b


Ignore:
Timestamp:
Oct 31, 2010 2:33:31 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0afabbd
Parents:
30a5c49
Message:

parse log limit with current locale (ticket 118)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/LogManager.java

    r30a5c49 r2ea3f9b  
    1414import java.io.FileOutputStream;
    1515import java.io.IOException;
     16import java.text.DecimalFormat;
    1617import java.text.SimpleDateFormat;
    1718import java.util.ArrayList;
     
    430431            char mod = v.charAt(v.length() - 1);
    431432            if (!Character.isDigit(mod)) v = v.substring(0, v.length() - 1);
    432             double val = Double.parseDouble(v);
     433            // output to form was in current locale, so have to parse it back that way
     434            double val = (new DecimalFormat()).parse(v.trim()).doubleValue();
    433435            switch (mod) {
    434436                case 'K':
Note: See TracChangeset for help on using the changeset viewer.