* @see org.apache.jackrabbit.core.security.authorization.CompiledPermissions#canRead(Path, ItemId)
*/
public boolean canRead( Path path, ItemId itemId ) throws RepositoryException {
ItemId id = ( itemId == null ) ? session.getHierarchyManager().resolvePath( path ) : itemId;
// no extra check for existence as method may only be called for existing items.
boolean isExistingNode = id.denotesNode();
boolean canRead = false;
// emulates behavior of CompiledPermissionsImpl with two locks
// synchronized (readMonitor) {
synchronized ( monitor ) {
if ( readCache.containsKey( id ) ) {