stevedlawrence commented on a change in pull request #529:
URL: https://github.com/apache/daffodil/pull/529#discussion_r614241059
##########
File path:
daffodil-test/src/test/resources/org/apache/daffodil/layers/layers.tdml
##########
@@ -383,7 +383,7 @@ jones,arya,cat,1986-02-19
We gzip that, and then we must prepend that with the length (as a binary
4-byte int) before we base64 encode.
-->
- <tdml:documentPart type="text"
replaceDFDLEntities="true"><![CDATA[AAAAcx+LCAAAAAAAAAAtyUEKgCAQheG94E1mIDWittG+M0xpaNQIo5tuX0Kb98P7LioVjiTf3sn7%CR;%LF;K8CyzlqVO9UIkrcgFTYh9pnBTOOInUPba3XmyOX7WiEGlqfxgJ1B6xpzKEDyEOxUf7JoJq1e/RI4%CR;%LF;wXIAAAA=--END--]]></tdml:documentPart>
+ <tdml:documentPart type="text"
replaceDFDLEntities="true"><![CDATA[AAAAcx+LCAAAAAAAAP8tyUEKgCAQheG94E1mIDWittG+M0xpaNQIo5tuX0Kb98P7LioVjiTf3sn7%CR;%LF;K8CyzlqVO9UIkrcgFTYh9pnBTOOInUPba3XmyOX7WiEGlqfxgJ1B6xpzKEDyEOxUf7JoJq1e/RI4%CR;%LF;wXIAAAA=--END--]]></tdml:documentPart>
Review comment:
Yes, this change is part of Java 16. I believe it's just considered a
bug prior to Java 16. Here's the release notes where the change is mentioned:
https://jdk.java.net/16/release-notes#JDK-8244706
> GZIPOutputStream Sets the GZIP OS Header Field to the Correct Default
Value (JDK-8244706)
core-libs/java.util.jar
> Prior to JDK 16, GZIPOutputStream set the OS field in the GZIP header to 0
(meaning FAT filesystem), which does not match the default value specified in
section 2.3.1.2 of the GZIP file format specification version 4.3 (RFC 1952).
>
> As of JDK 16, the GZIP OS Header Field is set to 255, which is the default
value as defined in RFC 1952.
Take a look at the GZIPFixedOutputStream as part of this PR. This does what
you suggest and fixes the output so that this byte is always 255, regardless of
the java version.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]