This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit e4976ff4b8321fd0062b19b4ee8d1ddcb41f980c Author: Gary David Gregory (Code signing key) <[email protected]> AuthorDate: Sat Jun 22 10:32:35 2024 -0400 Add SpotBugs TODO Is this really identity equality and not object equality? --- src/conf/spotbugs-exclude-filter.xml | 7 +++++++ src/examples/Mini/ASTFunDecl.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/conf/spotbugs-exclude-filter.xml b/src/conf/spotbugs-exclude-filter.xml index f6ae0dd1..0de6c655 100644 --- a/src/conf/spotbugs-exclude-filter.xml +++ b/src/conf/spotbugs-exclude-filter.xml @@ -154,6 +154,13 @@ <Bug pattern="MS_PKGPROTECT"/> </Match> + <!-- TODO Is this really identity equality and not object equality? --> + <Match> + <Class name="Mini.ASTFunDecl"/> + <Method name="optimizeIFs"/> + <Bug pattern="EC_UNRELATED_TYPES_USING_POINTER_EQUALITY"/> + </Match> + <!-- Skip JavaCC generated code. --> <Match> <Class name="Mini.MiniParser"/> diff --git a/src/examples/Mini/ASTFunDecl.java b/src/examples/Mini/ASTFunDecl.java index 6002a168..a3f246d7 100644 --- a/src/examples/Mini/ASTFunDecl.java +++ b/src/examples/Mini/ASTFunDecl.java @@ -111,6 +111,7 @@ public class ASTFunDecl extends SimpleNode implements MiniParserTreeConstants { final InstructionTargeter[] targeters = target.getTargeters(); for (final InstructionTargeter targeter : targeters) { + // TODO Is this really identity equality and not object equality? if (target != match[4] || targeter != match[2]) { System.err.println("Unexpected: " + e); }
