Skip to content

Commit

Permalink
checkNotNull replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
gthea committed Dec 11, 2023
1 parent afee180 commit 8aa293d
Show file tree
Hide file tree
Showing 121 changed files with 156 additions and 136 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/split/android/client/FilterBuilder.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import androidx.annotation.NonNull;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class ServiceEndpoints {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import io.split.android.client.validators.PrefixValidatorImpl;
import io.split.android.client.validators.ValidationErrorInfo;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

/**
* Configurations for the SplitClient.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/split/android/client/SplitClientImpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.Map;
import java.util.Set;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class SplitManagerImpl implements SplitManager {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.attributes;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.Nullable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.attributes;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.events;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.events;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.VisibleForTesting;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.events.executors;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import io.split.android.client.SplitClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.events.executors;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import io.split.android.client.service.synchronizer.SyncManager;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class SyncImpressionListener implements ImpressionListener {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.localhost;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.localhost;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.localhost;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.network;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.split.android.client.network;

import static io.split.android.client.utils.Utils.getAsInt;

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

Expand Down Expand Up @@ -70,14 +72,6 @@ static void applySslConfig(SSLSocketFactory sslSocketFactory, DevelopmentSslConf
}
}

private static int getAsInt(long value) {
if (value > Integer.MAX_VALUE) {
return Integer.MAX_VALUE;
} else {
return (int) value;
}
}

private static void addHeaders(HttpURLConnection request, Map<String, String> headers) {
for (Map.Entry<String, String> entry : headers.entrySet()) {
if (entry == null) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.network;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import static io.split.android.client.network.HttpRequestHelper.applySslConfig;
import static io.split.android.client.network.HttpRequestHelper.applyTimeouts;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.network;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import static io.split.android.client.network.HttpRequestHelper.applySslConfig;
import static io.split.android.client.network.HttpRequestHelper.applyTimeouts;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.network;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.core.util.Pair;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import io.split.android.client.storage.impressions.PersistentImpressionsUniqueStorage;
import io.split.android.client.storage.splits.SplitsStorage;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class CleanUpDatabaseTask implements SplitTask {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.attributes;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.attributes;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.attributes;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import io.split.android.client.telemetry.storage.TelemetryRuntimeProducer;
import io.split.android.client.utils.logger.Logger;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class EventsRecorderTask implements SplitTask {
public final static int FAILING_CHUNK_SIZE = 20;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import android.os.Handler;
import android.os.Looper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import androidx.annotation.NonNull;

import com.google.common.util.concurrent.ThreadFactoryBuilder;
import io.split.android.client.service.executor.ThreadFactoryBuilder;

import io.split.android.engine.scheduler.PausableScheduledThreadPoolExecutorImpl;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import android.annotation.SuppressLint;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import java.lang.ref.WeakReference;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.executor.parallel;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.http;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.http;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.http;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.http.mysegments;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.impressions;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;
import androidx.annotation.VisibleForTesting;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.split.android.client.service.impressions;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

import androidx.annotation.NonNull;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;

import static com.google.common.base.Preconditions.checkNotNull;
import static io.split.android.client.utils.Utils.checkNotNull;

public class ImpressionsCounter {

Expand Down
Loading

0 comments on commit 8aa293d

Please sign in to comment.