Changeset 10733 in josm


Ignore:
Timestamp:
2016-08-04T23:55:20+02:00 (8 years ago)
Author:
Don-vip
Message:

checkstyle

Location:
trunk
Files:
6 edited

Legend:

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

    r10634 r10733  
    14001400            final String lang = LanguageInfo.getLanguageCodeXML();
    14011401            cachedFile = new CachedFile(url);
    1402             try (final BufferedReader reader = cachedFile.getContentReader()) {
     1402            try (BufferedReader reader = cachedFile.getContentReader()) {
    14031403
    14041404                String line;
  • trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java

    r10644 r10733  
    3939    private OverpassTurboQueryWizard() {
    4040
    41         try (final CachedFile file = new CachedFile("resource://data/overpass-wizard.js");
    42              final Reader reader = file.getContentReader()) {
     41        try (CachedFile file = new CachedFile("resource://data/overpass-wizard.js");
     42             Reader reader = file.getContentReader()) {
    4343            engine.eval("var console = {error: " + Main.class.getCanonicalName() + ".warn};");
    4444            engine.eval("var global = {};");
  • trunk/test/functional/org/openstreetmap/josm/tools/HttpClientTest.java

    r10641 r10733  
    7373        assertThat(response.getHeaderFields().get("Content-Type"), is(Collections.singletonList("application/json")));
    7474        assertThat(response.getHeaderFields().get("Content-TYPE"), is(Collections.singletonList("application/json")));
    75         try (final InputStream in = response.getContent();
    76              final JsonReader json = JsonProvider.provider().createReader(in)) {
     75        try (InputStream in = response.getContent();
     76             JsonReader json = JsonProvider.provider().createReader(in)) {
    7777            final JsonObject root = json.readObject();
    7878            assertThat(root.getJsonObject("args").getString("foo"), is("bar"));
     
    8383    @Test
    8484    public void testUserAgent() throws IOException {
    85         try (final InputStream in = HttpClient.create(new URL("https://httpbin.org/user-agent")).connect(progress).getContent();
    86              final JsonReader json = JsonProvider.provider().createReader(in)) {
     85        try (InputStream in = HttpClient.create(new URL("https://httpbin.org/user-agent")).connect(progress).getContent();
     86             JsonReader json = JsonProvider.provider().createReader(in)) {
    8787            assertThat(json.readObject().getString("user-agent"), is(Version.getInstance().getFullAgentString()));
    8888        }
     
    107107                .connect(progress);
    108108        assertThat(response.getResponseCode(), is(200));
    109         try (final InputStream in = response.getContent();
    110              final JsonReader json = JsonProvider.provider().createReader(in)) {
     109        try (InputStream in = response.getContent();
     110             JsonReader json = JsonProvider.provider().createReader(in)) {
    111111            assertThat(json.readObject().getString("data"), is(text));
    112112        }
     
    121121                .connect(progress);
    122122        assertThat(response.getResponseCode(), is(200));
    123         try (final InputStream in = response.getContent();
    124              final JsonReader json = JsonProvider.provider().createReader(in)) {
     123        try (InputStream in = response.getContent();
     124             JsonReader json = JsonProvider.provider().createReader(in)) {
    125125            assertThat(json.readObject().getString("data"), is(""));
    126126        }
  • trunk/test/unit/org/openstreetmap/josm/data/osm/NodeDataTest.java

    r9994 r10733  
    2020        data.setChangesetId(314159);
    2121        final Object readData;
    22         try (final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    23              final ObjectOutputStream out = new ObjectOutputStream(bytes)) {
     22        try (ByteArrayOutputStream bytes = new ByteArrayOutputStream();
     23             ObjectOutputStream out = new ObjectOutputStream(bytes)) {
    2424            out.writeObject(data);
    25             try (final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()))) {
     25            try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()))) {
    2626                readData = in.readObject();
    2727            }
  • trunk/test/unit/org/openstreetmap/josm/data/osm/WayDataTest.java

    r9994 r10733  
    2020        data.setChangesetId(314159);
    2121        final Object readData;
    22         try (final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    23              final ObjectOutputStream out = new ObjectOutputStream(bytes)) {
     22        try (ByteArrayOutputStream bytes = new ByteArrayOutputStream();
     23             ObjectOutputStream out = new ObjectOutputStream(bytes)) {
    2424            out.writeObject(data);
    25             try (final ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()))) {
     25            try (ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes.toByteArray()))) {
    2626                readData = in.readObject();
    2727            }
  • trunk/test/unit/org/openstreetmap/josm/io/GpxReaderTest.java

    r9958 r10733  
    3232    public static GpxData parseGpxData(String filename) throws IOException, SAXException {
    3333        final GpxData result;
    34         try (final FileInputStream in = new FileInputStream(new File(filename))) {
    35             final GpxReader reader = new GpxReader(in);
     34        try (FileInputStream in = new FileInputStream(new File(filename))) {
     35            GpxReader reader = new GpxReader(in);
    3636            assertTrue(reader.parse(false));
    3737            result = reader.getGpxData();
Note: See TracChangeset for help on using the changeset viewer.