From f5073cc441415528457971ce5b0325cc2da9cd83 Mon Sep 17 00:00:00 2001 From: Hiranya Jayathilaka Date: Tue, 25 Apr 2017 11:43:36 -0700 Subject: [PATCH] Scrubbing LDAPs in source files --- src/main/java/com/google/firebase/FirebaseApp.java | 2 +- .../firebase/FirebaseAppLifecycleListener.java | 2 +- .../java/com/google/firebase/FirebaseOptions.java | 2 +- .../firebase/auth/FirebaseAuthException.java | 4 ++-- .../auth/internal/FirebaseCustomAuthToken.java | 2 +- .../auth/internal/FirebaseTokenVerifier.java | 2 +- .../firebase/database/GenericTypeIndicator.java | 2 +- .../database/connection/ConnectionUtils.java | 2 +- .../connection/PersistentConnectionImpl.java | 6 +++--- .../firebase/database/core/AuthTokenProvider.java | 2 +- .../com/google/firebase/database/core/Context.java | 2 +- .../firebase/database/core/DatabaseConfig.java | 4 ++-- .../com/google/firebase/database/core/Repo.java | 2 +- .../firebase/database/tubesock/WebSocket.java | 2 +- .../google/firebase/database/util/JsonMapper.java | 2 +- .../utilities/encoding/CustomClassMapper.java | 4 ++-- .../google/firebase/internal/FirebaseAppStore.java | 2 +- .../com/google/firebase/internal/GuardedBy.java | 2 +- .../java/com/google/firebase/internal/Log.java | 2 +- .../internal/SharedPrefsFirebaseAppStore.java | 14 +++++++------- .../tasks/TaskCompletionListenerQueue.java | 2 +- .../java/com/google/firebase/FirebaseAppTest.java | 2 +- .../database/connection/ListenAggregator.java | 2 +- .../firebase/database/util/JsonMapperTest.java | 2 +- 24 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/google/firebase/FirebaseApp.java b/src/main/java/com/google/firebase/FirebaseApp.java index 887559b94..8de82bc8a 100644 --- a/src/main/java/com/google/firebase/FirebaseApp.java +++ b/src/main/java/com/google/firebase/FirebaseApp.java @@ -108,7 +108,7 @@ private FirebaseApp(String name, FirebaseOptions options, /** Returns a list of all FirebaseApps. */ public static List getApps() { - // TODO(arondeak): reenable persistence. See b/28158809. + // TODO: reenable persistence. See b/28158809. synchronized (appsLock) { return ImmutableList.copyOf(instances.values()); } diff --git a/src/main/java/com/google/firebase/FirebaseAppLifecycleListener.java b/src/main/java/com/google/firebase/FirebaseAppLifecycleListener.java index 2b0f2ffdc..60118c249 100644 --- a/src/main/java/com/google/firebase/FirebaseAppLifecycleListener.java +++ b/src/main/java/com/google/firebase/FirebaseAppLifecycleListener.java @@ -19,7 +19,7 @@ /** * A listener which gets notified when {@link com.google.firebase.FirebaseApp} gets deleted. */ -// TODO(arondeak): consider making it public in a future release. +// TODO: consider making it public in a future release. interface FirebaseAppLifecycleListener { /** diff --git a/src/main/java/com/google/firebase/FirebaseOptions.java b/src/main/java/com/google/firebase/FirebaseOptions.java index b3ae57185..ef8490b23 100644 --- a/src/main/java/com/google/firebase/FirebaseOptions.java +++ b/src/main/java/com/google/firebase/FirebaseOptions.java @@ -32,7 +32,7 @@ /** Configurable Firebase options. */ public final class FirebaseOptions { - // TODO(arondeak): deprecate and remove it once we can fetch these from Remote Config. + // TODO: deprecate and remove it once we can fetch these from Remote Config. private final String databaseUrl; private final FirebaseCredential firebaseCredential; diff --git a/src/main/java/com/google/firebase/auth/FirebaseAuthException.java b/src/main/java/com/google/firebase/auth/FirebaseAuthException.java index add85148b..f4a741bf3 100644 --- a/src/main/java/com/google/firebase/auth/FirebaseAuthException.java +++ b/src/main/java/com/google/firebase/auth/FirebaseAuthException.java @@ -16,10 +16,10 @@ package com.google.firebase.auth; -// TODO(rahulrav/isachen): Move it out from firebase-common. Temporary host it their for +// TODO: Move it out from firebase-common. Temporary host it their for // database's integration.http://b/27624510. -// TODO(rahulrav/isachen): Decide if changing this not enforcing an error code. Need to align +// TODO: Decide if changing this not enforcing an error code. Need to align // with the decision in http://b/27677218. Also, need to turn this into abstract later. import static com.google.common.base.Preconditions.checkArgument; diff --git a/src/main/java/com/google/firebase/auth/internal/FirebaseCustomAuthToken.java b/src/main/java/com/google/firebase/auth/internal/FirebaseCustomAuthToken.java index 82471fc44..e67576464 100644 --- a/src/main/java/com/google/firebase/auth/internal/FirebaseCustomAuthToken.java +++ b/src/main/java/com/google/firebase/auth/internal/FirebaseCustomAuthToken.java @@ -71,7 +71,7 @@ public static class Payload extends IdToken.Payload { /** * Any additional claims the developer wishes stored and signed by Firebase. * - *

TODO(jeffcraig@google.com): Come up with a solution to allow this to be parsed as the + *

TODO: Come up with a solution to allow this to be parsed as the * correct type. */ @Key("claims") diff --git a/src/main/java/com/google/firebase/auth/internal/FirebaseTokenVerifier.java b/src/main/java/com/google/firebase/auth/internal/FirebaseTokenVerifier.java index eefe42fcb..b945781d7 100644 --- a/src/main/java/com/google/firebase/auth/internal/FirebaseTokenVerifier.java +++ b/src/main/java/com/google/firebase/auth/internal/FirebaseTokenVerifier.java @@ -167,7 +167,7 @@ private String concat(Collection collection) { * Verifies the cryptographic signature on the FirebaseToken. Can block on a web request to fetch * the keys if they have expired. * - *

TODO(jeffcraig): Wrap these blocking steps in a Task. + *

TODO: Wrap these blocking steps in a Task. */ private boolean verifySignature(IdToken token) throws GeneralSecurityException, IOException { for (PublicKey key : publicKeysManager.getPublicKeys()) { diff --git a/src/main/java/com/google/firebase/database/GenericTypeIndicator.java b/src/main/java/com/google/firebase/database/GenericTypeIndicator.java index 4dddb74d5..3d9bb94d9 100644 --- a/src/main/java/com/google/firebase/database/GenericTypeIndicator.java +++ b/src/main/java/com/google/firebase/database/GenericTypeIndicator.java @@ -60,6 +60,6 @@ * @param The type of generic collection that this instance servers as an indicator for */ public abstract class GenericTypeIndicator { - // TODO(dimond): This is a legacy class that inherited from TypeIndicator from Jackson to be + // TODO: This is a legacy class that inherited from TypeIndicator from Jackson to be // able to resolve generic types. We need a new solution going forward. } diff --git a/src/main/java/com/google/firebase/database/connection/ConnectionUtils.java b/src/main/java/com/google/firebase/database/connection/ConnectionUtils.java index 27e9e4294..de04b58e6 100644 --- a/src/main/java/com/google/firebase/database/connection/ConnectionUtils.java +++ b/src/main/java/com/google/firebase/database/connection/ConnectionUtils.java @@ -60,7 +60,7 @@ public static Long longFromObject(Object o) { } } - // TODO(dimond): Merge these with Utils from firebase-database + // TODO: Merge these with Utils from firebase-database public static void hardAssert(boolean condition) { hardAssert(condition, ""); } diff --git a/src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java b/src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java index 97d5e367f..374dcaaaf 100644 --- a/src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java +++ b/src/main/java/com/google/firebase/database/connection/PersistentConnectionImpl.java @@ -183,7 +183,7 @@ public void listen( if (logger.logsDebug()) { logger.debug("Listening on " + query); } - // TODO(dimond): Fix this somehow? + // TODO: Fix this somehow? //hardAssert(query.isDefault() || !query.loadsAllData(), "listen() called for non-default but " // + "complete query"); hardAssert(!listens.containsKey(query), "listen() called twice for same QuerySpec."); @@ -322,7 +322,7 @@ public void unlisten(List path, Map queryParams) { logger.debug("unlistening on " + query); } - // TODO(dimond): fix this by understanding query params? + // TODO: fix this by understanding query params? //Utilities.hardAssert(query.isDefault() || !query.loadsAllData(), // "unlisten() called for non-default but complete query"); OutstandingListen listen = removeListen(query); @@ -1054,7 +1054,7 @@ private void sendConnectStats() { stats.put("persistence.android.enabled", 1); } stats.put("sdk.android." + context.getClientSdkVersion().replace('.', '-'), 1); - // TODO(dimond): Also send stats for connection version + // TODO: Also send stats for connection version } else { assert !this.context.isPersistenceEnabled() : "Stats for persistence on JVM missing (persistence not yet supported)"; diff --git a/src/main/java/com/google/firebase/database/core/AuthTokenProvider.java b/src/main/java/com/google/firebase/database/core/AuthTokenProvider.java index 9108a3ecd..badbb9105 100644 --- a/src/main/java/com/google/firebase/database/core/AuthTokenProvider.java +++ b/src/main/java/com/google/firebase/database/core/AuthTokenProvider.java @@ -66,7 +66,7 @@ interface TokenChangeListener { */ void onTokenChange(String token); - // TODO(mikelehen): Remove this once AndroidAuthTokenProvider is updated to call + // TODO: Remove this once AndroidAuthTokenProvider is updated to call // the other method. void onTokenChange(); diff --git a/src/main/java/com/google/firebase/database/core/Context.java b/src/main/java/com/google/firebase/database/core/Context.java index 1f0728316..34c5ce9e1 100644 --- a/src/main/java/com/google/firebase/database/core/Context.java +++ b/src/main/java/com/google/firebase/database/core/Context.java @@ -234,7 +234,7 @@ public PersistentConnection newPersistentConnection( private ScheduledExecutorService getExecutorService() { RunLoop loop = this.getRunLoop(); if (!(loop instanceof DefaultRunLoop)) { - // TODO(dimond): We really need to remove this option from the public DatabaseConfig + // TODO: We really need to remove this option from the public DatabaseConfig // object throw new RuntimeException("Custom run loops are not supported!"); } diff --git a/src/main/java/com/google/firebase/database/core/DatabaseConfig.java b/src/main/java/com/google/firebase/database/core/DatabaseConfig.java index e227dcca6..6b66a044c 100644 --- a/src/main/java/com/google/firebase/database/core/DatabaseConfig.java +++ b/src/main/java/com/google/firebase/database/core/DatabaseConfig.java @@ -23,13 +23,13 @@ import java.util.List; /** - * TODO(mikelehen): Since this is no longer public, we should merge it with Context and clean all + * TODO: Since this is no longer public, we should merge it with Context and clean all * this crap up. Some methods may need to be re-added to FirebaseDatabase if we want to still expose * them. */ public class DatabaseConfig extends Context { - // TODO(dimond): Remove this from the public API since we currently can't pass logging + // TODO: Remove this from the public API since we currently can't pass logging // across AIDL interface. /** diff --git a/src/main/java/com/google/firebase/database/core/Repo.java b/src/main/java/com/google/firebase/database/core/Repo.java index 8b369516c..9f7d3daac 100644 --- a/src/main/java/com/google/firebase/database/core/Repo.java +++ b/src/main/java/com/google/firebase/database/core/Repo.java @@ -133,7 +133,7 @@ private void deferredInitialization() { this.ctx.getAuthTokenProvider() .addTokenChangeListener( new AuthTokenProvider.TokenChangeListener() { - // TODO(mikelehen): Remove this once AndroidAuthTokenProvider is updated to call the + // TODO: Remove this once AndroidAuthTokenProvider is updated to call the // other overload. @Override public void onTokenChange() { diff --git a/src/main/java/com/google/firebase/database/tubesock/WebSocket.java b/src/main/java/com/google/firebase/database/tubesock/WebSocket.java index c03acd3ae..bc3eaaa5c 100644 --- a/src/main/java/com/google/firebase/database/tubesock/WebSocket.java +++ b/src/main/java/com/google/firebase/database/tubesock/WebSocket.java @@ -288,7 +288,7 @@ private Socket createSocket() { // Ensure proper hostname verification, per // https://tersesystems.com/2014/03/23/fixing-hostname-verification/ - // TODO(mikelehen): This code is different than Android. We should refactor it + // TODO: This code is different than Android. We should refactor it // into JvmPlatform. SSLParameters sslParams = new SSLParameters(); sslParams.setEndpointIdentificationAlgorithm("HTTPS"); diff --git a/src/main/java/com/google/firebase/database/util/JsonMapper.java b/src/main/java/com/google/firebase/database/util/JsonMapper.java index fcdd53c65..0c178f7e1 100644 --- a/src/main/java/com/google/firebase/database/util/JsonMapper.java +++ b/src/main/java/com/google/firebase/database/util/JsonMapper.java @@ -31,7 +31,7 @@ import org.json.JSONTokener; /** - * Helper class to convert from/to JSON strings. TODO(dimond): This class should ideally not live in + * Helper class to convert from/to JSON strings. TODO: This class should ideally not live in * firebase-database-connection, but it's required by both firebase-database and * firebase-database-connection, so leave it here for now. */ diff --git a/src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java b/src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java index 2d0dfda24..156d99f72 100644 --- a/src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java +++ b/src/main/java/com/google/firebase/database/utilities/encoding/CustomClassMapper.java @@ -322,7 +322,7 @@ private static BeanMapper loadOrCreateBeanMapperForClass(Class clazz) @SuppressWarnings("unchecked") private static Map expectMap(Object object) { if (object instanceof Map) { - // TODO(dimond): runtime validation of keys? + // TODO: runtime validation of keys? return (Map) object; } else { throw new DatabaseException( @@ -740,7 +740,7 @@ public T deserialize(Map values, Map>, Typ if (this.throwOnUnknownProperties) { throw new DatabaseException(message); } else if (this.warnOnUnknownProperties) { - // TODO(dimond): replace Android logging with "our" logging + // TODO: replace Android logging with "our" logging Log.w(LOG_TAG, message); } } diff --git a/src/main/java/com/google/firebase/internal/FirebaseAppStore.java b/src/main/java/com/google/firebase/internal/FirebaseAppStore.java index ee9472593..778295655 100644 --- a/src/main/java/com/google/firebase/internal/FirebaseAppStore.java +++ b/src/main/java/com/google/firebase/internal/FirebaseAppStore.java @@ -36,7 +36,7 @@ public static FirebaseAppStore getInstance() { return sInstance.get(); } - // TODO(arondeak): reenable persistence. See b/28158809. + // TODO: reenable persistence. See b/28158809. public static FirebaseAppStore initialize() { sInstance.compareAndSet(null /* expected */, new FirebaseAppStore()); return sInstance.get(); diff --git a/src/main/java/com/google/firebase/internal/GuardedBy.java b/src/main/java/com/google/firebase/internal/GuardedBy.java index 713a020de..9f1bd1ef7 100644 --- a/src/main/java/com/google/firebase/internal/GuardedBy.java +++ b/src/main/java/com/google/firebase/internal/GuardedBy.java @@ -17,7 +17,7 @@ package com.google.firebase.internal; /** Indicates that the given field can only be accessed when holding a particular lock. */ -// TODO(depoll): Remove this if we can find a safe alternative or take the dependency. +// TODO: Remove this if we can find a safe alternative or take the dependency. public @interface GuardedBy { /** Name of the variable guarded by this annotation. */ diff --git a/src/main/java/com/google/firebase/internal/Log.java b/src/main/java/com/google/firebase/internal/Log.java index f99e64a12..90cbe9363 100644 --- a/src/main/java/com/google/firebase/internal/Log.java +++ b/src/main/java/com/google/firebase/internal/Log.java @@ -20,7 +20,7 @@ import java.util.logging.Logger; /** Provides a logging interface for Firebase implementations. */ -// TODO(depoll): Remove this or replace logging internally. +// TODO: Remove this or replace logging internally. public final class Log { private static final String PARENT_LOGGER_NAME = "com.google.firebase"; diff --git a/src/main/java/com/google/firebase/internal/SharedPrefsFirebaseAppStore.java b/src/main/java/com/google/firebase/internal/SharedPrefsFirebaseAppStore.java index 2e10f8243..388db6ffd 100644 --- a/src/main/java/com/google/firebase/internal/SharedPrefsFirebaseAppStore.java +++ b/src/main/java/com/google/firebase/internal/SharedPrefsFirebaseAppStore.java @@ -35,15 +35,15 @@ import java.util.prefs.Preferences; /** Responsible for the persistence of FirebaseApps. */ -// TODO(arondeak): reenable persistence. See b/28158809. -// TODO(depoll): Make this an independent implementation using Preferences +// TODO: reenable persistence. See b/28158809. +// TODO: Make this an independent implementation using Preferences // once the Shared Preferences version is stable and re-enabled. public class SharedPrefsFirebaseAppStore extends FirebaseAppStore { // Increment this number if you make a backwards incompatible change to the storage format. // As currently implemented an increase of the data format version results in an ISE getting // thrown. - // TODO(arondeak): Change this behavior when this value is changed. + // TODO: Change this behavior when this value is changed. private static final int DATA_FORMAT_VERSION = 1; private static final String KEY_DATA_FORMAT_VERSION_VERSION = "version"; private static final String KEY_FIREBASE_APP_NAMES = "firebase-app-names"; @@ -126,7 +126,7 @@ public void persistApp(@NonNull FirebaseApp app) { } FirebaseOptions options = app.getOptions(); prefs.put(KEY_FIREBASE_APP_NAMES, encodedAppNamesValue + VALUE_SEPARATOR + encodedAppName); - // TODO(depoll): Make sure this has all of the options -- not just the DB URL. + // TODO: Make sure this has all of the options -- not just the DB URL. writeValue(prefs, KEY_PREFIX_DATABASE_URL + encodedAppName, options.getDatabaseUrl()); } } @@ -165,7 +165,7 @@ public FirebaseOptions restoreAppOptions(@NonNull String name) { return new FirebaseOptions.Builder() .setDatabaseUrl(readValue(prefs, KEY_PREFIX_DATABASE_URL + encodedName)) .build(); - // TODO(depoll): Ensure all of the options are included, not just DB URL. + // TODO: Ensure all of the options are included, not just DB URL. } } @@ -174,7 +174,7 @@ private void checkPersistedAppCompatible(FirebaseApp app) { FirebaseOptions options = restoreAppOptions(name); // This check is probably too restrictive. However it is easier to move from a more // restrictive check to a more lenient one than doing the reverse. - // TODO(arondeak): can we be less restrictive here? + // TODO: can we be less restrictive here? checkState( options.equals(app.getOptions()), "FirebaseApp %s incompatible with persisted version! Persisted options: %s, " @@ -191,7 +191,7 @@ private Preferences ensurePrefsInitialized() { resetStore(); } else if (readDataVersion != DATA_FORMAT_VERSION) { // Data in Preferences is an older format. - // TODO(arondeak): come up with something better before an SDK with an + // TODO: come up with something better before an SDK with an // incremented version is released. throw new IllegalStateException( String.format( diff --git a/src/main/java/com/google/firebase/tasks/TaskCompletionListenerQueue.java b/src/main/java/com/google/firebase/tasks/TaskCompletionListenerQueue.java index 9556b315e..ef59e19fd 100644 --- a/src/main/java/com/google/firebase/tasks/TaskCompletionListenerQueue.java +++ b/src/main/java/com/google/firebase/tasks/TaskCompletionListenerQueue.java @@ -43,7 +43,7 @@ class TaskCompletionListenerQueue { @GuardedBy("lock") private boolean flushing; - // TODO(jstembridge): Define behaviour for duplicate listeners. + // TODO: Define behaviour for duplicate listeners. public void add(@NonNull TaskCompletionListener listener) { synchronized (lock) { if (queue == null) { diff --git a/src/test/java/com/google/firebase/FirebaseAppTest.java b/src/test/java/com/google/firebase/FirebaseAppTest.java index 6993a9409..777e399c7 100644 --- a/src/test/java/com/google/firebase/FirebaseAppTest.java +++ b/src/test/java/com/google/firebase/FirebaseAppTest.java @@ -66,7 +66,7 @@ /** * Unit tests for {@link com.google.firebase.FirebaseApp}. */ -// TODO(arondeak): uncomment lines when Firebase API targets are in integ. +// TODO: uncomment lines when Firebase API targets are in integ. public class FirebaseAppTest { private static final FirebaseOptions OPTIONS = diff --git a/src/test/java/com/google/firebase/database/connection/ListenAggregator.java b/src/test/java/com/google/firebase/database/connection/ListenAggregator.java index 71233a05b..868e0dfba 100644 --- a/src/test/java/com/google/firebase/database/connection/ListenAggregator.java +++ b/src/test/java/com/google/firebase/database/connection/ListenAggregator.java @@ -46,7 +46,7 @@ public void run() { conns.get(0); List> pathList = new ArrayList<>(); List> queryParamList = new ArrayList<>(); - // TODO(dimond): Find a way to actually get listens, or not test against internal state? + // TODO: Find a way to actually get listens, or not test against internal state? //conn.getListens(pathList, queryParamList); Map> pathToQueryParamStrings = new HashMap<>(); diff --git a/src/test/java/com/google/firebase/database/util/JsonMapperTest.java b/src/test/java/com/google/firebase/database/util/JsonMapperTest.java index c44a52c37..63124f42f 100644 --- a/src/test/java/com/google/firebase/database/util/JsonMapperTest.java +++ b/src/test/java/com/google/firebase/database/util/JsonMapperTest.java @@ -50,7 +50,7 @@ public void canConvertDoubles() throws IOException { @Test @Ignore - // TODO(depoll): Stop ignoring this test once JSON parsing has been fixed. + // TODO: Stop ignoring this test once JSON parsing has been fixed. public void canNest33LevelsDeep() throws IOException { Map root = new HashMap<>(); Map currentMap = root;