diff options
author | Xiao Ma <xiaom@google.com> | 2021-12-21 07:09:39 +0000 |
---|---|---|
committer | Xiao Ma <xiaom@google.com> | 2021-12-21 08:01:04 +0000 |
commit | 5395c4d242fbb4bc660ce16b5166421939f8fbbc (patch) | |
tree | f6f84d22e22babb2b8527fbb6ce618eb37fea69f /java | |
parent | 7fab67361424c4f2586bf51d741cc99e4b53e7a2 (diff) | |
download | ethernet-5395c4d242fbb4bc660ce16b5166421939f8fbbc.tar.gz |
Replace Preconditions.checkNotNull with Objects.requireNonNull.
Ethernet service related files are going to be moved into Connectivity
mainline module. Replace the Preconditions.checkNotNull usage in
EthernetNetworkFactory with Objects.requireNonNull.
Bug: 210586283
Test: atest EthernetServiceTests
Change-Id: Ibeaf687f706e8400f825cb2ca97bb1341774a97d
Diffstat (limited to 'java')
-rw-r--r-- | java/com/android/server/ethernet/EthernetNetworkFactory.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/java/com/android/server/ethernet/EthernetNetworkFactory.java b/java/com/android/server/ethernet/EthernetNetworkFactory.java index 2886cf1..a9f8b47 100644 --- a/java/com/android/server/ethernet/EthernetNetworkFactory.java +++ b/java/com/android/server/ethernet/EthernetNetworkFactory.java @@ -16,8 +16,6 @@ package com.android.server.ethernet; -import static com.android.internal.util.Preconditions.checkNotNull; - import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; @@ -370,7 +368,7 @@ public class EthernetNetworkFactory extends NetworkFactory { @NonNull NetworkCapabilities capabilities, NetworkFactory networkFactory, Dependencies deps) { name = ifaceName; - mCapabilities = checkNotNull(capabilities); + mCapabilities = Objects.requireNonNull(capabilities); mHandler = handler; mContext = context; mNetworkFactory = networkFactory; |