Commit d0b4dab1 authored by Andy Wilkinson's avatar Andy Wilkinson

Merge pull request #16620 from Christoph Dreis

* gh-16620:
  Optimize JarEntry construction

Closes gh-16620
parents 27990180 f40b086e
......@@ -153,6 +153,10 @@ final class CentralDirectoryFileHeader implements FileHeader {
return this.extra;
}
public boolean hasExtra() {
return this.extra.length > 0;
}
public AsciiBytes getComment() {
return this.comment;
}
......
......@@ -56,8 +56,10 @@ class JarEntry extends java.util.jar.JarEntry implements FileHeader {
setComment(header.getComment().toString());
setSize(header.getSize());
setTime(header.getTime());
if (header.hasExtra()) {
setExtra(header.getExtra());
}
}
AsciiBytes getAsciiBytesName() {
return this.name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment