From: Thomas Nelson Date: Fri, 8 Mar 2019 21:30:31 +0000 (+0000) Subject: Merge "Sonar Fixes - MusicDataStoreHandle.java" X-Git-Tag: 2.5.8~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=24cdf12953c0e03af254920a51d6a2e1060b02a3;hp=-c;p=music.git Merge "Sonar Fixes - MusicDataStoreHandle.java" --- 24cdf12953c0e03af254920a51d6a2e1060b02a3 diff --combined src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java index 194fdad1,a5c536d9..dc1c43a8 --- a/src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java +++ b/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();