aboutsummaryrefslogtreecommitdiffstats
path: root/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
diff options
context:
space:
mode:
Diffstat (limited to 'it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java')
-rw-r--r--it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java b/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
index c3ea7361c64..a4bafa7b6ae 100644
--- a/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
+++ b/it/it-plugins/settings-encryption-plugin/src/main/java/EncryptionVerifier.java
@@ -11,11 +11,13 @@ public class EncryptionVerifier implements BatchExtension {
}
public void start() {
- System.out.println("Start EncryptionVerifier");
-
- String decryptedValue = settings.getString("encryptedProperty");
- if (!"this is a secret".equals(decryptedValue)) {
- throw new IllegalStateException("The property 'encryptedProperty' can not be decrypted");
+ if (settings.hasKey("encryptedProperty")) {
+ System.out.println("Start EncryptionVerifier");
+
+ String decryptedValue = settings.getString("encryptedProperty");
+ if (!"this is a secret".equals(decryptedValue)) {
+ throw new IllegalStateException("The property 'encryptedProperty' can not be decrypted");
+ }
}
}
}