1 package org.openecomp.sdc.dmaap;
3 import org.apache.commons.lang3.StringUtils;
5 import java.nio.file.InvalidPathException;
9 public static String toPath(String path , String filename) throws InvalidPathException{
10 if (StringUtils.isNotBlank(path) ){
11 if (path.trim().endsWith("/") || path.trim().endsWith("/")){
12 return path+(filename!=null ? filename : "");
14 return path+"/"+(filename!=null ? filename : "");
17 throw new InvalidPathException("wrong path configuration cannot find path -> ",path);