mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-100777 Tasks no longer Persist Context: closing archives
This commit is contained in:
@@ -117,8 +117,9 @@ public class WorkingContextManager {
|
||||
}
|
||||
|
||||
private synchronized void saveContext(@Nullable String entryName, String zipPostfix, @Nullable String comment) {
|
||||
JBZipFile archive = null;
|
||||
try {
|
||||
JBZipFile archive = getTasksArchive(zipPostfix);
|
||||
archive = getTasksArchive(zipPostfix);
|
||||
if (entryName == null) {
|
||||
int i = archive.getEntries().size();
|
||||
do {
|
||||
@@ -133,11 +134,13 @@ public class WorkingContextManager {
|
||||
saveContext(element);
|
||||
String s = new XMLOutputter().outputString(element);
|
||||
entry.setData(s.getBytes("UTF-8"));
|
||||
archive.close();
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
finally {
|
||||
closeArchive(archive);
|
||||
}
|
||||
}
|
||||
|
||||
private JBZipFile getTasksArchive(String postfix) throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user