Alissa Bonas has posted comments on this change.
Change subject: core: AuditLogDirector tests and some cleanups
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
Line 27: private static final Map<AuditLogType, String> mMessages = new
EnumMap<AuditLogType, String>(AuditLogType.class);
Line 28: private static final Map<AuditLogType, AuditLogSeverity>
mSeverities =
Line 29: new EnumMap<AuditLogType,
AuditLogSeverity>(AuditLogType.class);
Line 30: private static final Pattern pattern =
Pattern.compile("\\$\\{\\w*\\}"); // match ${<alphanumeric>...}
Line 31: protected static final String UNKNOWN_VARIABLE_VALUE = "<UNKNOWN>";
The class itself is final, so what is the purpose to make this variable
protected if the class itself can't be extended?
Line 32:
Line 33: static {
Line 34: initMessages();
Line 35: initSeverities();
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
Line 101: public void testResolveCombinedMessage() {
Line 102: final String message =
Line 103: "${first} equals one, ${second} equals two,
'${blank}' eqauls blank and ${nonExist} is unknown";
Line 104: final String expectedResolved =
Line 105: String.format("one equals one, two equals two, ' '
eqauls blank and %1s is unknown",
eqauls = equals
Line 106: AuditLogDirector.UNKNOWN_VARIABLE_VALUE);
Line 107: Map<String, String> values = new HashMap<String, String>();
Line 108: values.put("first", "one");
Line 109: values.put("second", "two");
--
To view, visit http://gerrit.ovirt.org/10497
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6cb777a39dbe19510d8a0466e6dff80da1b234ba
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tal Nisan <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches