You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2010/08/14 18:03:11 UTC
svn commit: r985519 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java
Author: mrglavas
Date: Sat Aug 14 16:03:11 2010
New Revision: 985519
URL: http://svn.apache.org/viewvc?rev=985519&view=rev
Log:
Fixing JIRA Issue #1464: http://issues.apache.org/jira/browse/XERCESJ-1464. Use 31 bits in computing the hash instead of 27. Should improve the distribution symbols in a very large table. Thanks to Roland Illig for spotting this issue.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java?rev=985519&r1=985518&r2=985519&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/util/SymbolTable.java Sat Aug 14 16:03:11 2010
@@ -243,7 +243,7 @@ public class SymbolTable {
* @param symbol The symbol to hash.
*/
public int hash(String symbol) {
- return symbol.hashCode() & 0x7FFFFFF;
+ return symbol.hashCode() & 0x7FFFFFFF;
} // hash(String):int
/**
@@ -263,7 +263,7 @@ public class SymbolTable {
for (int i = 0; i < length; ++i) {
code = code * 31 + buffer[offset + i];
}
- return code & 0x7FFFFFF;
+ return code & 0x7FFFFFFF;
} // hash(char[],int,int):int
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org