Sonar cleanup for PolicyEngineUtils
[policy/engine.git] / PolicyEngineUtils / src / main / java / org / onap / policy / utils / PolicyUtils.java
index b74bd28..fa23f4a 100644 (file)
@@ -45,11 +45,11 @@ import org.onap.policy.common.logging.flexlogger.Logger;
 import org.xml.sax.InputSource;
 import org.xml.sax.XMLReader;
 
-import com.att.aft.dme2.internal.gson.JsonParser;
-import com.att.aft.dme2.internal.gson.JsonSyntaxException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.CharMatcher;
+import com.google.gson.JsonParser;
+import com.google.gson.JsonSyntaxException;
 
 public class PolicyUtils {
     private static final Logger LOGGER = FlexLogger.getLogger(PolicyUtils.class);
@@ -114,7 +114,7 @@ public class PolicyUtils {
     public static String[] decodeBasicEncoding(String encodedValue) throws UnsupportedEncodingException {
         if(encodedValue!=null && encodedValue.contains("Basic ")){
             String encodedUserPassword = encodedValue.replaceFirst("Basic"  + " ", "");
-            String usernameAndPassword = null;
+            String usernameAndPassword;
             byte[] decodedBytes = Base64.getDecoder().decode(encodedUserPassword);
             usernameAndPassword = new String(decodedBytes, "UTF-8");
             StringTokenizer tokenizer = new StringTokenizer(usernameAndPassword, ":");