Ignore:
Timestamp:
2015-02-16T09:48:03+01:00 (8 years ago)
Author:
Don-vip
Message:

fix some Sonar issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r8061 r8073  
    3737
    3838import org.openstreetmap.josm.Main;
     39import org.openstreetmap.josm.data.Preferences.pref;
     40import org.openstreetmap.josm.data.Preferences.writeExplicitly;
    3941import org.openstreetmap.josm.gui.ExtendedDialog;
    4042import org.openstreetmap.josm.gui.util.GuiHelper;
    41 import org.openstreetmap.josm.data.Preferences.pref;
    42 import org.openstreetmap.josm.data.Preferences.writeExplicitly;
    4343
    4444/**
     
    5757    public static class FontEntry {
    5858        /**
    59          * The character subset. Basically a free identifier, but should
    60          * be unique.
     59         * The character subset. Basically a free identifier, but should be unique.
    6160         */
    6261        @pref
    6362        public String charset;
     63
    6464        /**
    6565         * Platform font name.
     
    6767        @pref @writeExplicitly
    6868        public String name = "";
     69
    6970        /**
    7071         * File name.
     
    7374        public String file = "";
    7475
     76        /**
     77         * Constructs a new {@code FontEntry}.
     78         */
    7579        public FontEntry() {
    7680        }
    7781
     82        /**
     83         * Constructs a new {@code FontEntry}.
     84         * @param charset The character subset. Basically a free identifier, but should be unique
     85         * @param name Platform font name
     86         * @param file File name
     87         */
    7888        public FontEntry(String charset, String name, String file) {
    7989            this.charset = charset;
     
    448458     * configuration. Finally the system property "sun.awt.fontconfig" is set
    449459     * to the customized fontconfig.properties file.
    450      * 
     460     *
    451461     * This is a crude hack, but better than no font display at all for these
    452462     * languages.
     
    482492            OutputStream os = Files.newOutputStream(fontconfigFile);
    483493            os.write(content);
    484             try (Writer w = new BufferedWriter(new OutputStreamWriter(os))) {
     494            try (Writer w = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) {
    485495                Collection<FontEntry> extrasPref = Main.pref.getListOfStructs(
    486496                        "font.extended-unicode.extra-items", getAdditionalFonts(), FontEntry.class);
Note: See TracChangeset for help on using the changeset viewer.