Skip to content

Commit

Permalink
Fix test failure when you close one project and open another
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Gooderham <turkeyonmarblerye@gmail.com>
  • Loading branch information
turkeylurkey committed Jan 11, 2025
1 parent e5e1065 commit dcb57d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public static ActionToolbar buildActionToolbar(Tree tree) {
*/
public static Tree buildTree(Project project, Color backgroundColor) {
LibertyModules libertyModules = LibertyModules.getInstance().scanLibertyModules(project);
if (libertyModules.isEmpty()) {
// This singleton may contain entries from old projects if you close a project and open another
if (libertyModules.getLibertyModules(project).isEmpty()) {
return null;
}
DefaultMutableTreeNode top = new DefaultMutableTreeNode("Root node");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ public synchronized static LibertyModules getInstance() {
return instance;
}

public boolean isEmpty() {
return libertyModules.isEmpty();
}
/**
* Scan the project for the modules that are Liberty apps.
* @return null if there are no Liberty modules
Expand Down

0 comments on commit dcb57d4

Please sign in to comment.