public PortalPage getPortalPage(final Long portalPageId) { Assertions.notNull("portalPageId", portalPageId); return copyPortalPage(cacheById.get(portalPageId).getValue()); }
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UL_UNRELEASED_LOCK_EXCEPTION_PATH", justification="This appears to be doing exactly the right thing with the finally-clause to release the lock") public PortalPage create(final PortalPage portalPage) { Assertions.notNull("portalPage", portalPage); Assertions.notNull("portalPage.name", portalPage.getName()); Assertions.notNull("portalPage.owner", portalPage.getOwner()); PortalPage returnPage = null; try { returnPage = delegateStore.create(portalPage); } finally { if (returnPage != null) { cacheByUser.remove(portalPage.getOwner().getKey()); cacheById.remove(returnPage.getId()); } } return copyPortalPage(returnPage); }