<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sbtourist" rel="nofollow">Sergio Bossa</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4435?redirect=false" rel="nofollow">SPR-4435</a></strong> and commented</p>
<p dir="auto">The protected ServletRequestAttributes#getSession(boolean ) method returns a null session on child threads.<br>
This is wrong because it doesn't get into account what happens in the constructor:</p>
<p dir="auto">[code]<br>
public ServletRequestAttributes(HttpServletRequest request) {<br>
Assert.notNull(request, "Request must not be null");<br>
this.request = request;<br>
// Fetch existing session reference early, to have it available even<br>
// after request completion (for example, in a custom child thread).<br>
this.session = request.getSession(false);<br>
}<br>
[/code]</p>
<p dir="auto">I think that the following code into the getSession method:</p>
<p dir="auto">[code]<br>
this.session = this.request.getSession(allowCreate);<br>
return this.session;<br>
[/code]</p>
<p dir="auto">Should be as follows:</p>
<p dir="auto">[code]<br>
HttpSession newSession = this.request.getSession(allowCreate);<br>
if (newSession != null) {<br>
this.session = newSession;<br>
}<br>
return this.session;<br>
[/code]</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 2.0.7, 2.0.8</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="398085356" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9112" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9112/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9112">#9112</a> ServletRequestAttributes wrongly returns a null http session on child threads. (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=sandrews" rel="nofollow">Scott Andrews</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6351?redirect=false" rel="nofollow">SPR-6351</a></strong> and commented</p>
<p dir="auto">Between RC1 and RC2, classpath*: file paths stopped working.  In a web app context, I am importing a set of spring contexts that form a plugin system.  None of the files that match this pattern are detected<br>
&lt;import resource="classpath*:META-INF/insight/insight-plugin-*.xml" /&gt;</p>
<p dir="auto">Removing the wild card and hard coding the path also does not pickup the files.<br>
&lt;import resource="classpath*:META-INF/insight/insight-plugin-springmvc.xml" /&gt;</p>
<p dir="auto">Replacing the classpath*: with classpath: it is able to find the file.<br>
&lt;import resource="classpath:META-INF/insight/insight-plugin-springmvc.xml" /&gt;</p>
<p dir="auto">Using classpath: with a wild card only imports a single resource. (appears to be the first match alphabetically)<br>
&lt;import resource="classpath:META-INF/insight/insight-plugin-*.xml" /&gt;</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 RC2</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="398099258" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11032" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11032/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11032">#11032</a> Cannot import bean definitions using classpath*: resource location (<em><strong>"duplicates"</strong></em>)</li>
</ul>
<p dir="auto">1 votes, 0 watchers</p>