[8u] RFC: 8172695: (scanner) java/util/Scanner/ScanTest.java fails
akashche at redhat.com
Thu May 28 18:51:10 UTC 2020
Thanks for your comments!
On 05/28/2020 02:57 PM, Andrew Hughes wrote:
> On 25/05/2020 20:48, Alex Kashchenko wrote:
>> I'd like to solicit comments and suggestions about the backport of
>> JDK-8172695 to 8u.
>> Jira issue: https://bugs.openjdk.java.net/browse/JDK-8172695
>> There were a number of changes to ScanTest and to Scanner itself in 9+,
>> so to backport 8172695 cleanly the following issues need to be
>> backported as well:
>> 8132206: move ScanTest.java into OpenJDK
> This is an obvious pre-requisite and more testing is almost always good.
>> 8132745: TEST_BUG: minor cleanup of java/util/Scanner/ScanTest.java
> Minor one-liner change to the new test, so fine.
>> 8072722: add stream support to Scanner [excluding public API changes]
> This is a feature so we should work around this if possible. Which later
> parts depend on this?
This commit includes a cleanup to ScanTest:
The idea is to backport all changes to ScanTest, except
streamCloseTest() and streamComodTest() methods. Changes to private
methods of Scanner (excluding new public methods and spec changes) also
may be included.
8139414 depends on some of these changes.
>> 8139414: java.util.Scanner hasNext() returns true, next() throws
> This looks like a contained fix with virtue in its own right, but I'm
> concerned about changing established behaviour on 8u. The current
> behaviour is, however, a spec violation.
>> 8159545: closed/java/io/Console/TestConsole.java failed with exit code 1
>> [not public, see: https://hg.openjdk.java.net/jdk/jdk/rev/e5d52546ba3a ]
> Looks like a follow-on to the last bug, but unhelpful being private
>> 8166261: Scanner.nextInt(int) (and similar methods) throws
> Changes the specification of public methods, so no.
>> 8186157: (scanner) Modify java/util/Scanner/ScanTest.java to fail if
>> English Locale unavailable
> Test only change is fine.
>> What would be the preferred way to bring this to 8u? Is it better to
>> backport these changes one by one, or just take 8172695 and modify it
>> for 8u? Should bugfixes to Scanner itself (8139414 and 8166261) be
>> backported in latter case?
> So 8132206, 8132745, 8139414, 8159545, 8186157 & 8172695. Most of those
> are test only changes and the two Scanner changes fix bugs with test
> cases that are viable backports in their own right.
I'll proceed with backporting these changes.
More information about the jdk8u-dev