android_packages_modules_Co.../staticlibs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean 677b663aaf Correctly test for an object being of the correct type
This `as? T` instruction warns that this is an unchecked cast.
It's unchecked in the literal senseĀ : the compiler actually
doesn't check that the var is of that type. Accordingly, this
will only fail if `it` is null, which never happens.

Concretely what that means is that Java code calling this
method like

  expect(AVAILABLE, network)

...will actually pass for *any* callback matching the network,
because the class is not checked.

Thankfully this code is recent and there doesn't seem to be a
lot of tests that got accepted by this bug when they should
have been rejected.

Test: ConnectivityServiceTest, TH
      new test in this patch that fails before but succeeds after
Change-Id: I2e48dae28ff92045f002cfb2798d383c9c19d5ed
2023-05-22 17:55:11 +09:00
..
device Merge "Change IaPrefixOption prefix length type to byte." 2023-05-12 04:37:12 +00:00
framework/com/android/net/module/util Merge "Define DNS-over-TLS port in static lib" 2023-05-11 11:48:27 +00:00
native Revert "Allow BpfMap to be accessed from NetworkStack" 2023-05-04 10:18:46 +00:00
netd Adds setNetworkAllowlist and freeze AIDL to v13 2022-12-23 09:47:29 +00:00
tests/unit Correctly test for an object being of the correct type 2023-05-22 17:55:11 +09:00
testutils Correctly test for an object being of the correct type 2023-05-22 17:55:11 +09:00
Android.bp Enable error-prone checking in the net-utils-framework-common 2023-05-04 14:03:58 +08:00
jarjar-rules-shared.txt Support both R and S+ in NetworkFactory 2021-07-08 10:20:58 +00:00