diff --git a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/config/Profiles.java b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/config/Profiles.java index 61dfe237f2..442d7b2474 100644 --- a/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/config/Profiles.java +++ b/components/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher/src/main/java/org/wso2/carbon/apimgt/webapp/publisher/config/Profiles.java @@ -41,16 +41,13 @@ import java.util.List; public class Profiles { @XmlElement(name = "Profile") - protected List profile; + protected List profile = new ArrayList();; /** * Gets the value of the profile property. * */ public List getProfile() { - if (profile == null) { - profile = new ArrayList(); - } return this.profile; } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/FilteringUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/FilteringUtil.java index 3cc650029c..c0f578be39 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/FilteringUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/FilteringUtil.java @@ -32,7 +32,7 @@ public class FilteringUtil { * This is used to filter from the cached policies. */ public static List getFilteredList(List sourceList, int offset, int limit) { - if(sourceList == null || sourceList.size() < offset){ + if (sourceList == null || sourceList.size() < offset) { return Collections.emptyList(); } return sourceList.subList(offset, Math.min(offset + limit, sourceList.size())); diff --git a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java index f12d295b7a..51c19212a3 100644 --- a/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java +++ b/components/identity-extensions/org.wso2.carbon.identity.jwt.client.extension/src/main/java/org/wso2/carbon/identity/jwt/client/extension/service/JWTClientManagerServiceImpl.java @@ -81,7 +81,7 @@ public class JWTClientManagerServiceImpl implements JWTClientManagerService { addJWTClient(tenantDomain, jwtClient); } catch (JWTClientAlreadyExistsException e) { log.warn("Attempting to register a jwt client for the tenant " + tenantDomain + - " when one already exists. Returning existing jwt client"); + " when one already exists. Returning existing jwt client", e); return getJWTClient(tenantDomain); } catch (JWTClientConfigurationException e) { throw new JWTClientException("Failed to parse jwt configuration for tenant " + tenantDomain, e); @@ -110,7 +110,7 @@ public class JWTClientManagerServiceImpl implements JWTClientManagerService { addJWTClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, defaultJWTClient); } catch (JWTClientAlreadyExistsException e) { log.warn("Attempting to register a jwt client for the super tenant" + - " when one already exists. Returning existing jwt client"); + " when one already exists. Returning existing jwt client", e); } } }