{
Integer pos = ((Integer)idx.get(name));
if (pos == null)
{
throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
}
entry = (RegistryEntry)entries.get(pos.intValue()) ;
}
}
}
catch(Exception e)
{
// this will happen if for some reasons the index and vector are desynchronized.
// before throwing an exception, rebuild the idx to prevent further errors
synchronized(entries)
{
buildIdx();
}
logger.error("getEntry: index and vector are not in synch.", e);
throw new InvalidEntryException( InvalidEntryException.ENTRY_DOES_NOT_EXIST+" "+name );
}
return entry;
}