Maor Lipchuk has posted comments on this change.
Change subject: core: Exaple: Use UUID for handling database Guids
......................................................................
Patch Set 1: No score
(1 inline comment)
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/BaseDAODbFacade.java
Line 122: * @throws SQLException If resultSet does not contain columnName
or its value cannot be cast to {@link UUID}.
Line 123: */
Line 124: private static Guid getGuid(ResultSet resultSet, String
columnName, Guid defaultValue) throws SQLException {
Line 125: UUID uuid = (UUID) resultSet.getObject(columnName);
Line 126: if (uuid == null || resultSet.wasNull()) {
I don't understand, if you don't trust the wasNull in the resultSet why not
only check if it's null and that's it.
it doesn't looks logic, and probably will raise questions in the future.
Line 127: return defaultValue;
Line 128: }
Line 129: return new Guid(uuid);
Line 130: }
--
To view, visit http://gerrit.ovirt.org/16281
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4d30e1ab7303ecad68dbc9005ac5c6ef733f1707
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches