Skip to content

Main #6645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Main #6645

Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change regex dependency to re2j
  • Loading branch information
ChaoqunCHEN committed Apr 14, 2020
commit d9962f1e5ee377bc36636359e34b503b5afc0e7d
1 change: 1 addition & 0 deletions firebase-installations/firebase-installations.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies {

implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-tasks:17.0.0'
implementation 'com.google.re2j:re2j:1.0'


compileOnly "com.google.auto.value:auto-value-annotations:1.6.5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@

import android.text.TextUtils;

import androidx.annotation.Nullable;
import androidx.annotation.NonNull;

import com.google.firebase.installations.local.PersistedInstallationEntry;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;

import com.google.re2j.Pattern;

/** Util methods used for {@link FirebaseInstallations} */
class Utils {
Expand Down Expand Up @@ -49,11 +50,11 @@ public long currentTimeInSecs() {
return TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis());
}

static boolean isValidAppIdFormat(@Nullable String appId) {
static boolean isValidAppIdFormat(@NonNull String appId) {
return appId.contains(APP_ID_IDENTIFICATION_SUBSTRING);
}

static boolean isValidApiKeyFormat(@Nullable String apiKey) {
static boolean isValidApiKeyFormat(@NonNull String apiKey) {
return API_KEY_FORMAT.matcher(apiKey).matches();
}
}