ShelvedChange (@NotNull Project project, @NotNull Path patchPath, @NotNull String beforePath, @NotNull String afterPath, @NotNull FileStatus fileStatus) { // optimisation: memory afterPath = Objects.equals(beforePath, afterPath) ? beforePath : afterPath; Change change = createChange(project, patchPath, beforePath, afterPath, fileStatus); return new ShelvedChange(patchPath, beforePath, afterPath, fileStatus, change); }