This PR cleans up the existing DecimalFormatSymbols, DecimalFormat, and 
NumberFormat serialization tests.

As mentioned in https://github.com/openjdk/jdk/pull/27008 these tests can be 
re-visited.

These older tests are either not run (since they rely on being run by older JDK 
versions), rely on hex dump files, or are simply outdated. These are now 
removed or updated and moved under **DecimalFormat/SerializationTest.java** and 
**DFSSerializationTest.java**. Additionally, tests to check the stream version 
invariants are added for DecimalFormat.

Below are the existing tests that are removed or modified. (Their associated 
hex dump files are removed as well).

**DFSDeserialization142.java & DFSSerialization142.java** (D)

-  They do not have Jtreg headers and are not run. The comments indicate they 
require a specific JDK version of 1.4.2. Instead, a currency symbol test is 
added in place.

**NumberFormat/DFSSerialization.java** (D)

- Test 1 checks if a DFS written from a 1.4.2 JDK with stream version of 2 when 
read has the correct String exponent and currency symbol. -> There is an 
existing test which checks the exponent. A New test is added in place of 
currency symbol test.
- Test 2 checks that a DFS maintains the exponent separator and currency symbol 
when read. -> Tests are added in place of them of them.
- Test 3 is unrelated to de serialization, and checks that the exponent 
separator symbol setter throws NPE. -> Test 3 is already covered by 
**SettersShouldThrowNPETest.java**.

**SerializationLoad.java & SerializationSave.java** (D)

-  The save test depends on JDK 1.1.4, and is the code to write a DFS and DF. 
(It has no header and is not run.) The load test uses the saved 1.1.4 hex dump 
file to ensure the DFS and DF can be read, it did not check any specific 
invariants.

**NumberRegression.java** (M)

- Test4185761 and Test4069754 check NF/DF invariants and are ported to the 
dedicated serialization test file.

-------------

Commit messages:
 - init

Changes: https://git.openjdk.org/jdk/pull/27108/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27108&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8366733
  Stats: 1051 lines in 13 files changed: 214 ins; 787 del; 50 mod
  Patch: https://git.openjdk.org/jdk/pull/27108.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27108/head:pull/27108

PR: https://git.openjdk.org/jdk/pull/27108

Reply via email to