diff --git a/docs/releasenotes.html b/docs/releasenotes.html index ce3cefa5f..5edc1a675 100644 --- a/docs/releasenotes.html +++ b/docs/releasenotes.html @@ -127,6 +127,9 @@
  • Fixed inconsistent handling of NLOW (new line on wrap) option by LeftCurly check. (bug 866501)
  • +
  • JDK 1.4 classes used by usage checks. + (bug 876570)
  • +

    diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java index 6667de171..29d424277 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/checks/usage/transmogrify/ASTManager.java @@ -21,7 +21,6 @@ package com.puppycrawl.tools.checkstyle.checks.usage.transmogrify; import java.io.File; import java.util.HashMap; import java.util.HashSet; -import java.util.IdentityHashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; @@ -40,8 +39,13 @@ public final class ASTManager /** singleton */ private static final ASTManager INSTANCE = new ASTManager(); - /** maps DetailASTs to SymTabASTs. */ - private Map mMap = new IdentityHashMap(); + /** + * Maps DetailASTs to SymTabASTs. + * A HashMap is acceptable provided DetailAST method hashCode() returns + * distinct integers for distinct objects. + * If not, a structure such as IdentityHashMap must be employed. + */ + private Map mMap = new HashMap(); /** root with subtrees for a set of files */ private SymTabAST mCompleteTree = null;