ZipOutputStream & directories
Alan Bateman
Alan.Bateman at oracle.com
Mon Mar 6 19:44:59 UTC 2023
On 06/03/2023 19:16, Lance Andersen wrote:
> :
>
> So I guess I do not see a huge downside, however we might want to look
> at a property to adjust in the unlikely event the unexpected occurs?
>
> Alan thoughts?
>
Yeah, the jar tool does the right thing and writes directories entries
with the STORED method and a size of 0.
Eirik's mail mentions that 7% of Spring Petclinic dependences are
directories. It might be interesting to dig into that to see how they
are generated, is it mostly maven-jar-plugin and if so, which APIs is it
using?
Changing ZOS.putNextEntry to ignore the method/size provided by the
caller would change long standing behavior, and Hyrum's Law has it that
somebody will notice. This may be something for an API note rather than
an implementation change.
-Alan
More information about the core-libs-dev
mailing list