diff --git a/implementation/src/main/java/io/smallrye/config/SecretKeysConfigSourceInterceptor.java b/implementation/src/main/java/io/smallrye/config/SecretKeysConfigSourceInterceptor.java index b2e2e69db..0c6c29120 100644 --- a/implementation/src/main/java/io/smallrye/config/SecretKeysConfigSourceInterceptor.java +++ b/implementation/src/main/java/io/smallrye/config/SecretKeysConfigSourceInterceptor.java @@ -28,7 +28,7 @@ public ConfigValue getValue(final ConfigSourceInterceptorContext context, final @Override public Iterator iterateNames(final ConfigSourceInterceptorContext context) { - if (SecretKeys.isLocked()) { + if (!secrets.isEmpty() && SecretKeys.isLocked()) { Set names = new HashSet<>(); Iterator namesIterator = context.iterateNames(); while (namesIterator.hasNext()) {