Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableActionProviderTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableActionProviderTest.java?rev=1882131&r1=1882130&r2=1882131&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableActionProviderTest.java (original) +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableActionProviderTest.java Tue Sep 29 15:59:10 2020 @@ -64,13 +64,7 @@ public class WhiteboardAuthorizableActio public void testRegisteredImplementation() { actionProvider.start(whiteboard); - AuthorizableActionProvider registered = new AuthorizableActionProvider() { - @NotNull - @Override - public List<? extends AuthorizableAction> getAuthorizableActions(@NotNull SecurityProvider securityProvider) { - return ImmutableList.of(new TestAction()); - } - }; + AuthorizableActionProvider registered = securityProvider -> ImmutableList.of(new TestAction()); whiteboard.register(AuthorizableActionProvider.class, registered, ImmutableMap.of()); List<? extends AuthorizableAction> actions = actionProvider.getAuthorizableActions(Mockito.mock(SecurityProvider.class));
Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableNodeNameTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableNodeNameTest.java?rev=1882131&r1=1882130&r2=1882131&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableNodeNameTest.java (original) +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardAuthorizableNodeNameTest.java Tue Sep 29 15:59:10 2020 @@ -53,13 +53,7 @@ public class WhiteboardAuthorizableNodeN public void testRegisteredImplementation() { authorizableNodeName.start(whiteboard); - AuthorizableNodeName registered = new AuthorizableNodeName() { - @NotNull - @Override - public String generateNodeName(@NotNull String authorizableId) { - return "generated"; - } - }; + AuthorizableNodeName registered = authorizableId -> "generated"; whiteboard.register(AuthorizableNodeName.class, registered, ImmutableMap.of()); assertEquals(registered.generateNodeName(TEST_ID), authorizableNodeName.generateNodeName(TEST_ID)); } Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardUserAuthenticationFactoryTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardUserAuthenticationFactoryTest.java?rev=1882131&r1=1882130&r2=1882131&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardUserAuthenticationFactoryTest.java (original) +++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/security/user/whiteboard/WhiteboardUserAuthenticationFactoryTest.java Tue Sep 29 15:59:10 2020 @@ -41,7 +41,7 @@ public class WhiteboardUserAuthenticatio return new WhiteboardUserAuthenticationFactory(defaultFactory) { @Override protected List<UserAuthenticationFactory> getServices() { - List<UserAuthenticationFactory> factories = new ArrayList<UserAuthenticationFactory>(userIds.length); + List<UserAuthenticationFactory> factories = new ArrayList<>(userIds.length); for (String uid : userIds) { factories.add(new TestUserAuthenticationFactory(uid)); } @@ -62,7 +62,7 @@ public class WhiteboardUserAuthenticatio } @Test - public void testSingleService() throws Exception { + public void testSingleService() { WhiteboardUserAuthenticationFactory factory = createFactory(null, "test"); assertNotNull(factory.getAuthentication(getUserConfiguration(), root, "test")); @@ -70,7 +70,7 @@ public class WhiteboardUserAuthenticatio } @Test - public void testMultipleService() throws Exception { + public void testMultipleService() { WhiteboardUserAuthenticationFactory factory = createFactory(null, "test", "test2"); assertNotNull(factory.getAuthentication(getUserConfiguration(), root, "test")); @@ -79,7 +79,7 @@ public class WhiteboardUserAuthenticatio } @Test - public void testDefault() throws Exception { + public void testDefault() { WhiteboardUserAuthenticationFactory factory = createFactory(new TestUserAuthenticationFactory("abc")); assertNotNull(factory.getAuthentication(getUserConfiguration(), root, "abc")); @@ -89,7 +89,7 @@ public class WhiteboardUserAuthenticatio } @Test - public void testMultipleServiceAndDefault() throws Exception { + public void testMultipleServiceAndDefault() { WhiteboardUserAuthenticationFactory factory = createFactory(new TestUserAuthenticationFactory("abc"), "test", "test2"); assertNull(factory.getAuthentication(getUserConfiguration(), root, "abc"));
