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
Loading
Please sign in to comment