private void updateProperties() {
    // clear existing permissions before recalculating
    setDefaults();

    String user = null;
    String group = null;

    // the item with the lowest index has the lowest priority
    for (FilePropertiesSpec properties : stack) {
      filePermissions = properties.getFilePermissions().orElse(filePermissions);
      directoryPermissions = properties.getDirectoryPermissions().orElse(directoryPermissions);
      modificationTime = properties.getTimestamp().orElse(modificationTime);
      user = properties.getUser().orElse(user);
      group = properties.getGroup().orElse(group);
    }
    // ownership calculations
    ownership = (user != null ? user : "") + (group != null ? ":" + group : "");
  }
Remove the last layer from the stack. All values are recalculated.
jib-cli/src/main/java/com/google/cloud/tools/jib/cli/buildfile/FilePropertiesStack.java