<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=nicholas.daley" rel="nofollow">Nicholas Daley (at Firecrest)</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6070?redirect=false" rel="nofollow">SPR-6070</a></strong> and commented</p>
<p dir="auto">CookieGenerator.cookieMaxAge's setter uses the primitive type 'int', but the getter uses 'Integer'.  This seems to stop this property from being configured through the spring configuration xml file.<br>
If it's important, I'm actually using a subclass of CookieGenerator.</p>
<p dir="auto">Somebody in the forums had a similar problem:<br>
<a href="http://forum.springsource.org/showthread.php?p=254675" rel="nofollow">http://forum.springsource.org/showthread.php?p=254675</a></p>
<p dir="auto">Partial stacktrace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'cookieMaxAge' of bean class [org.jasig.cas.web.support.CookieRetrievingCookieGenerator]: Bean property 'cookieMaxAge' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:850)
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:701)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:60)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
	... 55 more"><pre class="notranslate"><code class="notranslate">Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'cookieMaxAge' of bean class [org.jasig.cas.web.support.CookieRetrievingCookieGenerator]: Bean property 'cookieMaxAge' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:850)
	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:701)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:60)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
	... 55 more
</code></pre></div>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 M4</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="398097318" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10750" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10750/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10750">#10750</a> cookieMaxAge field fails in org.springframework.web.servlet.i18n.CookieLocaleResolver (<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/d0c8545d9bf4b97c47d257b445cfe0a2ed09db88/hovercard" href="https://github.com/spring-projects/spring-framework/commit/d0c8545d9bf4b97c47d257b445cfe0a2ed09db88"><tt>d0c8545</tt></a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=imysak" rel="nofollow">Ihor Mysak</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9668?redirect=false" rel="nofollow">SPR-9668</a></strong> and commented</p>
<p dir="auto">our old methods with signature like:<br>
<code class="notranslate">@RequestMapping</code>(value = "/write-review", method = RequestMethod.POST)<br>
public Object writeReview(.....<br>
was successfully works with response:<br>
return "redirect:/some-url";<br>
on old DefaultAnnotationHandlerMapping/AnnotationMethodHandlerAdapter</p>
<p dir="auto">but after migration on RequestMappingHandlerMapping/RequestMappingHandlerAdapter this method was broken.</p>
<p dir="auto">We fix it just rename return-type from Object to String.<br>
But we waste a lot of time to find the problem. Will be great to fix it, or at least to document this behavior.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.1.1</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="398151985" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14256" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14256/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14256">#14256</a> Backport "Value-oriented return method handling broken in 3.1" (<em><strong>"duplicates"</strong></em>)</li>
</ul>