JDK-8073481 : Some ZipEntry setters do the wrong null checks
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2015-02-19
  • Updated: 2015-02-20
  • Resolved: 2015-02-20
Related Reports
Duplicate :  
Description
in java.util.zip.ZipEntry:

     * @throws NullPointerException if the {@code time} is null
    public ZipEntry setLastAccessTime(FileTime time) {
        Objects.requireNonNull(name, "time");
        this.atime = time;
        return this;
    }

time should be checked, not name. Same issue in setCreationTime, setLastModifiedTime

Could be written:

    public ZipEntry setLastAccessTime(FileTime time) {
        this.atime = Objects.requireNonNull(time, "time");;
        return this;
    }
Comments
This seems to be the cause of that, yes. Close this as duplicate?
19-02-2015

is this JDK-8068790 ?
19-02-2015