summaryrefslogtreecommitdiffstats
path: root/ONAP-SDK-APP/src/main/java/org/onap
diff options
context:
space:
mode:
authorrb7147 <rb7147@att.com>2018-01-19 10:10:18 -0500
committerrb7147 <rb7147@att.com>2018-01-19 10:10:29 -0500
commit7a2924a2209bce7b0c578b67fd2310d12ccdb1f7 (patch)
tree9f2931ea6c8dcd64fc6e4ac09d0f2952d2791bd0 /ONAP-SDK-APP/src/main/java/org/onap
parent74552f84f136c01a99488aeff6d0f7b9a55d5fb3 (diff)
Resolved the Critical issue reported by Sonar
Issue-ID: POLICY-521 Change-Id: I2a7072076a1ed0924bfeacd6f3d2b6a910f30338 Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'ONAP-SDK-APP/src/main/java/org/onap')
-rw-r--r--ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
index 7db760a93..ccc469166 100644
--- a/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
+++ b/ONAP-SDK-APP/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
@@ -27,7 +27,9 @@ import org.onap.portalapp.scheduler.RegistryAdapter;
import org.onap.portalsdk.core.auth.LoginStrategy;
import org.onap.portalsdk.core.conf.AppConfig;
import org.onap.portalsdk.core.conf.Configurable;
+import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
import org.onap.portalsdk.core.objectcache.AbstractCacheManager;
+import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.service.DataAccessService;
import org.onap.portalsdk.core.util.CacheManager;
import org.onap.portalsdk.core.util.SystemProperties;
@@ -59,6 +61,8 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
@EnableScheduling
public class ExternalAppConfig extends AppConfig implements Configurable {
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ExternalAppConfig.class);
+
private RegistryAdapter schedulerRegistryAdapter;
@Configuration
@@ -139,11 +143,16 @@ public class ExternalAppConfig extends AppConfig implements Configurable {
*/
// @Bean // ANNOTATION COMMENTED OUT
// APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION
- public SchedulerFactoryBean schedulerFactoryBean() throws Exception {
+ public SchedulerFactoryBean schedulerFactoryBean(){
SchedulerFactoryBean scheduler = new SchedulerFactoryBean();
scheduler.setTriggers(schedulerRegistryAdapter.getTriggers());
scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties"));
- scheduler.setDataSource(dataSource());
+ try {
+ scheduler.setDataSource(dataSource());
+ } catch (Exception e) {
+ logger.error("Exception occured While Setting DataSource for schedulerfactorybean"+e);
+ return null;
+ }
return scheduler;
}