Martin Peřina has uploaded a new change for review.

Change subject: tools: Removes unused variables in notifier
......................................................................

tools: Removes unused variables in notifier

Removes unused variables from notifier's sources.

Change-Id: I14279cce15370dbe60dd6f7961b17184dc7d8d00
Signed-off-by: Martin Perina <mper...@redhat.com>
---
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
M 
backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
3 files changed, 1 insertion(+), 8 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/09/24609/1

diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
index 7249d82..ff1ea39 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/smtp/Smtp.java
@@ -54,7 +54,6 @@
     private static final String MAIL_SMTP_ENCRYPTION_TLS = "tls";
     private static final String MAIL_SEND_INTERVAL = "MAIL_SEND_INTERVAL";
     private static final String MAIL_RETRIES = "MAIL_RETRIES";
-    private static final String GENERIC_VALIDATION_MESSAGE = "Check 
configuration file, ";
 
     private static final Logger log = Logger.getLogger(Smtp.class);
     private int retries;
@@ -163,7 +162,7 @@
                 DispatchAttempt attempt = iterator.next();
                 try {
                     EventMessageContent message = new EventMessageContent();
-                    message.prepareMessage(hostName, (AuditLogEvent) 
attempt.event, isBodyHtml);
+                    message.prepareMessage(hostName, attempt.event, 
isBodyHtml);
 
                     log.info(String.format("Send email to [%s]%n subject:%n 
[%s]",
                             attempt.address,
diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
index 8e85d6e..990cb75 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/transport/snmp/Snmp.java
@@ -11,7 +11,6 @@
 
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
-
 import org.ovirt.engine.core.common.AuditLogType;
 import org.ovirt.engine.core.common.EventNotificationMethod;
 import org.ovirt.engine.core.notifier.NotificationServiceException;
@@ -19,7 +18,6 @@
 import org.ovirt.engine.core.notifier.filter.AuditLogEvent;
 import org.ovirt.engine.core.notifier.transport.Transport;
 import org.ovirt.engine.core.notifier.utils.NotificationProperties;
-
 import org.snmp4j.CommunityTarget;
 import org.snmp4j.PDU;
 import org.snmp4j.mp.SnmpConstants;
@@ -39,14 +37,11 @@
     private static final int ENTERPRISE_SPECIFIC = 6;
     private static final Pattern PROFILE_PATTERN = 
Pattern.compile(SNMP_MANAGERS + "(|_(?<profile>.*))");
 
-    private final NotificationProperties props;
     private final Map<String, Profile> profiles = new HashMap<>();
     private org.snmp4j.Snmp snmp = null;
     private boolean active = false;
 
     public Snmp(NotificationProperties props) {
-        this.props = props;
-
         for (Map.Entry<String, String> entry : 
props.getProperties().entrySet()) {
             Matcher m = PROFILE_PATTERN.matcher(entry.getKey());
             if (m.matches()) {
diff --git 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
index 4a2663d..7c9d471 100644
--- 
a/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
+++ 
b/backend/manager/tools/src/main/java/org/ovirt/engine/core/notifier/utils/NotificationProperties.java
@@ -158,7 +158,6 @@
     }
 
     public int validateInteger(String property) {
-        final String stringVal = getProperty(property);
         try {
             return Integer.parseInt(getProperty(property));
         } catch (NumberFormatException exception) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14279cce15370dbe60dd6f7961b17184dc7d8d00
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mper...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to