Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dubbo-2798]fix apporiate NotWritablePropertyException #2800

Merged
merged 12 commits into from
Nov 20, 2018
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ private static BeanDefinition parse(Element element, ParserContext parserContext
&& Modifier.isPublic(setter.getModifiers())
&& setter.getParameterTypes().length == 1) {
Class<?> type = setter.getParameterTypes()[0];
String property = StringUtils.camelToSplitName(name.substring(3, 4).toLowerCase() + name.substring(4), "-");
String propertyName = name.substring(3, 4).toLowerCase() + name.substring(4);
String property = StringUtils.camelToSplitName(propertyName, "-");
props.add(property);
Method getter = null;
try {
Expand Down Expand Up @@ -223,7 +224,7 @@ private static BeanDefinition parse(Element element, ParserContext parserContext
}
reference = new RuntimeBeanReference(value);
}
beanDefinition.getPropertyValues().addPropertyValue(property, reference);
beanDefinition.getPropertyValues().addPropertyValue(propertyName, reference);
}
}
}
Expand Down