algairim commented on a change in pull request #1164:
URL: https://github.com/apache/brooklyn-server/pull/1164#discussion_r614884704
##########
File path:
core/src/main/java/org/apache/brooklyn/core/mgmt/BrooklynTaskTags.java
##########
@@ -359,11 +359,13 @@ public static WrappedStream tagForStream(String
streamType, Supplier<String> con
public static WrappedStream tagForEnvStream(String streamEnv, Map<?, ?>
env) {
StringBuilder sb = new StringBuilder();
for (Map.Entry<?,?> kv: env.entrySet()) {
- String stringValue = kv.getValue() != null ?
BashStringEscapes.wrapBash(kv.getValue().toString()) : "";
- Sanitizer.IS_SECRET_PREDICATE.apply(stringValue);
- if (!stringValue.isEmpty() &&
Sanitizer.IS_SECRET_PREDICATE.apply(kv.getKey())) {
- String md5Checksum = Streams.getMd5Checksum(new
ByteArrayInputStream(stringValue.getBytes()));
- stringValue = "<suppressed> (MD5 hash: " + md5Checksum + ")" ;
+ String stringValue = kv.getValue() != null ?
kv.getValue().toString() : "";
+ if (!stringValue.isEmpty()) {
+ if (Sanitizer.IS_SECRET_PREDICATE.apply(kv.getKey())) {
+ String md5Checksum = Streams.getMd5Checksum(new
ByteArrayInputStream(stringValue.getBytes()));
Review comment:
Re-used existing util method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]