[jira] Created: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

View: New views
13 Messages — Rating Filter:   Alert me  

[jira] Created: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
----------------------------------------------------------------------------------------------

                 Key: XBEAN-92
                 URL: https://issues.apache.org/jira/browse/XBEAN-92
             Project: XBean
          Issue Type: Bug
         Environment: IBM JDK 5
            Reporter: karan singh malhi
            Priority: Blocker


With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting

In UrlSet, the following method will lead to a NullPointerException:

    public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
        return excludePaths(System.getProperty("java.endorsed.dirs"));
    }
This is because the excludePaths() method assumes that the pathString argument is always non-null.
   public UrlSet excludePaths(String pathString) throws MalformedURLException {
        String[] paths = pathString.split(File.pathSeparator);
        UrlSet urlSet = this;
        for (String path : paths) {
            File file = new File(path);
            urlSet = urlSet.exclude(file);
        }
        return urlSet;
    }



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


[jira] Assigned: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Blevins reassigned XBEAN-92:
----------------------------------

    Assignee: David Blevins

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: David Blevins
>            Priority: Blocker
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Updated: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Cabrera updated XBEAN-92:
------------------------------

    Fix Version/s: 3.4

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.4
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Updated: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dain Sundstrom updated XBEAN-92:
--------------------------------

    Component/s: finder

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.4
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Updated: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated XBEAN-92:
---------------------------------

    Fix Version/s:     (was: 3.4)
                   3.5

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: David Blevins
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Assigned: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Jiang reassigned XBEAN-92:
--------------------------------

    Assignee: Shawn Jiang  (was: David Blevins)

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Updated: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Jiang updated XBEAN-92:
-----------------------------


Can't recreate this anymore, that's because that

  public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
        return excludePaths(System.getProperty("java.endorsed.dirs"));
    }

has become:


public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
        return excludePaths(System.getProperty("java.endorsed.dirs", ""));
    }


so that there will be a default "" for endorsed.dirs instead of a null.   This JIRA can be closed.

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Commented: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12715056#action_12715056 ]

Shawn Jiang commented on XBEAN-92:
----------------------------------

Seems I can't closed it.  Can anyone help close this JIRA ?  Thanks.

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Commented: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744552#action_12744552 ]

Andreas Veithen commented on XBEAN-92:
--------------------------------------

I think the code is still not correct. I'm using OpenEJB 3.1.1 which depends on xbean-finder-shaded-3.6-r779512.jar. Looking at the byte code of UrlSet#excludeJavaEndorsedDirs(), this version already contains the change described above (usage of System#getProperty(String, String) instead of System#getProperty(String)). It no longer throws a NullPointerException, but excludeJavaEndorsedDirs now removes all URLs with the "file" protocol.

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Commented: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751280#action_12751280 ]

David Blevins commented on XBEAN-92:
------------------------------------

Andreas, if you can come up with a quick patch I can get it in.  We will be cutting an xbean-finder 3.6 release in the next day or two (beginning of next week at the latest) and then an OpenEJB 3.1.2 right after.


> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Updated: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated XBEAN-92:
---------------------------------

    Attachment: XBEAN-92.patch.txt

Attached a patch that corrects the behavior of excludeJavaEndorsedDirs (and excludeJavaExtDirs). If the corresponding system property is not set, then nothing will be excluded.

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>         Attachments: XBEAN-92.patch.txt
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Commented: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753476#action_12753476 ]

David Blevins commented on XBEAN-92:
------------------------------------

$ svn ci xbean-finder
Sending        xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java
Transmitting file data .
Committed revision 813275.

Didn't get this applied for the 3.6 binaries up for vote now.  Unsure if we'll see a second roll.


> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.5
>
>         Attachments: XBEAN-92.patch.txt
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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


[jira] Closed: (XBEAN-92) UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/jira/browse/XBEAN-92?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks closed XBEAN-92.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.5)
                   3.6

> UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null
> ----------------------------------------------------------------------------------------------
>
>                 Key: XBEAN-92
>                 URL: https://issues.apache.org/jira/browse/XBEAN-92
>             Project: XBean
>          Issue Type: Bug
>          Components: finder
>         Environment: IBM JDK 5
>            Reporter: karan singh malhi
>            Assignee: Shawn Jiang
>            Priority: Blocker
>             Fix For: 3.6
>
>         Attachments: XBEAN-92.patch.txt
>
>
> With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null.  This is a critical issue as it prevents OpenEjb from starting
> In UrlSet, the following method will lead to a NullPointerException:
>     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
>         return excludePaths(System.getProperty("java.endorsed.dirs"));
>     }
> This is because the excludePaths() method assumes that the pathString argument is always non-null.
>    public UrlSet excludePaths(String pathString) throws MalformedURLException {
>         String[] paths = pathString.split(File.pathSeparator);
>         UrlSet urlSet = this;
>         for (String path : paths) {
>             File file = new File(path);
>             urlSet = urlSet.exclude(file);
>         }
>         return urlSet;
>     }

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