zemin-piao commented on code in PR #12950:
URL: https://github.com/apache/druid/pull/12950#discussion_r956239823
##########
server/src/main/java/org/apache/druid/server/StatusResource.java:
##########
@@ -75,7 +78,29 @@ public Map<String, String> getProperties()
{
Map<String, String> allProperties = Maps.fromProperties(properties);
Set<String> hidderProperties = druidServerConfig.getHiddenProperties();
- return Maps.filterEntries(allProperties, (entry) ->
!hidderProperties.contains(entry.getKey()));
+ return filterHiddenProperties(hidderProperties, allProperties);
+ }
+
+ /**
+ * filter out entries from allProperties with key containing elements in
hidderProperties (case insensitive)
+ *
+ * @return map of properties that are not filtered out.
+ */
+ @Nonnull
+ private Map<String, String> filterHiddenProperties(
+ Set<String> hidderProperties,
Review Comment:
Sharp! Will refactor it
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]