Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
style: include SUI_CONTAINS_BEFORE_ADD
  • Loading branch information
vil02 committed Jun 13, 2024
commit 45c2308605c90579e050b41cd367a3aa57503a19
3 changes: 0 additions & 3 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@
<Match>
<Bug pattern="IMC_IMMATURE_CLASS_BAD_SERIALVERSIONUID" />
</Match>
<Match>
<Bug pattern="SUI_CONTAINS_BEFORE_ADD" />
</Match>
<Match>
<Bug pattern="DRE_DECLARED_RUNTIME_EXCEPTION" />
</Match>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ public int countGraphs() {
Set<Node> markedNodes = new HashSet<Node>();

for (Node n : nodeList) {
if (!markedNodes.contains(n)) {
markedNodes.add(n);
if (markedNodes.add(n)) {
markedNodes.addAll(depthFirstSearch(n, new ArrayList<Node>()));
count++;
}
Expand Down