Changeset 10733 in josm for trunk/test/functional


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

checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.