On Tue, 16 Jan 2024 10:55:07 GMT, Claes Redestad <redes...@openjdk.org> wrote:

> There's an unused concept of a pluginConfig that is passed into the jlink 
> compress plugins, however we always pass null here and the code seems broken 
> (the pluginConfig wouldn't have been stored properly). This seem to be a 
> left-over from a more generic plugin design that never came to fruition.
> 
> This PR cleans out this code from the plugins and decompressors, while 
> keeping the compressed header format intact for backwards compatibility (and 
> in case we want to revisit this in the future)

Changes requested by jlaskey (Reviewer).

src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressedResourceHeader.java
 line 104:

> 102:         ByteBuffer buffer = ByteBuffer.wrap(resource, 0, SIZE);
> 103:         buffer.order(order);
> 104:         int magic = buffer.getInt(0);

Named constant for offsets?

src/java.base/share/classes/jdk/internal/jimage/decompressor/CompressedResourceHeader.java
 line 108:

> 106:             return null;
> 107:         }
> 108:         long size = buffer.getLong(4);

Named constant for offsets?

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

PR Review: https://git.openjdk.org/jdk/pull/17443#pullrequestreview-1823928256
PR Review Comment: https://git.openjdk.org/jdk/pull/17443#discussion_r1453640996
PR Review Comment: https://git.openjdk.org/jdk/pull/17443#discussion_r1453641242

Reply via email to