Refactoring

4.x.x
charitha 6 years ago
parent 98dfced2b6
commit d54d78a02b

@ -18,6 +18,8 @@
*/ */
package org.wso2.carbon.device.mgt.analytics.data.publisher; package org.wso2.carbon.device.mgt.analytics.data.publisher;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.wso2.carbon.databridge.agent.exception.DataEndpointConfigurationException; import org.wso2.carbon.databridge.agent.exception.DataEndpointConfigurationException;
import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException; import org.wso2.carbon.device.mgt.analytics.data.publisher.exception.DataPublisherConfigurationException;
@ -32,6 +34,8 @@ import java.util.regex.Pattern;
public class DataPublisherUtil { public class DataPublisherUtil {
private static final Log log = LogFactory.getLog(DataPublisherUtil.class);
private DataPublisherUtil(){ private DataPublisherUtil(){
} }
@ -76,8 +80,10 @@ public class DataPublisherUtil {
} }
if (isLBURL && isFailOverURL) { if (isLBURL && isFailOverURL) {
throw new DataEndpointConfigurationException("Invalid data endpoints URL set provided : " + aURLGroup + String msg = "Invalid data endpoints URL set provided : " + aURLGroup +
", a URL group can be configured as failover OR load balancing endpoints."); ", a URL group can be configured as failover OR load balancing endpoints.";
log.error(msg);
throw new DataEndpointConfigurationException(msg);
} else { } else {
String[] urls; String[] urls;
if (isLBURL) { if (isLBURL) {

Loading…
Cancel
Save