RFR: JDK-8077371: Binary files in JAXP test should be removed [v4]

Lance Andersen lancea at openjdk.org
Tue May 2 16:30:30 UTC 2023


On Tue, 2 May 2023 14:05:03 GMT, Mahendra Chhipa <mchhipa at openjdk.org> wrote:

>> test/jdk/javax/xml/jaxp/datatype/8033980/SerializationTest.java line 85:
>> 
>>> 83: 
>>> 84:         // Generates the Java Pseudo code for base64 encoded string that can be cut & pasted into the test
>>> 85:         final StringBuilder sb = new StringBuilder();
>> 
>> Can you please explain the purpose of the following code in the `setup` method?.  This appears to be what you used to generate the _JDK**X**GregorianCalendarAndDurationSerData.java_ files.  I don't see why this would be needed in a setup method. 
>> 
>> Providing a method, along with comments of how to use it, to create byte arrays make sense, just not in a setup method.
>
> This is added in setup method to create the serialized data with current JDK version (JDK under test). In addition to serialized data generated with old JDK version.

Sorry, I still disagree with this.  Your comment in the test is as follows:

`// Generates the Java Pseudo code for base64 encoded string that can be cut & pasted into the test`

Which is what the method does and to facilitate it, as an example print it out so that it can be copied and pasted

` System.out.println(sb);`

Again, there is no reason to include this code in the setup method, it should be segmented out into its own method with instructions with how to create the encoded string

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13537#discussion_r1182779682


More information about the core-libs-dev mailing list