*/
public void putGrammar(Grammar grammar) {
if (!fPoolIsLocked) {
synchronized (fGrammars) {
clean();
XMLGrammarDescription desc = grammar.getGrammarDescription();
int hash = hashCode(desc);
int index = (hash & 0x7FFFFFFF) % fGrammars.length;
for (Entry entry = fGrammars[index]; entry != null; entry = entry.next) {
if (entry.hash == hash && equals(entry.desc, desc)) {
if (entry.grammar.get() != grammar) {