Allon Mureinik has posted comments on this change. Change subject: core: config: support sensitive keys ......................................................................
Patch Set 3: Looks good to me, but someone else must approve (1 inline comment) Like the basic idea, see comment about the implementation inline .................................................... File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/LocalConfig.java Line 97: // problem to use INFO): Line 98: if (log.isInfoEnabled()) { Line 99: Set<String> keys = values.keySet(); Line 100: List<String> list = new ArrayList<String>(keys.size()); Line 101: List<String> sensitiveKeys = Arrays.asList(getSensitiveKeys()); The only advantage of having a List here is the contains() syntax. However, note that you're doing an O(1) creation operation (Arrays.asList does not copy the data), but O(n^2) searches (n searches on O(n)), for a total of ~O(n^2). Consider creating a HashSet from the array (O(n) operation), and then the contains will be an O(1) operation. Line 102: list.addAll(keys); Line 103: Collections.sort(list); Line 104: for (String key : list) { Line 105: String value = "***"; -- To view, visit http://gerrit.ovirt.org/14353 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8dc10fb3eeb1cc97a03cc160133a84d6b2a23d87 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches