Changeset 6552 in josm for trunk/test/unit/org/openstreetmap


Ignore:
Timestamp:
2013-12-28T00:30:15+01:00 (11 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/test/unit/org/openstreetmap/josm/io/OsmChangesetContentParserTest.groovy

    r2690 r6552  
    22package org.openstreetmap.josm.io;
    33
    4 import org.junit.Test
     4import org.junit.Test
     5import org.openstreetmap.josm.tools.Utils
    56
    67import static org.junit.Assert.*;
     
    4243               
    4344                // should be OK
    44                 parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes("UTF-8")))
     45                parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes(Utils.UTF_8)))
    4546                parser.parse null
    4647               
    4748                // should be OK
    48                 parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes("UTF-8")))         
     49                parser = new OsmChangesetContentParser(new ByteArrayInputStream(doc.getBytes(Utils.UTF_8)))
    4950                parser.parse NullProgressMonitor.INSTANCE
    5051               
Note: See TracChangeset for help on using the changeset viewer.