diff options
author | Guangrong Fu <fu.guangrong@zte.com.cn> | 2017-03-09 03:10:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@open-o.org> | 2017-03-09 03:10:16 +0000 |
commit | 71485b24175f99787fc729d70bf826325d84698f (patch) | |
tree | e498e3fd8f7eb9617d9176a61858e0bd0cf4b4bf /holmes-actions/src/main | |
parent | 82b2bd08a159aed50c6711cf41cb36b36112cb9d (diff) | |
parent | 9fcfaa6fcd8854afeab4b71962f773693ff7c3b7 (diff) |
Merge "Modify restructure"
Diffstat (limited to 'holmes-actions/src/main')
-rw-r--r-- | holmes-actions/src/main/java/org/openo/holmes/common/api/stat/Alarm.java | 2 | ||||
-rw-r--r-- | holmes-actions/src/main/java/org/openo/holmes/common/producer/MQProducer.java | 6 |
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 =
|