You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/28 12:13:15 UTC
[GitHub] [shardingsphere] iMinusMinus opened a new pull request #13834: fix file not found in windows os: config path with blank character re…
iMinusMinus opened a new pull request #13834:
URL: https://github.com/apache/shardingsphere/pull/13834
Fixes #13833.
Changes proposed in this pull request:
- change 'org.apache.shardingsphere.proxy.config.ProxyConfigurationLoader', replace 'url.getFile()' with 'url.toURI().getPath()', change method signature as throws URISyntaxException
- change 'org.apache.shardingsphere.proxy.Bootstrap', change 'main' method signature as throws URISyntaxException
- change 'org.apache.shardingsphere.proxy.config.ProxyConfigurationLoaderTest', change 'assertLoad' method signature as throws URISyntaxException
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #13834: fix file not found in windows os: config path with blank character re…
Posted by GitBox <gi...@apache.org>.
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. What do you think?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] iMinusMinus commented on a change in pull request #13834: fix file not found in windows os: config path with blank character re…
Posted by GitBox <gi...@apache.org>.
iMinusMinus commented on a change in pull request #13834:
URL: https://github.com/apache/shardingsphere/pull/13834#discussion_r762380762
##########
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:
agreed
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #13834: fix file not found in windows os: config path with blank character re…
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #13834:
URL: https://github.com/apache/shardingsphere/pull/13834#issuecomment-985964795
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#13834](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8ee03e5) into [master](https://codecov.io/gh/apache/shardingsphere/commit/b63d0c34a8ec788aab20f349d49d22a47795fa39?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b63d0c3) will **increase** coverage by `0.07%`.
> The diff coverage is `0.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/13834/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #13834 +/- ##
============================================
+ Coverage 63.86% 63.93% +0.07%
- Complexity 1728 1771 +43
============================================
Files 2772 2799 +27
Lines 41325 41728 +403
Branches 7048 7133 +85
============================================
+ Hits 26391 26680 +289
- Misses 12915 13009 +94
- Partials 2019 2039 +20
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...gsphere/proxy/config/ProxyConfigurationLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9jb25maWcvUHJveHlDb25maWd1cmF0aW9uTG9hZGVyLmphdmE=) | `83.33% <0.00%> (-2.88%)` | :arrow_down: |
| [.../shardingsphere/infra/rewrite/SQLRewriteEntry.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtcmV3cml0ZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvaW5mcmEvcmV3cml0ZS9TUUxSZXdyaXRlRW50cnkuamF2YQ==) | `83.33% <0.00%> (-16.67%)` | :arrow_down: |
| [...nfra/metadata/rule/ShardingSphereRuleMetaData.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9tZXRhZGF0YS9ydWxlL1NoYXJkaW5nU3BoZXJlUnVsZU1ldGFEYXRhLmphdmE=) | `50.00% <0.00%> (-16.67%)` | :arrow_down: |
| [...ig/swapper/YamlDataSourceConfigurationSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS95YW1sL2NvbmZpZy9zd2FwcGVyL1lhbWxEYXRhU291cmNlQ29uZmlndXJhdGlvblN3YXBwZXIuamF2YQ==) | `55.00% <0.00%> (-13.75%)` | :arrow_down: |
| [...DatabaseDiscoveryRuleConfigurationYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZGItZGlzY292ZXJ5L3NoYXJkaW5nc3BoZXJlLWRiLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYmRpc2NvdmVyeS95YW1sL3N3YXBwZXIvRGF0YWJhc2VEaXNjb3ZlcnlSdWxlQ29uZmlndXJhdGlvbllhbWxTd2FwcGVyLmphdmE=) | `74.28% <0.00%> (-13.22%)` | :arrow_down: |
| [...rter/ReadwriteSplittingRuleStatementConverter.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy9zaGFyZGluZ3NwaGVyZS1yZWFkd3JpdGUtc3BsaXR0aW5nLWRpc3RzcWwvc2hhcmRpbmdzcGhlcmUtcmVhZHdyaXRlLXNwbGl0dGluZy1kaXN0c3FsLWhhbmRsZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3JlYWR3cml0ZXNwbGl0dGluZy9kaXN0c3FsL2hhbmRsZXIvY29udmVydGVyL1JlYWR3cml0ZVNwbGl0dGluZ1J1bGVTdGF0ZW1lbnRDb252ZXJ0ZXIuamF2YQ==) | `87.50% <0.00%> (-12.50%)` | :arrow_down: |
| [...ication/jdbc/datasource/JDBCBackendDataSource.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9jb21tdW5pY2F0aW9uL2pkYmMvZGF0YXNvdXJjZS9KREJDQmFja2VuZERhdGFTb3VyY2UuamF2YQ==) | `78.57% <0.00%> (-7.64%)` | :arrow_down: |
| [...RuleAlgorithmProviderConfigurationYamlSwapper.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtZmVhdHVyZXMvc2hhcmRpbmdzcGhlcmUtZGItZGlzY292ZXJ5L3NoYXJkaW5nc3BoZXJlLWRiLWRpc2NvdmVyeS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9kYmRpc2NvdmVyeS95YW1sL3N3YXBwZXIvRGF0YWJhc2VEaXNjb3ZlcnlSdWxlQWxnb3JpdGhtUHJvdmlkZXJDb25maWd1cmF0aW9uWWFtbFN3YXBwZXIuamF2YQ==) | `93.33% <0.00%> (-6.67%)` | :arrow_down: |
| [...ra/binder/statement/CommonSQLStatementContext.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtaW5mcmEvc2hhcmRpbmdzcGhlcmUtaW5mcmEtYmluZGVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9pbmZyYS9iaW5kZXIvc3RhdGVtZW50L0NvbW1vblNRTFN0YXRlbWVudENvbnRleHQuamF2YQ==) | `71.42% <0.00%> (-6.35%)` | :arrow_down: |
| [.../text/admin/mysql/executor/ShowTablesExecutor.java](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L2FkbWluL215c3FsL2V4ZWN1dG9yL1Nob3dUYWJsZXNFeGVjdXRvci5qYXZh) | `40.90% <0.00%> (-4.10%)` | :arrow_down: |
| ... and [124 more](https://codecov.io/gh/apache/shardingsphere/pull/13834/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b63d0c3...8ee03e5](https://codecov.io/gh/apache/shardingsphere/pull/13834?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN merged pull request #13834: fix file not found in windows os: config path with blank character re…
Posted by GitBox <gi...@apache.org>.
TeslaCN merged pull request #13834:
URL: https://github.com/apache/shardingsphere/pull/13834
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on a change in pull request #13834: fix file not found in windows os: config path with blank character re…
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org