void (@NotNull Project project) { if (myChanges != null) return; try { myChangesLoadingError = null; List<? extends FilePatch> list = ShelveChangesManager.loadPatchesWithoutContent(project, path, null); List<ShelvedChange> changes = new ArrayList<>(); for (FilePatch patch : list) { ShelvedChange change = createShelvedChange(project, path, patch); if (change != null) { changes.add(change); } else if (myChangesLoadingError == null) { String patchName = ObjectUtils.coalesce(patch.getBeforeName(), patch.getAfterName(), path.toString()); myChangesLoadingError = VcsBundle.message("shelve.loading.patch.error", patchName); } } myChanges = changes; } catch (Exception e) { LOG.warn("Failed to parse the file patch: [" + path + "]", e); myChanges = Collections.emptyList(); myChangesLoadingError = VcsBundle.message("shelve.loading.patch.error", e.getMessage()); } }