Community
Participate
Working Groups
Build Identifier: 20100917-0705 When comparing two classes with Long class variables, the ASTMatcher produces a difference, where the values "1l" and "1L" are syntactically, but not semantically, different. Reproducible: Always
Created attachment 194563 [details] Test project to reproduce the bug.
You should replace your ASTMatcher with your own implementation if you want to match 1l with 1L. Something like this would work: ASTMatcher matcher = new ASTMatcher(true) { @Override public boolean match(NumberLiteral node, Object other) { if (!(other instanceof NumberLiteral)) { return false; } NumberLiteral o = (NumberLiteral) other; return safeEquals( node.getToken().toLowerCase(), o.getToken().toLowerCase()); } }; By default, the ASTMatcher is matching 1:1. So only identical nodes are reported as matching. For example, 0x01 doesn't match with 1. Closing as WONTFIX. Let me know if you have any questions.
Verified for 3.7RC1.