in library/src/main/java/com/alibaba/dcm/DnsCacheManipulator.java [123:142]
public static void loadDnsCacheConfig(String propertiesFileName) {
InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(propertiesFileName);
if (inputStream == null) {
inputStream = DnsCacheManipulator.class.getClassLoader().getResourceAsStream(propertiesFileName);
}
if (inputStream == null) {
throw new DnsCacheManipulatorException("Fail to find " + propertiesFileName + " on classpath!");
}
try {
Properties properties = new Properties();
properties.load(inputStream);
inputStream.close();
setDnsCache(properties);
} catch (Exception e) {
final String message = String.format("Fail to loadDnsCacheConfig from %s, cause: %s",
propertiesFileName, e);
throw new DnsCacheManipulatorException(message, e);
}
}