<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=littleli" rel="nofollow">Aleš Najmann</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-6482?redirect=false" rel="nofollow">SPR-6482</a></strong> and commented</p>
<p dir="auto">At the moment in my code exist method with such signature:</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@RequestMapping(value = &quot;/projects/{filter}/{order}-{direction}&quot;, method = RequestMethod.GET)
public String filteredProjectListing(@PathVariable(&quot;filter&quot;) String filter, @PathVariable(&quot;order&quot;) String order,
            @PathVariable(&quot;direction&quot;) String direction, ModelMap model) {
 ...
}"><pre class="notranslate"><span class="pl-c1">@</span><span class="pl-c1">RequestMapping</span>(<span class="pl-s1">value</span> = <span class="pl-s">"/projects/{filter}/{order}-{direction}"</span>, <span class="pl-s1">method</span> = <span class="pl-smi">RequestMethod</span>.<span class="pl-c1">GET</span>)
<span class="pl-k">public</span> <span class="pl-smi">String</span> <span class="pl-s1">filteredProjectListing</span>(<span class="pl-c1">@</span><span class="pl-c1">PathVariable</span>(<span class="pl-s">"filter"</span>) <span class="pl-smi">String</span> <span class="pl-s1">filter</span>, <span class="pl-c1">@</span><span class="pl-c1">PathVariable</span>(<span class="pl-s">"order"</span>) <span class="pl-smi">String</span> <span class="pl-s1">order</span>,
            <span class="pl-c1">@</span><span class="pl-c1">PathVariable</span>(<span class="pl-s">"direction"</span>) <span class="pl-smi">String</span> <span class="pl-s1">direction</span>, <span class="pl-smi">ModelMap</span> <span class="pl-s1">model</span>) {
 ...
}</pre></div>
<p dir="auto">order is String variable containing ognl-like expresssion ie. "raging.result" (which I later use for BeanComparator) but this mapping is in version RC3 is not found, which is different behaviour from RC2 where there is no such problem.</p>
<p dir="auto">Log message with example of given fault result is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2009-12-01 16:38:02,459 WARN [org.springframework.web.servlet.PageNotFound] - &lt;No mapping found for HTTP request with URI [/Example/projects/all/rate.result-asc.html] in DispatcherServlet with name 'Example'&gt;"><pre class="notranslate"><code class="notranslate">2009-12-01 16:38:02,459 WARN [org.springframework.web.servlet.PageNotFound] - &lt;No mapping found for HTTP request with URI [/Example/projects/all/rate.result-asc.html] in DispatcherServlet with name 'Example'&gt;
</code></pre></div>
<p dir="auto">There is no problem with handling path which doesn't contain more '.' (dot) characters, so this can probably help you with analysis of the problem.</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0 RC3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/15985/UriTemplateServletAnnotationControllerTests.java.diff" rel="nofollow">UriTemplateServletAnnotationControllerTests.java.diff</a> (<em>1.41 kB</em>)</li>
</ul>
<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="398100875" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11226" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11226/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11226">#11226</a> Requests URIs containing . cannot be mapped correctly using <code class="notranslate">@RequestMapping</code> in RC3  (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398100349" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11165" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11165/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11165">#11165</a> <code class="notranslate">@MVC</code> URI Template Variable Regression - Matching values containing . (dot) (<em><strong>"is duplicated by"</strong></em>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398098734" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/10947" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/10947/hovercard" href="https://github.com/spring-projects/spring-framework/issues/10947">#10947</a> PathVariable resolution does not work properly</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/976f920db2773864e657ff5e5f6c0cf71f27665a/hovercard" href="https://github.com/spring-projects/spring-framework/commit/976f920db2773864e657ff5e5f6c0cf71f27665a"><tt>976f920</tt></a></p>
<p dir="auto">1 votes, 3 watchers</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=edspace" rel="nofollow">Eduard Papa</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7474?redirect=false" rel="nofollow">SPR-7474</a></strong> and commented</p>
<p dir="auto">According to the javadoc for XMLStreamReader, when a null namespaceURI is passed to getAttributeValue(String, String), the method should return the attribute value without matching the namespace URI.</p>
<p dir="auto">Javadoc:<br>
<a href="http://download-llnw.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html#getAttributeValue%28java.lang.String,%20java.lang.String%29" rel="nofollow">http://download-llnw.oracle.com/javase/6/docs/api/javax/xml/stream/XMLStreamReader.html#getAttributeValue%28java.lang.String,%20java.lang.String%29</a></p>
<p dir="auto">AbstractXmlStreamReader is not handling that condition correctly and tries to match the attribute's namespace with null:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (name.getNamespaceURI().equals(namespaceURI) &amp;&amp; name.getLocalPart().equals(localName)) {
   return getAttributeValue( i ) ;
}
return null;"><pre class="notranslate"><code class="notranslate">if (name.getNamespaceURI().equals(namespaceURI) &amp;&amp; name.getLocalPart().equals(localName)) {
   return getAttributeValue( i ) ;
}
return null;
</code></pre></div>
<p dir="auto">This results in getAttributeValue returning null whenever the namespaceURI parameter is null.</p>
<p dir="auto">The fix would be to change the code above as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (*(namespaceURI == null || name.getNamespaceURI().equals(namespaceURI))* &amp;&amp; name.getLocalPart().equals(localName)) {
   return getAttributeValue( i ) ;
}
return null;"><pre class="notranslate"><code class="notranslate">if (*(namespaceURI == null || name.getNamespaceURI().equals(namespaceURI))* &amp;&amp; name.getLocalPart().equals(localName)) {
   return getAttributeValue( i ) ;
}
return null;
</code></pre></div>
<p dir="auto">Please note that this problem exists in two classes:<br>
org.springframework.util.xml.AbstractXmlStreamReader in Spring-Core 3.0.3<br>
org.springframework.xml.stream.AbstractXmlStreamReader in Spring-Xml 1.5.9</p>
<hr>
<p dir="auto"><strong>Affects:</strong> 3.0.3</p>
<p dir="auto"><strong>Attachments:</strong></p>
<ul dir="auto">
<li><a href="https://jira.spring.io/secure/attachment/17012/XStreamMarshaller7474.java" rel="nofollow">XStreamMarshaller7474.java</a> (<em>1.75 kB</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/061b2c91a0bc979e722aeb6ed02060e9c8744f44/hovercard" href="https://github.com/spring-projects/spring-framework/commit/061b2c91a0bc979e722aeb6ed02060e9c8744f44"><tt>061b2c9</tt></a></p>