Changeset 12204 in josm for trunk


Ignore:
Timestamp:
2017-05-18T21:56:44+02:00 (8 years ago)
Author:
Don-vip
Message:

remove unused code (pre-HttpClient)

File:
1 edited

Legend:

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

    r11381 r12204  
    66import java.io.BufferedReader;
    77import java.io.IOException;
    8 import java.lang.reflect.Field;
    98import java.net.CookieHandler;
    109import java.net.HttpURLConnection;
     
    8988    public void cancel() {
    9089        canceled = true;
    91         if (provider != null) {
    92             try {
    93                 Field f = provider.getClass().getDeclaredField("connection");
    94                 Utils.setObjectsAccessible(f);
    95                 HttpURLConnection con = (HttpURLConnection) f.get(provider);
    96                 if (con != null) {
    97                     con.disconnect();
    98                 }
    99             } catch (NoSuchFieldException | SecurityException | IllegalAccessException e) {
    100                 Main.error(e);
    101                 Main.warn(tr("Failed to cancel running OAuth operation"));
    102             }
    103         }
    10490        synchronized (this) {
    10591            if (connection != null) {
Note: See TracChangeset for help on using the changeset viewer.