summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-core/src/main/java
diff options
context:
space:
mode:
authorIndrijeet kumar <indriku1@in.ibm.com>2020-05-07 09:57:19 +0530
committerIndrijeet Kumar <indriku1@in.ibm.com>2020-05-07 13:32:45 +0000
commit1319b1cc134630c386c088f3300b3c72d67c616c (patch)
treeb8b6cf027d61c28bb2ab9002c953aec37f361fe3 /ecomp-sdk/epsdk-core/src/main/java
parent8c18951c83e82faff1ce0051a5af320a91402c8e (diff)
reduced some code smells
reduced some code smells Issue-ID: PORTAL-813 Change-Id: I5de9eef7f9b4e7983a2893fe91c83226fe1903cd Signed-off-by: Indrijeet Kumar <indriku1@in.ibm.com>
Diffstat (limited to 'ecomp-sdk/epsdk-core/src/main/java')
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java4
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java2
-rw-r--r--ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java2
3 files changed, 4 insertions, 4 deletions
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java
index 17ac9e16..6c06cc01 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/restful/client/SharedContextRestClient.java
@@ -89,8 +89,8 @@ public class SharedContextRestClient extends PortalRestClientBase {
String restUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL);
if (restUrl == null || restUrl.length() == 0)
throw new IllegalArgumentException("getSharedContextUrl: no property " + PortalApiConstants.ECOMP_REST_URL);
- String contextUrl = restUrl + (restUrl.endsWith("/") ? "" : "/") + "context/";
- return contextUrl;
+
+ return restUrl + (restUrl.endsWith("/") ? "" : "/") + "context/";
}
/**
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java
index 6965165a..ab4c36cf 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UrlAccessImpl.java
@@ -98,7 +98,7 @@ public class UrlAccessImpl implements UrlAccessService {
if (currentFirstUrl != null) {
- List<Criterion> restrictionsList = new ArrayList<Criterion>();
+ List<Criterion> restrictionsList = new ArrayList<>();
Criterion criterion1 = Restrictions.like("urlsAccessibleKey.url", currentFirstUrl + "%");
restrictionsList.add(criterion1);
list = dataAccessService.getList(UrlsAccessible.class, null, restrictionsList, null);
diff --git a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
index caa8d2ae..879a11de 100644
--- a/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
+++ b/ecomp-sdk/epsdk-core/src/main/java/org/onap/portalsdk/core/service/UserProfileServiceImpl.java
@@ -69,7 +69,7 @@ public class UserProfileServiceImpl implements UserProfileService {
@SuppressWarnings("unchecked")
public User getUserByLoginId(String loginId) {
User user = null;
- List<Criterion> restrictionsList = new ArrayList<Criterion>();
+ List<Criterion> restrictionsList = new ArrayList<>();
Criterion criterion1 = Restrictions.eq("loginId", loginId);
restrictionsList.add(criterion1);
List<User> users = (List<User>) getDataAccessService().getList(User.class, null, restrictionsList, null);