Merge "Sonar Fixes - MusicDataStoreHandle.java"
authorThomas Nelson <nelson24@att.com>
Fri, 8 Mar 2019 21:30:31 +0000 (21:30 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 8 Mar 2019 21:30:31 +0000 (21:30 +0000)
1  2 
src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java

@@@ -3,9 -3,8 +3,10 @@@
   * org.onap.music
   * ===================================================================
   *  Copyright (c) 2017 AT&T Intellectual Property
+  *  Modifications Copyright (C) 2019 IBM.
   * ===================================================================
 + *  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
@@@ -35,11 -34,9 +36,11 @@@ import com.datastax.driver.core.ResultS
  import com.datastax.driver.core.TableMetadata;
  
  public class MusicDataStoreHandle {
 -    
 -    
 -    
 +
 +    private MusicDataStoreHandle(){
 +        throw new IllegalStateException("Utility class");
 +    }
 +
      public static MusicDataStore mDstoreHandle = null;
      private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MusicDataStoreHandle.class);
      
@@@ -69,7 -66,7 +70,7 @@@
         long start = System.currentTimeMillis();
         if (mDstoreHandle == null) {
             // Quick Fix - Best to put this into every call to getDSHandle?
-            if (! MusicUtil.getMyCassaHost().equals("localhost") ) {
+            if (!"localhost".equals(MusicUtil.getMyCassaHost())) {
                 mDstoreHandle = new MusicDataStore(MusicUtil.getMyCassaHost());
             } else {
                 mDstoreHandle = new MusicDataStore();