Eli Mesika has posted comments on this change.

Change subject: tools: Adds more validations to MAIL_PORT in notifier
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.ovirt.org/#/c/23129/1/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
File 
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java:

Line 152:             int port = new Integer(getProperty(MAIL_PORT));
Line 153:             if (port > 0 && port < 65536) {
Line 154:                 mailPortValid = true;
Line 155:             }
Line 156:         } catch (NumberFormatException ex) {
Why not using org.apache.commons.lang.math.NumberUtils.isNumber instead of 
relying on the thrown exception
Line 157:         }
Line 158:         if (!mailPortValid) {
Line 159:             throw new IllegalArgumentException(
Line 160:                     String.format("Check configuration file, 
MAIL_PORT value has to be in range from 1 to 65535,"


-- 
To view, visit http://gerrit.ovirt.org/23129
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I770d1636dc25c0c9b0076a92dcac20ddec551acf
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to