summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2018-04-25 20:43:39 +0100
committerTobias Thierer <tobiast@google.com>2018-05-01 11:33:18 +0100
commit2e6efcfa6e66c10130eba37a31dfa5044170fe14 (patch)
treedf7313123c24db26f1c5a85d0971cbccf78004c3 /annotations/generate_annotated_java_files.py
parent2399174cc54f122353cc06aa77e51fdb68917c95 (diff)
Verify java.nio.ByteBuffer against OpenJDK8u121-b13, part 2.
Part 1 was commit 0d6471219bdd70d45b784a810e037e97011d6459. Changes in this CL: - move check for (!isAccessible()) from put(ByteBuffer) back into the DirectByteBuffer subclass. It had previously been moved up into ByteBuffer.java by CL [1] which made a performance improvement in the rest of the method. This move is a pure refactoring without behavior change because DirectByteBuffer is the only subclass that overrides isAccessible(); it already contains similar checks in several places, so having this check there is more consistent. There are no ByteBuffer subclasses outside of the platform because ByteBuffer and its subclasses have package private constructors. - revert addition of { } around if-blocks with a single statement. These had also been added by CL [1]. - add change marker for the performance improvement from CL [1]. - revert redundant addition of a check for (capacity < 0) in allocateDirect(int). The java.nio.Buffer superclass already throws IAE for cap < 0 (although with a different exception message) so we don't need to duplicate that check here. ByteBuffer.testAllocateDirect() verifies that this still throws IAE. This test method was only recently added in CL [2]. Previously, this was not covered by tests. [1] libcore commit 27c702be4464b10bc99900769bc037fe4b0cfb7f at http://r.android.com/202536 [2] libcore commit fdfeacfac1c62197b784d58d89fcf5c6c29e0315 at http://r.android.com/672191 Left for a future CL: - {get,put}*Unchecked() methods - boolean isAccessible(), void setAccessible(boolean) Test: CtsLibcoreTestCases Bug: 35910877 Change-Id: I380b4cf1079d079c242c5353a079fe638d12e3ba
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions