Moti Asayag has posted comments on this change. Change subject: common: adding maskValidator util ......................................................................
Patch Set 13: (6 comments) https://gerrit.ovirt.org/#/c/35144/13/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/IpAddressConverter.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/IpAddressConverter.java: Line 1: package org.ovirt.engine.core.common.utils; Line 2: Line 3: public class IpAddressConverter { Line 4: Line 5: private static IpAddressConverter ipAddConverter = new IpAddressConverter(); s/ipAddConverter/INSTANCE Line 6: Line 7: private IpAddressConverter() { Line 8: } Line 9: https://gerrit.ovirt.org/#/c/35144/13/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/MaskValidator.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/MaskValidator.java: Line 8: validator s/validator/INSTANCE Line 7: Line 8: private static MaskValidator validator = new MaskValidator(); Line 9: Line 10: private MaskValidator() { Line 11: please remove this line Line 12: } Line 13: Line 14: public static MaskValidator getInstance() { Line 15: return validator; Line 30: "^" + ValidationUtils.IP_PATTERN_NON_EMPTY + "$") why not having ""^" + ValidationUtils.IP_PATTERN_NON_EMPTY + "$")" as an entry in ValidationUtils ? Line 35: * Line 36: * @return true if a string [0-32] (possible with /) which represent a valid prefix, false otherwise. Line 37: */ Line 38: public boolean isPrefixValid(String mask) { Line 39: return mask != null && mask.matches("^/?" + ValidationUtils.SUBNET_PREFIX_PATTERN + "$"); same here Line 40: } Line 41: Line 42: /*** Line 43: * check if mask is valid and netmasked formated and return true if does https://gerrit.ovirt.org/#/c/35144/13/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/IpAddressConverterTest.java File backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/IpAddressConverterTest.java: Line 15: ipAdd s/ipAdd/ipAddress -- To view, visit https://gerrit.ovirt.org/35144 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I04fb0aa2193801688f1bfc5dc7684cabdfa2827d Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eliraz Levi <el...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Eliraz Levi <el...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches