diff --git a/changes/1.5.0.md b/changes/1.5.0.md index 0c21074529bdfb7c6adc38fa08f3ea7552d43498..2dbb77c015bff0315f0d7da7a8f561c45bd50398 100644 --- a/changes/1.5.0.md +++ b/changes/1.5.0.md @@ -64,6 +64,8 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单 - [[#3156](https://github.com/seata/seata/pull/3156)] 优化SpringProxyUtils.findTargetClass的逻辑 - [[#3441](https://github.com/seata/seata/pull/3441)] 优化starter的自动配置处理 - [[#3466](https://github.com/seata/seata/pull/3466)] 优化ExecuteTemplateXA类中判断XA不是最终状态的比较方式 + - [[#3485](https://github.com/seata/seata/pull/3485)] 优化 ConfigurationFactory 中无用的try/catch + ### test - [[#3381](https://github.com/seata/seata/pull/3381)] 添加 TmClient 的测试用例 @@ -89,6 +91,9 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单 - [lian88jian](https://github.com/lian88jian) - [litianyu1992](https://github.com/litianyu1992) - [xyz327](https://github.com/xyz327) + - [13414850431](https://github.com/13414850431) + + 同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。 diff --git a/changes/en-us/1.5.0.md b/changes/en-us/1.5.0.md index f4054791c8ef968ad02c3080e974504eb3eb2d8a..36aa069c222b05e5b89f7e5afad5a37e59d92386 100644 --- a/changes/en-us/1.5.0.md +++ b/changes/en-us/1.5.0.md @@ -64,10 +64,13 @@ - [[#3156](https://github.com/seata/seata/pull/3156)] optimize the logic of SpringProxyUtils.findTargetClass - [[#3441](https://github.com/seata/seata/pull/3441)] optimize the auto-configuration processing of starter - [[#3466](https://github.com/seata/seata/pull/3466)] optimize the comparison in the ExecuteTemplateXa class to determine that XA is not the final state + - [[#3485](https://github.com/seata/seata/pull/3485)] optimize useless codes in ConfigurationFactory + ### test - [[#3381](https://github.com/seata/seata/pull/3381)] test case for tmClient + Thanks to these contributors for their code commits. Please report an unintended omission. @@ -89,6 +92,7 @@ - [lian88jian](https://github.com/lian88jian) - [litianyu1992](https://github.com/litianyu1992) - [xyz327](https://github.com/xyz327) + - [13414850431](https://github.com/13414850431) Also, we receive many valuable issues, questions and advices from our community. Thanks for you all. diff --git a/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java b/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java index 232fac3868592577299e7d34bc8a481e66653e7b..957e9fcdd2922f014803643a038546822877c384 100644 --- a/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java +++ b/config/seata-config-core/src/main/java/io/seata/config/ConfigurationFactory.java @@ -99,20 +99,15 @@ public final class ConfigurationFactory { } private static Configuration buildConfiguration() { - ConfigType configType; - String configTypeName; - try { - configTypeName = CURRENT_FILE_INSTANCE.getConfig( - ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR - + ConfigurationKeys.FILE_ROOT_TYPE); + String configTypeName = CURRENT_FILE_INSTANCE.getConfig( + ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR + + ConfigurationKeys.FILE_ROOT_TYPE); - if (StringUtils.isBlank(configTypeName)) { - throw new NotSupportYetException("config type can not be null"); - } - configType = ConfigType.getType(configTypeName); - } catch (Exception e) { - throw e; + if (StringUtils.isBlank(configTypeName)) { + throw new NotSupportYetException("config type can not be null"); } + ConfigType configType = ConfigType.getType(configTypeName); + Configuration extConfiguration = null; Configuration configuration; if (ConfigType.File == configType) {