From 52bd89fbd0ef087f25648bd1b61b0a17f45fe80d Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Mon, 11 Nov 2019 14:57:55 +0000 Subject: [PATCH] Remove erroneous references to PasswordApiConnection Closes #455 --- .../wdtk/wikibaseapi/ApiConnection.java | 20 +++++++++++-------- .../wdtk/wikibaseapi/BasicApiConnection.java | 3 --- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java index 1be005624..23af6ee91 100644 --- a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java +++ b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java @@ -39,7 +39,11 @@ import java.net.HttpURLConnection; import java.net.URL; import java.net.URLEncoder; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; /** @@ -47,7 +51,7 @@ * and login. * * This should no longer be instantiated directly: please use one of the subclasses - * {@class PasswordApiConnection} and {@class OAuthApiConnection} instead. This + * {@class BasicApiConnection} and {@class OAuthApiConnection} instead. This * class will become an interface in a future release. * * @author Michael Guenther @@ -244,7 +248,7 @@ protected ApiConnection( /** * Creates an API connection to wikidata.org. * - * @deprecated to be migrated to {@class PasswordApiConnection} + * @deprecated to be migrated to {@class BasicApiConnection} * @return {@link BasicApiConnection} */ @Deprecated @@ -255,7 +259,7 @@ public static BasicApiConnection getWikidataApiConnection() { /** * Creates an API connection to test.wikidata.org. * - * @deprecated to be migrated to {@class PasswordApiConnection} + * @deprecated to be migrated to {@class BasicApiConnection} * @return {@link BasicApiConnection} */ @Deprecated @@ -590,7 +594,7 @@ List getWarnings(JsonNode root) { * successful, and sets the internal state of the API connection accordingly * in this case. * - * @deprecated because it will be migrated to {@class PasswordApiConnection}. + * @deprecated because it will be migrated to {@class BasicApiConnection}. * * @param token * the login token string @@ -631,7 +635,7 @@ void confirmLogin(String token, String username, String password) /** * Returns a user-readable message for a given API response. * - * @deprecated to be migrated to {@class PasswordApiConnection} + * @deprecated to be migrated to {@class BasicApiConnection} * @param loginResult * a API login request result string other than * {@link #LOGIN_RESULT_SUCCESS} @@ -674,7 +678,7 @@ String getLoginErrorMessage(String loginResult) { * Reads out the Set-Cookie Header Fields and fills the cookie map of the * API connection with it. * - * @deprecated to be migrated to {@class PasswordApiConnection} + * @deprecated to be migrated to {@class BasicApiConnection} */ @Deprecated void fillCookies(Map> headerFields) { @@ -700,7 +704,7 @@ void fillCookies(Map> headerFields) { * Returns the string representation of the currently stored cookies. This * data is added to the connection before making requests. * - * @deprecated to be migrated to {@class PasswordApiConnection} + * @deprecated to be migrated to {@class BasicApiConnection} * @return cookie string */ @Deprecated diff --git a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnection.java b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnection.java index 67258c456..5d9c1e781 100644 --- a/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnection.java +++ b/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/BasicApiConnection.java @@ -73,7 +73,6 @@ private BasicApiConnection( /** * Creates an API connection to wikidata.org. * - * @deprecated to be migrated to {@class PasswordApiConnection} * @return {@link BasicApiConnection} */ public static BasicApiConnection getWikidataApiConnection() { @@ -83,7 +82,6 @@ public static BasicApiConnection getWikidataApiConnection() { /** * Creates an API connection to test.wikidata.org. * - * @deprecated to be migrated to {@class PasswordApiConnection} * @return {@link BasicApiConnection} */ public static BasicApiConnection getTestWikidataApiConnection() { @@ -159,7 +157,6 @@ String getCookieString() { /** * Returns a user-readable message for a given API response. * - * @deprecated to be migrated to {@class PasswordApiConnection} * @param loginResult * a API login request result string other than * {@link #LOGIN_RESULT_SUCCESS}