test_class.declarator: cache = new PermissionEntryCache()
test_class.modifier: private
test_class.original_string: private PermissionEntryCache cache = new PermissionEntryCache();
test_class.type: PermissionEntryCache
test_class.var_name: cache
test_class.declarator: permissionEntry
test_class.modifier: private
test_class.original_string: private PermissionEntry permissionEntry;
test_class.type: PermissionEntry
test_class.var_name: permissionEntry
test_class.declarator: ppe
test_class.modifier: private
test_class.original_string: private PrincipalPermissionEntries ppe;
test_class.type: PrincipalPermissionEntries
test_class.var_name: ppe
test_class.declarator: store
test_class.modifier: private
test_class.original_string: private PermissionStore store;
test_class.type: PermissionStore
test_class.var_name: store
test_class.file: oak-core/src/test/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionEntryCacheTest.java
test_class.identifier: PermissionEntryCacheTest
test_case.body: @Test
      public void testGetFullyLoadedEntries() throws Exception {
          ppe.setFullyLoaded(true);
          when(store.load("a")).thenReturn(ppe);
  
          PrincipalPermissionEntries entries = cache.getFullyLoadedEntries(store, "a");
          assertSame(ppe, entries);
  
          PrincipalPermissionEntries inspectedEntries = inspectEntries(cache, "a");
          assertSame(ppe, inspectedEntries);
  
          // requesting the entries again must NOT hit the store
          when(store.load("a")).thenThrow(IllegalStateException.class);
          entries = cache.getFullyLoadedEntries(store, "a");
          assertSame(ppe, entries);
      }
test_case.class_method_signature: PermissionEntryCacheTest.testGetFullyLoadedEntries()
test_case.full_signature: @Test public void testGetFullyLoadedEntries()
test_case.identifier: testGetFullyLoadedEntries
test_case.invocations: setFullyLoaded thenReturn when load getFullyLoadedEntries assertSame inspectEntries assertSame thenThrow when load getFullyLoadedEntries assertSame
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetFullyLoadedEntries()
focal_class.declarator: log = LoggerFactory.getLogger(PermissionEntryCache.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(PermissionEntryCache.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: entries = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, PrincipalPermissionEntries> entries = new HashMap<>();
focal_class.type: Map<String, PrincipalPermissionEntries>
focal_class.var_name: entries
focal_class.file: oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/permission/PermissionEntryCache.java
focal_class.identifier: PermissionEntryCache
focal_class.class_method_signature: PermissionEntryCache.getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_class.full_signature: @NotNull PrincipalPermissionEntries getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_class.identifier: getFullyLoadedEntries
focal_class.modifiers: @NotNull
focal_class.parameters: (@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_class.return: PrincipalPermissionEntries
focal_class.signature: PrincipalPermissionEntries getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_class.class_method_signature: PermissionEntryCache.init(@NotNull String principalName, long expectedSize)
focal_class.full_signature:  void init(@NotNull String principalName, long expectedSize)
focal_class.identifier: init
focal_class.parameters: (@NotNull String principalName, long expectedSize)
focal_class.return: void
focal_class.signature: void init(@NotNull String principalName, long expectedSize)
focal_class.class_method_signature: PermissionEntryCache.load(@NotNull PermissionStore store,
                @NotNull Collection<PermissionEntry> ret,
                @NotNull String principalName,
                @NotNull String path)
focal_class.full_signature:  void load(@NotNull PermissionStore store,
                @NotNull Collection<PermissionEntry> ret,
                @NotNull String principalName,
                @NotNull String path)
focal_class.identifier: load
focal_class.parameters: (@NotNull PermissionStore store,
                @NotNull Collection<PermissionEntry> ret,
                @NotNull String principalName,
                @NotNull String path)
focal_class.return: void
focal_class.signature: void load(@NotNull PermissionStore store,
                @NotNull Collection<PermissionEntry> ret,
                @NotNull String principalName,
                @NotNull String path)
focal_method.body: @NotNull
      PrincipalPermissionEntries getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName) {
          PrincipalPermissionEntries ppe = entries.get(principalName);
          if (ppe == null || !ppe.isFullyLoaded()) {
              ppe = store.load(principalName);
              entries.put(principalName, ppe);
          }
          return ppe;
      }
focal_method.class_method_signature: PermissionEntryCache.getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_method.full_signature: @NotNull PrincipalPermissionEntries getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_method.identifier: getFullyLoadedEntries
focal_method.invocations: get isFullyLoaded load put
focal_method.modifiers: @NotNull
focal_method.parameters: (@NotNull PermissionStore store,
                                                       @NotNull String principalName)
focal_method.return: PrincipalPermissionEntries
focal_method.signature: PrincipalPermissionEntries getFullyLoadedEntries(@NotNull PermissionStore store,
                                                       @NotNull String principalName)