aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorm.kowalski3 <m.kowalski3@partner.samsung.com>2019-04-23 09:23:41 +0200
committerm.kowalski3 <m.kowalski3@partner.samsung.com>2019-04-23 10:57:21 +0200
commit4952c0440dc6dfc19a98e6b35e8f1bf08fafa2f0 (patch)
tree6509ff747c86186d86df985e817bc2d33c16b8a9 /src/main/java/org
parent786862b40f2baebe5031d4f198bbbce8a9c8add8 (diff)
Fixed generic Sonar issue in the clamp project
Remove duplicated literal in DefaultUserConfiguration Change-Id: I8318b568d4dd093e9a57a30341ce607c6668c5d1 Issue-ID: CLAMP-346 Signed-off-by: Marcin Kowalski <m.kowalski3@partner.samsung.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
index 6ec2221d..a8ff1206 100644
--- a/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/DefaultUserConfiguration.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -54,6 +56,7 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter {
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(DefaultUserConfiguration.class);
protected static final EELFLogger metricsLogger = EELFManager.getInstance().getMetricsLogger();
+ private static final String SETUP_WEB_USERS_EXCEPTION_MSG = "Exception occurred during the setup of the Web users in memory";
@Autowired
private ClampProperties refProp;
@Value("${clamp.config.security.permission.type.cl:permission-type-cl}")
@@ -76,8 +79,8 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter {
.and().invalidSessionUrl("/designer/timeout.html");
} catch (Exception e) {
- logger.error("Exception occurred during the setup of the Web users in memory", e);
- throw new CldsUsersException("Exception occurred during the setup of the Web users in memory", e);
+ logger.error(SETUP_WEB_USERS_EXCEPTION_MSG, e);
+ throw new CldsUsersException(SETUP_WEB_USERS_EXCEPTION_MSG, e);
}
}
@@ -105,8 +108,8 @@ public class DefaultUserConfiguration extends WebSecurityConfigurerAdapter {
.authorities(user.getPermissionsString()).and().passwordEncoder(passwordEncoder);
}
} catch (Exception e) {
- logger.error("Exception occurred during the setup of the Web users in memory", e);
- throw new CldsUsersException("Exception occurred during the setup of the Web users in memory", e);
+ logger.error(SETUP_WEB_USERS_EXCEPTION_MSG, e);
+ throw new CldsUsersException(SETUP_WEB_USERS_EXCEPTION_MSG, e);
}
}