Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/OsmServerReader.java

    r8509 r8510  
    126126            try {
    127127                url = new URL(urlStr.replace(" ", "%20"));
    128             } catch(MalformedURLException e) {
     128            } catch (MalformedURLException e) {
    129129                throw new OsmTransferException(e);
    130130            }
     
    132132                // fix #7640, see http://www.tikalk.com/java/forums/httpurlconnection-disable-keep-alive
    133133                activeConnection = Utils.openHttpConnection(url, false);
    134             } catch(Exception e) {
     134            } catch (Exception e) {
    135135                throw new OsmTransferException(tr("Failed to open connection to API {0}.", url.toExternalForm()), e);
    136136            }
     
    149149            }
    150150
    151             activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect",15)*1000);
     151            activeConnection.setConnectTimeout(Main.pref.getInteger("socket.timeout.connect", 15)*1000);
    152152
    153153            try {
     
    170170                }
    171171                if (activeConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED)
    172                     throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED,null,null);
     172                    throw new OsmApiException(HttpURLConnection.HTTP_UNAUTHORIZED, null, null);
    173173
    174174                if (activeConnection.getResponseCode() == HttpURLConnection.HTTP_PROXY_AUTH)
     
    184184                            BufferedReader in = new BufferedReader(new InputStreamReader(i, StandardCharsets.UTF_8));
    185185                            String s;
    186                             while((s = in.readLine()) != null) {
     186                            while ((s = in.readLine()) != null) {
    187187                                errorBody.append(s);
    188188                                errorBody.append('\n');
    189189                            }
    190190                        }
    191                     } catch(Exception e) {
     191                    } catch (Exception e) {
    192192                        errorBody.append(tr("Reading error text failed."));
    193193                    }
Note: See TracChangeset for help on using the changeset viewer.