JackrabbitSessionFacade extends SessionFacade<JackrabbitSession> implements JackrabbitSession { @Override public Item getItemOrNull(final String absPath) throws RepositoryException { Item internal = delegate.getItemOrNull(absPath); if (internal != null) { return ItemFacade.ensureBestWrapper(internal, this); } return null; } @SuppressWarnings("WeakerAccess")  JackrabbitSessionFacade(final @NotNull JackrabbitSession delegate, final boolean notProtected); @Override boolean hasPermission(final @NotNull String absPath, final @NotNull String... actions); @Override PrincipalManager getPrincipalManager(); @Override UserManager getUserManager(); @Override Item getItemOrNull(final String absPath); @Override Property getPropertyOrNull(final String absPath); @Override Node getNodeOrNull(final String absPath);  }
@Test public void testGetItemOrNull() throws Exception { inspectForTest(session -> { final JackrabbitSessionFacade facade = new JackrabbitSessionFacade(session, true); assertTrue("root node should be same as /", facade.getRootNode().isSame(facade.getItemOrNull("/"))); assertNull("/foo node should be null", facade.getItemOrNull("/foo")); }); }