-
Notifications
You must be signed in to change notification settings - Fork 44
Kostet19940308 container #116
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
base: master
Are you sure you want to change the base?
Kostet19940308 container #116
Conversation
| Object createdObject = classOfBean.getConstructor().newInstance(); | ||
| for (Map.Entry<String, Property> entry : bean.getProperties().entrySet()) { | ||
| for (Field field : createdObject.getClass().getDeclaredFields()) { | ||
| if (field.getName().equals(entry.getKey())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
очень много вложенных условий
можно этого избегать
if (!field.getName().equals(entry.getKey)){
continue;
}
| if (entry.getValue().getType() == ValueType.VAL) { | ||
| field.setAccessible(true); | ||
| String value = entry.getValue().getValue(); | ||
| switch (field.getType().getTypeName().toLowerCase()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
большой метод. можно разбить - вынести switch-case в отдельный метод
Done Container