<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mbingham" rel="nofollow">Mike Bingham</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7714?redirect=false" rel="nofollow">SPR-7714</a></strong> and commented</p>
<p dir="auto">After upgrading to Spring 3.0.5, we've encountered a regression when attempting to bind form inputs to nested map value properties with auto-grow.</p>
<p dir="auto">To illustrate, in 3.0.5, the following test from BeanWrapperAutoGrowingTests works:</p>
<p dir="auto"><code class="notranslate">@Test</code><br>
public void setPropertyValueAutoGrowMap() {<br>
wrapper.setPropertyValue("map[A]", new Bean());<br>
assertTrue(bean.getMap().get("A") instanceof Bean);<br>
}</p>
<p dir="auto">However, the following test fails:</p>
<p dir="auto"><code class="notranslate">@Test</code><br>
public void setNestedPropertyValueAutoGrowMap() {<br>
wrapper.setPropertyValue("map[A].nested", new Bean());<br>
assertTrue(bean.getMap().get("A").getNested() instanceof Bean);<br>
}</p>
<p dir="auto">Both tests pass in 3.0.4.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398109336" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12495" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12495/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12495">#12495</a> DataBinder/BeanWrapper regression: Binding to a nested Map property fails in 3.0.5, works in 3.0.4 (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mschipperheyn" rel="nofollow">marc schipperheyn</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-8759?redirect=false" rel="nofollow">SPR-8759</a></strong> and commented</p>
<p dir="auto">The getter return type (Map) is not the same as setter (Properties). Since Spring 3.1, this is a problem. I get</p>
<p dir="auto">org.springframework.beans.NotWritablePropertyException: Invalid property 'statusCodes' of bean class [nl.project.interceptor.MySimpleExceptionResolver]: Bean property 'statusCodes' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?<br>
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1057)<br>
at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:920)</p>
<p dir="auto">This makes it impossible to configure properties for 'statusCodes' in dispatcher-servlet.xml</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1 RC1</p>
<p dir="auto"><strong>Issue Links:</strong></p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398114984" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/13409" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/13409/hovercard" href="https://github.com/spring-projects/spring-framework/issues/13409">#13409</a> Impossible to set SimpleMappingExceptionResolver.statusCodes (<em><strong>"is duplicated by"</strong></em>)</li>
</ul>
<p dir="auto"><strong>Referenced from:</strong> commits <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/spring-projects/spring-framework/commit/5d42a6242fe0146423fceb266901d03021d0de89/hovercard" href="https://github.com/spring-projects/spring-framework/commit/5d42a6242fe0146423fceb266901d03021d0de89"><tt>5d42a62</tt></a></p>
<p dir="auto">1 votes, 1 watchers</p>