Commit 0b6eb5a4 authored by Yi Kong's avatar Yi Kong
Browse files

Add test to assert DatagramSocket#receive behaviour

If a packet is received on a DatagraSocket, and its source address is
the same as the packet's address, then the packet's address object
should be left unchanged and is the same object.

This behaviour was unintentionally changed in the Android N release, but
we decide to keep this behaviour since it is not likely to break any
existing code and it has better performance by avoid creating extra
objects.

Test: libcore.java.net.DatagramSocketTest
Change-Id: I8a54f33b3f103f564e4963eac374be97d991f663
parent e30fed3a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment