Ignore:
Timestamp:
2014-04-26T15:28:16+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use multi-catch where applicable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorizationClient.java

    r6995 r7004  
    2626import oauth.signpost.OAuthProvider;
    2727import oauth.signpost.basic.DefaultOAuthProvider;
    28 import oauth.signpost.exception.OAuthCommunicationException;
    2928import oauth.signpost.exception.OAuthException;
    3029
     
    110109                    con.disconnect();
    111110                }
    112             } catch (NoSuchFieldException e) {
    113                 Main.error(e);
    114                 Main.warn(tr("Failed to cancel running OAuth operation"));
    115             } catch (SecurityException e) {
    116                 Main.error(e);
    117                 Main.warn(tr("Failed to cancel running OAuth operation"));
    118             } catch (IllegalAccessException e) {
     111            } catch (NoSuchFieldException | SecurityException | IllegalAccessException e) {
    119112                Main.error(e);
    120113                Main.warn(tr("Failed to cancel running OAuth operation"));
     
    146139            provider.retrieveRequestToken(consumer, "");
    147140            return OAuthToken.createToken(consumer);
    148         } catch(OAuthCommunicationException e){
    149             if (canceled)
    150                 throw new OsmTransferCanceledException(e);
    151             throw new OsmOAuthAuthorizationException(e);
    152141        } catch(OAuthException e){
    153142            if (canceled)
     
    180169            provider.retrieveAccessToken(consumer, null);
    181170            return OAuthToken.createToken(consumer);
    182         } catch(OAuthCommunicationException e){
    183             if (canceled)
    184                 throw new OsmTransferCanceledException(e);
    185             throw new OsmOAuthAuthorizationException(e);
    186171        } catch(OAuthException e){
    187172            if (canceled)
     
    441426            connection.setDoOutput(false);
    442427            connection.connect();
    443         } catch(MalformedURLException e) {
    444             throw new OsmOAuthAuthorizationException(e);
    445428        } catch(IOException e) {
    446429            throw new OsmOAuthAuthorizationException(e);
     
    504487            if (retCode != HttpURLConnection.HTTP_OK)
    505488                throw new OsmOAuthAuthorizationException(tr("Failed to authorize OAuth request  ''{0}''", requestToken.getKey()));
    506         } catch(MalformedURLException e) {
    507             throw new OsmOAuthAuthorizationException(e);
    508489        } catch(IOException e) {
    509490            throw new OsmOAuthAuthorizationException(e);
Note: See TracChangeset for help on using the changeset viewer.