Ignore:
Timestamp:
2013-12-28T00:30:15+01:00 (5 years ago)
Author:
simon04
Message:

Refactoring: introduce Utils.UTF_8 charset to avoid handling of UnsupportedEncodingException

According to the Javadoc of Charset, every implementation of the Java
platform is required to support UTF-8.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/GettingStarted.java

    r6525 r6552  
    1010import java.awt.event.KeyEvent;
    1111import java.io.IOException;
    12 import java.io.UnsupportedEncodingException;
    1312import java.net.URL;
    1413import java.util.regex.Matcher;
     
    3130import org.openstreetmap.josm.tools.LanguageInfo;
    3231import org.openstreetmap.josm.tools.OpenBrowser;
     32import org.openstreetmap.josm.tools.Utils;
    3333import org.openstreetmap.josm.tools.WikiReader;
    3434
     
    9090            Main.pref.put("cache.motd.html.java", myJava);
    9191            Main.pref.put("cache.motd.html.lang", myLang);
    92             try {
    93                 return motd.getBytes("utf-8");
    94             } catch(UnsupportedEncodingException e){
    95                 e.printStackTrace();
    96                 return new byte[0];
    97             }
     92            return motd.getBytes(Utils.UTF_8);
    9893        }
    9994
Note: See TracChangeset for help on using the changeset viewer.