In my project there is a stackOVerFlow exception, they are creating objects inside for loop while iterating Map object.
I suspect that this complex object creation by calling other class methods inside loop is causing stackOverFlow.
Any thought on this would be greatly appreciated.
Below is the code in JAVA
for (final Map.Entry<String, SomeBean> entry : actualBeanInfo.getPropertyMap().entrySet())
{
final SomeBean property = entry.getValue();
propName = property.getName();
if (property.getGetter() == null) {
continue;
}
if (ignoreProperty(property)) {
continue;
}
Object value = SomeBeanUtilities.getBeanProperty(obj, property);
value = SomeBeanUtilities.valueFromProperty(property, declaredType, null, value, context);
}
I feel below two lines are causing error.
Object value = SomeBeanUtilities.getBeanProperty(obj, property);
value = SomeBeanUtilities.valueFromProperty(property, declaredType, null, value, context);