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 <shutian....@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
lizhan...@apache.org.

Reply via email to