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

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

Location:
trunk/src/org/openstreetmap/josm/data/projection
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/projection/Projections.java

    r7048 r7082  
    66import java.io.InputStream;
    77import java.io.InputStreamReader;
     8import java.nio.charset.StandardCharsets;
    89import java.util.Collection;
    910import java.util.Collections;
     
    3334import org.openstreetmap.josm.io.MirroredInputStream;
    3435import org.openstreetmap.josm.tools.Pair;
    35 import org.openstreetmap.josm.tools.Utils;
    3636
    3737/**
     
    134134        try (
    135135            InputStream in = new MirroredInputStream("resource://data/projection/epsg");
    136             BufferedReader r = new BufferedReader(new InputStreamReader(in, Utils.UTF_8));
     136            BufferedReader r = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));
    137137        ) {
    138138            String line, lastline = "";
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2GridShiftFile.java

    r7037 r7082  
    2323import java.io.InputStream;
    2424import java.io.Serializable;
     25import java.nio.charset.StandardCharsets;
    2526import java.util.ArrayList;
    2627import java.util.HashMap;
    2728import java.util.List;
    28 
    29 import org.openstreetmap.josm.tools.Utils;
    3029
    3130/**
     
    104103        topLevelSubGrid = null;
    105104        in.read(b8);
    106         String overviewHeaderCountId = new String(b8, Utils.UTF_8);
     105        String overviewHeaderCountId = new String(b8, StandardCharsets.UTF_8);
    107106        if (!"NUM_OREC".equals(overviewHeaderCountId))
    108107            throw new IllegalArgumentException("Input file is not an NTv2 grid shift file");
     
    127126        in.read(b8);
    128127        in.read(b8);
    129         shiftType = new String(b8, Utils.UTF_8);
     128        shiftType = new String(b8, StandardCharsets.UTF_8);
    130129        in.read(b8);
    131130        in.read(b8);
  • trunk/src/org/openstreetmap/josm/data/projection/datum/NTV2SubGrid.java

    r7025 r7082  
    2323import java.io.InputStream;
    2424import java.io.Serializable;
     25import java.nio.charset.StandardCharsets;
    2526
    2627import org.openstreetmap.josm.Main;
     
    7576        in.read(b8);
    7677        in.read(b8);
    77         subGridName = new String(b8, Utils.UTF_8).trim();
    78         in.read(b8);
    79         in.read(b8);
    80         parentSubGridName = new String(b8, Utils.UTF_8).trim();
    81         in.read(b8);
    82         in.read(b8);
    83         created = new String(b8, Utils.UTF_8);
    84         in.read(b8);
    85         in.read(b8);
    86         updated = new String(b8, Utils.UTF_8);
     78        subGridName = new String(b8, StandardCharsets.UTF_8).trim();
     79        in.read(b8);
     80        in.read(b8);
     81        parentSubGridName = new String(b8, StandardCharsets.UTF_8).trim();
     82        in.read(b8);
     83        in.read(b8);
     84        created = new String(b8, StandardCharsets.UTF_8);
     85        in.read(b8);
     86        in.read(b8);
     87        updated = new String(b8, StandardCharsets.UTF_8);
    8788        in.read(b8);
    8889        in.read(b8);
Note: See TracChangeset for help on using the changeset viewer.