You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Yosimasu Lin (JIRA)" <ji...@apache.org> on 2009/04/17 04:39:14 UTC

[jira] Created: (CXF-2175) DynamicClientFactory.setupClasspath throws a null pointer exception if URI contains undefined path.

DynamicClientFactory.setupClasspath throws a null pointer exception if URI contains undefined path.
---------------------------------------------------------------------------------------------------

                 Key: CXF-2175
                 URL: https://issues.apache.org/jira/browse/CXF-2175
             Project: CXF
          Issue Type: Bug
          Components: JAXB Databinding
    Affects Versions: 2.1.4
         Environment: Glassfish v2.1/v2ur2, Windows Vista x64, Windows Server 2003, JDK 1.6.0_11
            Reporter: Yosimasu Lin
             Fix For: 2.1.5


On Glassfish, DynamicClientFactory.setupClasspath sometimes throws NullPointerExcpetion.
I catch the exception happened position at line 566:

565:    try { 
566:        file = new File(url.toURI().getPath()); 
567:    } catch (URISyntaxException urise) { 
568:        file = new File(url.getPath()); 
569:    }

The url.toURI().getPath() returns null when the path is undefined.

The url with NPE will appear TWICE, one throws NPE, the other passes.
Because the reason aboved, I modify code as belowed:

565:    try { 
566:        file = new File(url.toURI().getPath()); 
567:    } catch (URISyntaxException urise) { 
568:        file = new File(url.getPath()); 
569:    } catch (NullPointerException npe) {
570:        continue; // undefined path.
571:    }

Sincerely,
Masu
2009/04/17


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2175) DynamicClientFactory.setupClasspath throws a null pointer exception if URI contains undefined path.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2175.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.1
         Assignee: Daniel Kulp

> DynamicClientFactory.setupClasspath throws a null pointer exception if URI contains undefined path.
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2175
>                 URL: https://issues.apache.org/jira/browse/CXF-2175
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.1.4
>         Environment: Glassfish v2.1/v2ur2, Windows Vista x64, Windows Server 2003, JDK 1.6.0_11
>            Reporter: Yosimasu Lin
>            Assignee: Daniel Kulp
>             Fix For: 2.1.5, 2.2.1
>
>
> On Glassfish, DynamicClientFactory.setupClasspath sometimes throws NullPointerExcpetion.
> I catch the exception happened position at line 566:
> 565:    try { 
> 566:        file = new File(url.toURI().getPath()); 
> 567:    } catch (URISyntaxException urise) { 
> 568:        file = new File(url.getPath()); 
> 569:    }
> The url.toURI().getPath() returns null when the path is undefined.
> The url with NPE will appear TWICE, one throws NPE, the other passes.
> Because the reason aboved, I modify code as belowed:
> 565:    try { 
> 566:        file = new File(url.toURI().getPath()); 
> 567:    } catch (URISyntaxException urise) { 
> 568:        file = new File(url.getPath()); 
> 569:    } catch (NullPointerException npe) {
> 570:        continue; // undefined path.
> 571:    }
> Sincerely,
> Masu
> 2009/04/17

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.