mbien commented on code in PR #8164:
URL: https://github.com/apache/netbeans/pull/8164#discussion_r1921611075
##########
ide/projectui/src/org/netbeans/modules/project/ui/ProjectUtilities.java:
##########
@@ -483,31 +481,31 @@ public static boolean closeAllDocuments(Project[]
projects, boolean notifyUI, St
// store project's documents
// loop all project being closed
for (Map.Entry<Project,Set<String>> entry :
urls4project.entrySet()) {
- storeProjectOpenFiles(entry.getKey(), entry.getValue(),
groupName);
+ storeProjectOpenFiles(entry.getKey(), new
ArrayList<>(entry.getValue()), groupName);
}
}
return urls4project != null;
}
- public static void storeProjectOpenFiles(Project p, Set<String> urls,
String groupName) {
+ public static void storeProjectOpenFiles(Project p, List<String> urls,
String groupName) {
AuxiliaryConfiguration aux = ProjectUtils.getAuxiliaryConfiguration(p);
- Set<String> openFileUrls = getOpenFilesUrls(p, groupName);
- if(urls.isEmpty() && openFileUrls.isEmpty()) {
+ List<String> openFileUrls = getOpenFilesUrls(p, groupName);
+ if (urls.isEmpty() && openFileUrls.isEmpty()) {
// was empty, stays empty, leave
return;
- }
- if(urls.size() == openFileUrls.size()) {
+ }
+ // check if file list changed, order matters
Review Comment:
good point - simplified the section
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists