Revert "Revert "Remove connectivity dependency on Preconditions""
Preconditions.checkNotNull is deprecated to be replaced by Objects.requireNonNull, and other methods can easily be replaced by inline checks. Preconditions is an internal API class that should not be used by unbundled jars. Bug: 177046265 Change-Id: I3a67d266b32142c034520acbcdc30f7213db5e13 Merged-In: I3a67d266b32142c034520acbcdc30f7213db5e13 Test: m
This commit is contained in:
parent
1142754c99
commit
acd6de1364
1 changed files with 45 additions and 39 deletions
|
|
@ -24,7 +24,6 @@ import android.os.Build;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.android.internal.util.Preconditions;
|
||||
import com.android.net.module.util.InetAddressUtils;
|
||||
|
||||
import java.net.InetAddress;
|
||||
|
|
@ -153,7 +152,7 @@ public final class StaticIpConfiguration implements Parcelable {
|
|||
* @return The {@link Builder} for chaining.
|
||||
*/
|
||||
public @NonNull Builder setDnsServers(@NonNull Iterable<InetAddress> dnsServers) {
|
||||
Preconditions.checkNotNull(dnsServers);
|
||||
Objects.requireNonNull(dnsServers);
|
||||
mDnsServers = dnsServers;
|
||||
return this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue