Skip to content

Comments

Zerts container#105

Open
zerts wants to merge 5 commits intoarhangeldim:masterfrom
zerts:zerts-container
Open

Zerts container#105
zerts wants to merge 5 commits intoarhangeldim:masterfrom
zerts:zerts-container

Conversation

@zerts
Copy link

@zerts zerts commented Nov 2, 2016

No description provided.

private List<Bean> beans;
private Map<String, Bean> beanMap = new HashMap<>();
private Map<String, Bean> beanClassMap = new HashMap<>();
private Map<String, Object> objByName = new HashMap<>();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

зачем отдельные мапы для бинов?

beans.forEach(x -> beanMap.put(x.getId(), x));
beans.forEach(x -> beanClassMap.put(x.getClassName(), x));
} catch (ParserConfigurationException | IOException | SAXException e) {
e.printStackTrace();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Наверное, нужно кинуть InvalidConfigurationException?

BeanXmlReader bxr = new BeanXmlReader();
try {
beans = bxr.parseBeans(pathToConfig);
beans.forEach(x -> beanMap.put(x.getId(), x));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename 'x' to 'bean'

try {
generateObject(value.getValue());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
e.printStackTrace();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробросить exception?

args = new Object[] { objByName.get(childBean.getId()) };

} catch (ClassNotFoundException e) {
e.printStackTrace();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

опять скрыли ошибку

try {
setter = currClass.getMethod(methodName, argsTypes);
} catch (NoSuchMethodException e) {
e.printStackTrace();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

снова

* Created by zerts on 02.11.16.
*/

class Graph {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Откуда дровишки?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants