Changeset 1411d0c for apps


Ignore:
Timestamp:
Dec 23, 2018 2:40:13 PM (18 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
edae8e3
Parents:
aad80eb
Message:

Sybil: Change persistence format to prevent errors in some locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/sybil/Points.java

    raad80eb r1411d0c  
    2323    }
    2424
     25    /**
     26     *  @param reason may not contain '%'
     27     */
    2528    public Points(double d, String reason) {
    2629        this();
     
    4346
    4447    /**
     48     *  @param reason may not contain '%'
    4549     *  @since 0.9.38
    4650     */
     
    6872    /**
    6973     *  For persistence.
    70      *  Total points and reasons, comma separated, no newline
     74     *  Total points and reasons, '%' separated, no newline.
     75     *  The separation character is chosen to not conflict with
     76     *  decimal point in various locales, or chars in reasons, including HTML links,
     77     *  or special chars in Pattern.
     78     *
    7179     *  @since 0.9.38
    7280     */
     
    7482        buf.append(points);
    7583        for (String r : reasons) {
    76             buf.append(',').append(r);
     84            buf.append('%').append(r);
    7785        }
    7886    }
     
    8492     */
    8593    public static Points fromString(String s) {
    86         String[] ss = DataHelper.split(s, ",");
     94        String[] ss = DataHelper.split(s, "%");
    8795        if (ss.length < 2)
    8896            return null;
Note: See TracChangeset for help on using the changeset viewer.