test_class.declarator: securityProvider = mock(SecurityProvider.class)
test_class.modifier: private final
test_class.original_string: private final SecurityProvider securityProvider = mock(SecurityProvider.class);
test_class.type: SecurityProvider
test_class.var_name: securityProvider
test_class.declarator: root = mock(Root.class)
test_class.modifier: private final
test_class.original_string: private final Root root = mock(Root.class);
test_class.type: Root
test_class.var_name: root
test_class.declarator: namePathMapper = mock(NamePathMapper.class)
test_class.modifier: private final
test_class.original_string: private final NamePathMapper namePathMapper = mock(NamePathMapper.class);
test_class.type: NamePathMapper
test_class.var_name: namePathMapper
test_class.declarator: pwAction = new PasswordValidationAction()
test_class.modifier: private final
test_class.original_string: private final PasswordValidationAction pwAction = new PasswordValidationAction();
test_class.type: PasswordValidationAction
test_class.var_name: pwAction
test_class.declarator: user
test_class.modifier: private
test_class.original_string: private User user;
test_class.type: User
test_class.var_name: user
test_class.file: oak-security-spi/src/test/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationActionTest.java
test_class.identifier: PasswordValidationActionTest
test_case.body: @Test
      public void testOnPasswordChangeInvalid() throws Exception {
          List<String> invalid = new ArrayList<>();
          invalid.add("pw1");
          invalid.add("only6C");
          invalid.add("12345678");
          invalid.add("WITHOUTLOWERCASE");
          invalid.add("withoutuppercase");
  
          for (String pw : invalid) {
              try {
                  pwAction.onPasswordChange(user, pw, root, namePathMapper);
                  fail("should throw constraint violation");
              } catch (ConstraintViolationException e) {
                  // success
              }
          }
      }
test_case.class_method_signature: PasswordValidationActionTest.testOnPasswordChangeInvalid()
test_case.full_signature: @Test public void testOnPasswordChangeInvalid()
test_case.identifier: testOnPasswordChangeInvalid
test_case.invocations: add add add add add onPasswordChange fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testOnPasswordChangeInvalid()
focal_class.declarator: log = LoggerFactory.getLogger(PasswordValidationAction.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(PasswordValidationAction.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: CONSTRAINT = "constraint"
focal_class.modifier: public static final
focal_class.original_string: public static final String CONSTRAINT = "constraint";
focal_class.type: String
focal_class.var_name: CONSTRAINT
focal_class.declarator: pattern
focal_class.modifier: private
focal_class.original_string: private Pattern pattern;
focal_class.type: Pattern
focal_class.var_name: pattern
focal_class.file: oak-security-spi/src/main/java/org/apache/jackrabbit/oak/spi/security/user/action/PasswordValidationAction.java
focal_class.identifier: PasswordValidationAction
focal_class.class_method_signature: PasswordValidationAction.init(SecurityProvider securityProvider, ConfigurationParameters config)
focal_class.full_signature: @Override public void init(SecurityProvider securityProvider, ConfigurationParameters config)
focal_class.identifier: init
focal_class.modifiers: @Override public
focal_class.parameters: (SecurityProvider securityProvider, ConfigurationParameters config)
focal_class.return: void
focal_class.signature: void init(SecurityProvider securityProvider, ConfigurationParameters config)
focal_class.class_method_signature: PasswordValidationAction.onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.full_signature: @Override public void onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.identifier: onCreate
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.return: void
focal_class.signature: void onCreate(@NotNull User user, @Nullable String password, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.class_method_signature: PasswordValidationAction.onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.full_signature: @Override public void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.identifier: onPasswordChange
focal_class.modifiers: @Override public
focal_class.parameters: (@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.return: void
focal_class.signature: void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_class.class_method_signature: PasswordValidationAction.setConstraint(@NotNull String constraint)
focal_class.full_signature: private void setConstraint(@NotNull String constraint)
focal_class.identifier: setConstraint
focal_class.modifiers: private
focal_class.parameters: (@NotNull String constraint)
focal_class.return: void
focal_class.signature: void setConstraint(@NotNull String constraint)
focal_class.class_method_signature: PasswordValidationAction.validatePassword(@Nullable String password, boolean forceMatch)
focal_class.full_signature: private void validatePassword(@Nullable String password, boolean forceMatch)
focal_class.identifier: validatePassword
focal_class.modifiers: private
focal_class.parameters: (@Nullable String password, boolean forceMatch)
focal_class.return: void
focal_class.signature: void validatePassword(@Nullable String password, boolean forceMatch)
focal_class.superclass: extends AbstractAuthorizableAction
focal_method.body: @Override
      public void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper) throws RepositoryException {
          validatePassword(newPassword, true);
      }
focal_method.class_method_signature: PasswordValidationAction.onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_method.full_signature: @Override public void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_method.identifier: onPasswordChange
focal_method.invocations: validatePassword
focal_method.modifiers: @Override public
focal_method.parameters: (@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)
focal_method.return: void
focal_method.signature: void onPasswordChange(@NotNull User user, @Nullable String newPassword, @NotNull Root root, @NotNull NamePathMapper namePathMapper)