summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsu622b <su622b@att.com>2019-08-08 13:20:12 -0400
committersu622b <su622b@att.com>2019-08-08 13:20:44 -0400
commitc85ed69c96f2aa17d77248547dee8d64bb4c3c11 (patch)
treea51b9315e7324fdd69d26fc59ddee3c6bc5065fc
parent05d0d9e7760ad8b79fcf1194cc359b94309a70b5 (diff)
fix the issues due to refactoring
Issue-ID: DMAAP-1247 Change-Id: I0a00e1f7e8d13598078c8b2cd267d157b3727544 Signed-off-by: su622b <su622b@att.com>
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java16
-rw-r--r--version.properties2
3 files changed, 9 insertions, 11 deletions
diff --git a/pom.xml b/pom.xml
index 2428f29..9b22aff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.dmaap.messagerouter.msgrtr</groupId>
<artifactId>msgrtr</artifactId>
- <version>1.1.19-SNAPSHOT</version>
+ <version>1.1.20-SNAPSHOT</version>
<packaging>jar</packaging>
<name>dmaap-messagerouter-msgrtr</name>
<description>Message Router - Restful interface built for kafka</description>
diff --git a/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java b/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java
index f67a507..f25867d 100644
--- a/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java
+++ b/src/main/java/org/onap/dmaap/dmf/mr/service/impl/EventsServiceImpl.java
@@ -41,7 +41,6 @@ import java.util.Date;
import java.util.LinkedList;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.MediaType;
-import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.http.HttpStatus;
import org.apache.kafka.clients.producer.ProducerRecord;
@@ -238,7 +237,7 @@ public class EventsServiceImpl implements EventsService {
throw new DMaaPAccessDeniedException(errRes);
}
- } else if( null != metaTopic.getOwner() && !metaTopic.getOwner().isEmpty()) {
+ } else if( null!=metaTopic&& null != metaTopic.getOwner() && !metaTopic.getOwner().isEmpty()) {
final NsaApiKey user = DMaaPAuthenticatorImpl.getAuthenticatedUser(ctx);
if(SUBSCRIBE_ACTION.equals(action)) {
metaTopic.checkUserRead(user);
@@ -265,7 +264,7 @@ public class EventsServiceImpl implements EventsService {
private int getMessageTimeout(HttpServletRequest request) {
String timeoutMsAsString = getPropertyFromAJSCmap(TIMEOUT_PROPERTY);
- int defaultTimeoutMs = StringUtils.isNotEmpty(timeoutMsAsString) ? NumberUtils.toInt(timeoutMsAsString, CambriaConstants.kNoTimeout) :
+ int defaultTimeoutMs = timeoutMsAsString!=null ? NumberUtils.toInt(timeoutMsAsString, CambriaConstants.kNoTimeout) :
CambriaConstants.kNoTimeout;
String timeoutProperty = request.getParameter(TIMEOUT_PROPERTY);
@@ -282,17 +281,17 @@ public class EventsServiceImpl implements EventsService {
private boolean isTopicNameEnforcedAaf(String topicName) {
String topicNameStd = getPropertyFromAJSCmap("enforced.topic.name.AAF");
- return StringUtils.isNotEmpty(topicNameStd) && topicName.startsWith(topicNameStd);
+ return !topicNameStd.isEmpty() && topicName.startsWith(topicNameStd);
}
private boolean isCacheEnabled() {
String cachePropsSetting = getPropertyFromAJSCmap(ConsumerFactory.kSetting_EnableCache);
- return StringUtils.isNotEmpty(cachePropsSetting) ? Boolean.parseBoolean(cachePropsSetting) : ConsumerFactory.kDefault_IsCacheEnabled;
+ return !cachePropsSetting.isEmpty() ? Boolean.parseBoolean(cachePropsSetting) : ConsumerFactory.kDefault_IsCacheEnabled;
}
private void verifyHostId() {
String lhostId = getPropertyFromAJSCmap("clusterhostid");
- if (StringUtils.isEmpty(lhostId)) {
+ if (lhostId.isEmpty()) {
try {
InetAddress.getLocalHost().getCanonicalHostName();
} catch (UnknownHostException e) {
@@ -304,7 +303,7 @@ public class EventsServiceImpl implements EventsService {
private String getMetricTopicName() {
String metricTopicFromProps = getPropertyFromAJSCmap("metrics.send.cambria.topic");
- return StringUtils.isNotEmpty(metricTopicFromProps) ? metricTopicFromProps : "msgrtr.apinode.metrics.dmaap";
+ return !metricTopicFromProps.isEmpty() ? metricTopicFromProps : "msgrtr.apinode.metrics.dmaap";
}
/**
@@ -359,8 +358,7 @@ public class EventsServiceImpl implements EventsService {
}
private boolean isTransactionIdRequired() {
- String transIdReqProperty = getPropertyFromAJSCmap("transidUEBtopicreqd");
- return StringUtils.isNotEmpty(transIdReqProperty) && transIdReqProperty.equalsIgnoreCase("true");
+ return getPropertyFromAJSCmap("transidUEBtopicreqd").equalsIgnoreCase("true");
}
/**
diff --git a/version.properties b/version.properties
index 9ac4233..bba0fce 100644
--- a/version.properties
+++ b/version.properties
@@ -27,7 +27,7 @@
major=1
minor=1
-patch=19
+patch=20
base_version=${major}.${minor}.${patch}