blob: 491b07abdd98e2cabeb586d21c903d8005b18157 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package org.openecomp.sdc.dmaap;
import org.apache.commons.lang3.StringUtils;
import java.nio.file.InvalidPathException;
public class Util {
public static String toPath(String path , String filename) throws InvalidPathException{
if (StringUtils.isNotBlank(path) ){
if (path.trim().endsWith("/") || path.trim().endsWith("/")){
return path+(filename!=null ? filename : "");
}
return path+"/"+(filename!=null ? filename : "");
}
throw new InvalidPathException("wrong path configuration cannot find path -> ",path);
}
}
|