summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorTobias Thierer <tobiast@google.com>2018-05-30 16:53:27 +0100
committerTobias Thierer <tobiast@google.com>2018-05-30 17:33:25 +0100
commit3dd64b5f97ea819d401d09b366e7c334d432a1fc (patch)
tree3bc51dde4e3de2dfe05eba438aa9e29c39617ebe /annotations/generate_annotated_java_files.py
parent5c4cbc26b083acde9ad71983c7284b50fba16922 (diff)
Verify Matcher vs. OpenJDK 8u121-b13, step 7.
Adopt upstream behavior in some more corner cases. This upstream behavior has existed since at least OpenJDK 7u40; Android's previously never adopted it: - group(int): Throw IOOBE rather than AIOOBE when the index is out of bounds. Unlike the similar behavior change already adopted for start(int), end(int) in the parent CL, the change in group(int) was introduced in commit 075cf9ab88476958db0dd3ca80e21802fc623f66. Since start(int), end(int) changed upstream, this CL also changes group(int) in a similar fashion to match the behavior that that particular method already had upstream since at least OpenJDK 7u40. - find(int): When throwing IOOBE, do not reset() the Matcher as a side effect. This matches a similar behavior change in replaceFirst() in the parent CL. The behavior of reset()ing early was introduced in commit faa2342e585ce148d6de982106ec7b5735f07f1f (July 2017) and appears accidental. - replaceAll(String), replaceFirst(String): Adopt upstream implementations. The only behavior difference should be that after this CL, the methods now return the original input String rather than allocating a copy. The documentation mentions that the method returns "The string constructed by [...]", but it appears reasonable (and potentially more memory efficient) to not allocate a new String when not required. Because either behavior is reasonable, this CL does not add test coverage to be opinionated either way. Test: CtsLibcoreTestCases Bug: 80416774 Change-Id: I40ba8aebf4a67f9496b37d6f7f8627e687a2f0f3
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions