X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fmusic%2Fdatastore%2FMusicDataStoreHandle.java;h=dc1c43a8aad1ad019276100886d7d3aceafcbe72;hb=24cdf12953c0e03af254920a51d6a2e1060b02a3;hp=bb8f3cbdb5d16df3494dc49412ea630c3b263601;hpb=0ef26619ea167f455e907db7998792b5114fb1dd;p=music.git diff --git a/src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java b/src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java index bb8f3cbd..dc1c43a8 100644 --- a/src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java +++ b/src/main/java/org/onap/music/datastore/MusicDataStoreHandle.java @@ -3,6 +3,9 @@ * 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. @@ -28,15 +31,16 @@ import java.util.Map; import org.onap.music.eelf.logging.EELFLoggerDelegate; import org.onap.music.exceptions.MusicServiceException; import org.onap.music.main.MusicUtil; -import org.onap.music.service.impl.MusicZKCore; import com.datastax.driver.core.ResultSet; 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); @@ -66,7 +70,7 @@ public class MusicDataStoreHandle { 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();