--- old/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java 2014-06-04 13:55:59.291713232 -0700 +++ new/src/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java 2014-06-04 13:55:59.207712734 -0700 @@ -524,11 +524,13 @@ * @param token The token string */ private void addToken(String tokenStr) { - if (!fTokenNames.containsValue(tokenStr)) { - Integer tokenInt = new Integer(fTokenNames.size()); + String str = fTokenNames.get(tokenStr); + Integer tokenInt = str == null ? null : Integer.parseInt(str); + if (tokenInt == null) { + tokenInt = new Integer(fTokenNames.size()); fTokenNames.put(tokenInt, tokenStr); - addToken(tokenInt.intValue()); } + addToken(tokenInt.intValue()); } /** @@ -1251,4 +1253,4 @@ super.setProperty(propertyId, value); } -} +} \ No newline at end of file