Skip to content

Commit

Permalink
Merge pull request spring-projects#16620 from Christoph Dreis
Browse files Browse the repository at this point in the history
* spring-projectsgh-16620:
  Optimize JarEntry construction

Closes spring-projectsgh-16620
  • Loading branch information
wilkinsona committed Apr 23, 2019
2 parents 2799018 + f40b086 commit d0b4dab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ public byte[] getExtra() {
return this.extra;
}

public boolean hasExtra() {
return this.extra.length > 0;
}

public AsciiBytes getComment() {
return this.comment;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class JarEntry extends java.util.jar.JarEntry implements FileHeader {
setComment(header.getComment().toString());
setSize(header.getSize());
setTime(header.getTime());
setExtra(header.getExtra());
if (header.hasExtra()) {
setExtra(header.getExtra());
}
}

AsciiBytes getAsciiBytesName() {
Expand Down

0 comments on commit d0b4dab

Please sign in to comment.