@Test public void nullKeyPairIsValid() { assertThat(validator.isValid(null, cvc)).isTrue(); }
@Override public boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc) { if (keypair == null) { return true; } return Objects.isNull(keypair.getPublicKeyVersion()) == Objects.isNull(keypair.getPrivateKeyVersion()); }
AzureVaultKeyPairValidator implements ConstraintValidator<ValidAzureVaultKeyPair, AzureVaultKeyPair> { @Override public boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc) { if (keypair == null) { return true; } return Objects.isNull(keypair.getPublicKeyVersion()) == Objects.isNull(keypair.getPrivateKeyVersion()); } }
AzureVaultKeyPairValidator implements ConstraintValidator<ValidAzureVaultKeyPair, AzureVaultKeyPair> { @Override public boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc) { if (keypair == null) { return true; } return Objects.isNull(keypair.getPublicKeyVersion()) == Objects.isNull(keypair.getPrivateKeyVersion()); }  }
AzureVaultKeyPairValidator implements ConstraintValidator<ValidAzureVaultKeyPair, AzureVaultKeyPair> { @Override public boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc) { if (keypair == null) { return true; } return Objects.isNull(keypair.getPublicKeyVersion()) == Objects.isNull(keypair.getPrivateKeyVersion()); }  @Override boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc); }
AzureVaultKeyPairValidator implements ConstraintValidator<ValidAzureVaultKeyPair, AzureVaultKeyPair> { @Override public boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc) { if (keypair == null) { return true; } return Objects.isNull(keypair.getPublicKeyVersion()) == Objects.isNull(keypair.getPrivateKeyVersion()); }  @Override boolean isValid(final AzureVaultKeyPair keypair, final ConstraintValidatorContext cvc);  }