fixed sonar issue in WebSecurityConfigImpl.java 43/65043/3
authorSandeep J <sandeejh@in.ibm.com>
Thu, 6 Sep 2018 18:20:52 +0000 (23:50 +0530)
committerByung-Woo Jun <byung-woo.jun@ericsson.com>
Mon, 10 Sep 2018 00:37:31 +0000 (00:37 +0000)
fixed sonar issue as detailed in SO-986

Issue-ID: SO-986
Change-Id: Ia110b07c336c9bcf002f9dbf930042387ebc7abf
Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/openstack/WebSecurityConfigImpl.java

index 6bbdebe..aca16d9 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  * 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
@@ -17,7 +19,7 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.onap.so.adapters.openstack;
 
 import org.onap.so.security.MSOSpringFirewall;
@@ -36,7 +38,7 @@ public class WebSecurityConfigImpl extends WebSecurityConfig {
                http.csrf().disable()
                .authorizeRequests()
                .antMatchers("/manage/health","/manage/info").permitAll()
-               .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),",").toString())
+               .antMatchers("/**").hasAnyRole(StringUtils.collectionToDelimitedString(getRoles(),","))
                .and()
                .httpBasic();
        }