diff options
author | Tobias Thierer <tobiast@google.com> | 2016-09-06 18:06:24 +0100 |
---|---|---|
committer | Tobias Thierer <tobiast@google.com> | 2016-09-22 15:55:11 +0100 |
commit | 4bf3fba8f90e901b50af7ed4e16f02d0bcdf5bcf (patch) | |
tree | b4337016fa86aff67577d608bcdeafcd26cf1c73 /annotations/generate_annotated_java_files.py | |
parent | e1bee3b4eb43e4401d88b5c7395258424569239e (diff) |
Update Properties to OpenJDK8u60
- This contains a deliberate behavior change in the case of
a single backslash (possibly followed by newline characters)
at the end of input. Such a trailing backslash is now skipped
whereas previously it was parsed as \u0000.
The new behavior makes more sense and there is nothing in
the documentation asserting either behavior. Further, the
new behavior matches upstream.
The tests that were asserting the old behavior were
added as harmony SVN revision 617124 with commit message
"Fix for HARMONY-5414 (java.util.Properties.load() decodes
invalid unicode sequences)". This references the harmony bug:
https://issues.apache.org/jira/browse/HARMONY-5414
While the test code attached to the bug does cover the
case of a lone \, it is not mentioned in the bug description.
The bug otherwise focuses on unicode sequences with numbers
of digits other than 4, e.g. \u123 which is asserted to yield
IllegalArgumentException.
This CL changes the test to assert the new behavior which is
that the backslash is ignored/trimmed.
This CL also adds more comprehensive test coverage for
properties read from a Reader and with trailing backslashes
at end of line followed by end of input, newline characters,
or additional lines.
- Android-changed: The implementation for loading/storing
properties from/to XML stil uses OpenJDK7u40's java.util.XMLUtils.
The upstream replacement XmlSupport adds considerable dependencies
and complexity that would have no apparent behavioral benefit on
Android.
Test: PropertiesTest
Test: Verified that testTrailingBackslash() fails if
the first fix is commented out.
Test: Verified that testTrailingBackslashAndNewline()
fails if the second fix is commented out.
Bug: 29935305
Change-Id: I93a4b879c10909d31585320af9b0d5c1fe7e46b8
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions