You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2013/01/04 02:39:11 UTC
[jira] [Resolved] (CXF-4727) NPE in
org.apache.cxf.resource.ExtendedURIResolver
[ https://issues.apache.org/jira/browse/CXF-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-4727.
------------------------------
Resolution: Fixed
Fix Version/s: 2.7.2
2.6.5
2.5.8
Assignee: Daniel Kulp
> NPE in org.apache.cxf.resource.ExtendedURIResolver
> --------------------------------------------------
>
> Key: CXF-4727
> URL: https://issues.apache.org/jira/browse/CXF-4727
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.6
> Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Maven home: C:\Java\apache-maven-3.0.4\bin\..
> Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_35\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
> Reporter: Gary Gregory
> Assignee: Daniel Kulp
> Fix For: 2.5.8, 2.6.5, 2.7.2
>
> Attachments: CXF-4727.diff
>
>
> I am seeing an NPE that comes up randomly at org.apache.cxf.resource.ExtendedURIResolver.close(ExtendedURIResolver.java:75).
> I see the method as:
> {code:java}
> public void close() {
> while (!resourceOpened.isEmpty()) {
> try {
> InputStream in = resourceOpened.pop();
> in.close();
> } catch (IOException ioe) {
> // move on...
> }
> }
> }
> {code}
> The NPE is on the line for "in.close();".
> I have no way of reproducing this, I can just watch our builds fail on rare occasion and our tests do not log the full stack trace.
> Since the catch clause does nothing, would it make sense to guard the close call? Like this:
> {code:java}
> public void close() {
> while (!resourceOpened.isEmpty()) {
> try {
> InputStream in = resourceOpened.pop();
> if (in != null) {
> in.close();
> }
> } catch (IOException ioe) {
> // move on...
> }
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira