Changeset 8991 in josm


Ignore:
Timestamp:
2015-11-04T20:10:16+01:00 (7 years ago)
Author:
simon04
Message:

fix #12054 - IllegalArgumentException in JCS log handler

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java

    r8840 r8991  
    66import java.io.IOException;
    77import java.nio.channels.FileLock;
    8 import java.text.MessageFormat;
    98import java.util.Properties;
    109import java.util.logging.Handler;
     
    1211import java.util.logging.LogRecord;
    1312import java.util.logging.Logger;
     13import java.util.logging.SimpleFormatter;
    1414
    1515import org.apache.commons.jcs.access.CacheAccess;
     
    7676        // we need a separate handler from Main's, as we downgrade LEVEL.INFO to DEBUG level
    7777        jcsLog.addHandler(new Handler() {
     78            final SimpleFormatter formatter = new SimpleFormatter();
     79
    7880            @Override
    7981            public void publish(LogRecord record) {
    80                 String msg = MessageFormat.format(record.getMessage(), record.getParameters());
     82                String msg = formatter.formatMessage(record);
    8183                if (record.getLevel().intValue() >= Level.SEVERE.intValue()) {
    8284                    Main.error(msg);
Note: See TracChangeset for help on using the changeset viewer.