summaryrefslogtreecommitdiffstats
path: root/holmes-actions/src/main/java
diff options
context:
space:
mode:
authorFengLiang <feng.liang1@zte.com.cn>2017-03-09 09:45:09 +0800
committerFengLiang <feng.liang1@zte.com.cn>2017-03-09 09:45:09 +0800
commit9fcfaa6fcd8854afeab4b71962f773693ff7c3b7 (patch)
tree7fe9c2fdb99484e6d9037551f598136b4e0ec3fe /holmes-actions/src/main/java
parentc27132bad535b5a487eeff97fce94acef5a0747b (diff)
Modify restructure
Change-Id: Ia5ffd78bf9a0b2dc0339d198362fc1e1bde7c93c Issue-ID:HOLMES-51 Signed-off-by: FengLiang <feng.liang1@zte.com.cn>
Diffstat (limited to 'holmes-actions/src/main/java')
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java2
-rw-r--r--holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java6
2 files changed, 3 insertions, 5 deletions
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java b/holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java
index 3ea3715..c12b549 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java
@@ -201,7 +201,7 @@ public class Alarm implements AplusData, Cloneable, Serializable {
@Override
public boolean equals(Object arg0) {
- if (arg0 == null) {
+ if (arg0 == null || !(arg0 instanceof Alarm)) {
return false;
}
return this.alarmKey.equals(((Alarm) arg0).getAlarmKey());
diff --git a/holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java b/holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java
index 0de1289..d258695 100644
--- a/holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java
+++ b/holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java
@@ -24,6 +24,7 @@ import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Session;
+import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.glassfish.hk2.api.IterableProvider;
import org.jvnet.hk2.annotations.Service;
@@ -36,16 +37,13 @@ import org.apache.activemq.ActiveMQConnectionFactory;
@Service
@Slf4j
+@NoArgsConstructor
public class MQProducer {
@Inject
private IterableProvider<MQConfig> mqConfigProvider;
private ConnectionFactory connectionFactory;
- public MQProducer() {
-
- }
-
public void init() {
String brokerURL =