You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by li...@apache.org on 2018/04/15 09:29:32 UTC
[rocketmq] branch develop_oms_0.3.0 updated: Fix properties
injection
This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch develop_oms_0.3.0
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop_oms_0.3.0 by this push:
new f0a340f Fix properties injection
f0a340f is described below
commit f0a340f453e42d9f7741f6844e107495c1af9164
Author: shutian.lzh <sh...@alibaba-inc.com>
AuthorDate: Sun Apr 15 17:29:17 2018 +0800
Fix properties injection
---
.../src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java b/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java
index ba7cd59..054374b 100644
--- a/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java
+++ b/openmessaging/src/main/java/io/openmessaging/rocketmq/utils/BeanUtils.java
@@ -164,14 +164,14 @@ public final class BeanUtils {
final Set<String> keySet = properties.keySet();
for (String key : keySet) {
- String[] keyGroup = key.split("\\.");
+ String[] keyGroup = key.split("[\\._]");
for (int i = 0; i < keyGroup.length; i++) {
keyGroup[i] = keyGroup[i].toLowerCase();
keyGroup[i] = StringUtils.capitalize(keyGroup[i]);
}
String beanFieldNameWithCapitalization = StringUtils.join(keyGroup);
try {
- setProperties(clazz, obj, "set" + beanFieldNameWithCapitalization, properties.getString(key));
+ setProperties(clazz, obj, "setOms" + beanFieldNameWithCapitalization, properties.getString(key));
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) {
//ignored...
}
--
To stop receiving notification emails like this one, please contact
lizhanhui@apache.org.