TeslaCN commented on a change in pull request #13834:
URL: https://github.com/apache/shardingsphere/pull/13834#discussion_r757996560
##########
File path:
shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/config/ProxyConfigurationLoader.java
##########
@@ -53,18 +54,19 @@
* @param path configuration path of ShardingSphere-Proxy
* @return configuration of ShardingSphere-Proxy
* @throws IOException IO exception
+ * @throws URISyntaxException URI syntax exception
*/
- public static YamlProxyConfiguration load(final String path) throws
IOException {
+ public static YamlProxyConfiguration load(final String path) throws
IOException, URISyntaxException {
YamlProxyServerConfiguration serverConfig =
loadServerConfiguration(getResourceFile(String.join("/", path,
SERVER_CONFIG_FILE)));
File configPath = getResourceFile(path);
Collection<YamlProxyRuleConfiguration> ruleConfigs =
loadRuleConfigurations(configPath);
return new YamlProxyConfiguration(serverConfig,
ruleConfigs.stream().collect(Collectors.toMap(
YamlProxyRuleConfiguration::getSchemaName, each -> each,
(oldValue, currentValue) -> oldValue, LinkedHashMap::new)));
}
- private static File getResourceFile(final String path) {
+ private static File getResourceFile(final String path) throws
URISyntaxException {
Review comment:
I prefer using `@SneakyThrow(URISyntaxException.class)` here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]