Ignore:
Timestamp:
2014-05-09T05:32:37+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - replace Utils.UTF_8 by StandardCharsets.UTF_8, new in Java 7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/MapCSSStyleSource.java

    r7081 r7082  
    99import java.io.IOException;
    1010import java.io.InputStream;
     11import java.nio.charset.StandardCharsets;
    1112import java.util.ArrayList;
    1213import java.util.List;
     
    5354    public final List<MapCSSRule> multipolygonRules = new ArrayList<>();
    5455    public final List<MapCSSRule> canvasRules = new ArrayList<>();
    55    
     56
    5657    private Color backgroundColorOverride;
    5758    private String css = null;
     
    9394                MapCSSParser preprocessor = new MapCSSParser(in, "UTF-8", MapCSSParser.LexicalState.PREPROCESSOR);
    9495                String mapcss = preprocessor.pp_root(this);
    95                
     96
    9697                // do the actual mapcss parsing
    97                 InputStream in2 = new ByteArrayInputStream(mapcss.getBytes(Utils.UTF_8));
     98                InputStream in2 = new ByteArrayInputStream(mapcss.getBytes(StandardCharsets.UTF_8));
    9899                MapCSSParser parser = new MapCSSParser(in2, "UTF-8", MapCSSParser.LexicalState.DEFAULT);
    99100                parser.sheet(this);
    100                
     101
    101102                loadMeta();
    102103                loadCanvas();
     
    155156    public InputStream getSourceInputStream() throws IOException {
    156157        if (css != null) {
    157             return new ByteArrayInputStream(css.getBytes(Utils.UTF_8));
     158            return new ByteArrayInputStream(css.getBytes(StandardCharsets.UTF_8));
    158159        }
    159160        MirroredInputStream in = getMirroredInputStream();
     
    250251            }
    251252        }
    252        
     253
    253254        // the declaration indices are sorted, so it suffices to save the
    254255        // last used index
    255256        int lastDeclUsed = -1;
    256        
     257
    257258        for (MapCSSRule r : matchingRules) {
    258259            env.clearSelectorMatchingInformation();
Note: See TracChangeset for help on using the changeset viewer.