You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Dirk Mahler (JIRA)" <ji...@apache.org> on 2008/10/23 18:10:44 UTC

[jira] Created: (FELIX-789) NPE in ResourceComparator if no presentationname given

NPE in ResourceComparator if no presentationname given
------------------------------------------------------

                 Key: FELIX-789
                 URL: https://issues.apache.org/jira/browse/FELIX-789
             Project: Felix
          Issue Type: Bug
          Components: Bundle Repository (OBR)
    Affects Versions: bundlerepository-1.2.0
         Environment: Eclipse Equinox 3.4.0
org.apache.felix.bundlerepository_1.2.0
            Reporter: Dirk Mahler


If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:

        String name1 = (String) r1.getPresentationName();        
        String name2 = (String) r2.getPresentationName();        
        return name1.compareToIgnoreCase(name2) ;

Replacing the last line with

        return name1 != null ? name1.compareToIgnoreCase(name2) : -1;

fixes the issue.

See also discussion (especially the latest posting by Peter Kriens) under 
http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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


[jira] Resolved: (FELIX-789) NPE in ResourceComparator if no presentationname given

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-789.
-----------------------------------

    Resolution: Fixed

I have committed a patch to fix this. Dirk, please close the issue if you are satisfied. Thanks.

> NPE in ResourceComparator if no presentationname given
> ------------------------------------------------------
>
>                 Key: FELIX-789
>                 URL: https://issues.apache.org/jira/browse/FELIX-789
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>         Environment: Eclipse Equinox 3.4.0
> org.apache.felix.bundlerepository_1.2.0
>            Reporter: Dirk Mahler
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>
> If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:
>         String name1 = (String) r1.getPresentationName();        
>         String name2 = (String) r2.getPresentationName();        
>         return name1.compareToIgnoreCase(name2) ;
> Replacing the last line with
>         return name1 != null ? name1.compareToIgnoreCase(name2) : -1;
> fixes the issue.
> See also discussion (especially the latest posting by Peter Kriens) under 
> http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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


[jira] Updated: (FELIX-789) NPE in ResourceComparator if no presentationname given

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-789:
----------------------------------

    Fix Version/s: felix-1.4.0

> NPE in ResourceComparator if no presentationname given
> ------------------------------------------------------
>
>                 Key: FELIX-789
>                 URL: https://issues.apache.org/jira/browse/FELIX-789
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>         Environment: Eclipse Equinox 3.4.0
> org.apache.felix.bundlerepository_1.2.0
>            Reporter: Dirk Mahler
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>
> If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:
>         String name1 = (String) r1.getPresentationName();        
>         String name2 = (String) r2.getPresentationName();        
>         return name1.compareToIgnoreCase(name2) ;
> Replacing the last line with
>         return name1 != null ? name1.compareToIgnoreCase(name2) : -1;
> fixes the issue.
> See also discussion (especially the latest posting by Peter Kriens) under 
> http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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


[jira] Closed: (FELIX-789) NPE in ResourceComparator if no presentationname given

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

Dirk Mahler closed FELIX-789.
-----------------------------


the fix works as expected. thanx ;-)

> NPE in ResourceComparator if no presentationname given
> ------------------------------------------------------
>
>                 Key: FELIX-789
>                 URL: https://issues.apache.org/jira/browse/FELIX-789
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>         Environment: Eclipse Equinox 3.4.0
> org.apache.felix.bundlerepository_1.2.0
>            Reporter: Dirk Mahler
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>
> If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:
>         String name1 = (String) r1.getPresentationName();        
>         String name2 = (String) r2.getPresentationName();        
>         return name1.compareToIgnoreCase(name2) ;
> Replacing the last line with
>         return name1 != null ? name1.compareToIgnoreCase(name2) : -1;
> fixes the issue.
> See also discussion (especially the latest posting by Peter Kriens) under 
> http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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


[jira] Assigned: (FELIX-789) NPE in ResourceComparator if no presentationname given

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall reassigned FELIX-789:
-------------------------------------

    Assignee: Richard S. Hall

> NPE in ResourceComparator if no presentationname given
> ------------------------------------------------------
>
>                 Key: FELIX-789
>                 URL: https://issues.apache.org/jira/browse/FELIX-789
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>         Environment: Eclipse Equinox 3.4.0
> org.apache.felix.bundlerepository_1.2.0
>            Reporter: Dirk Mahler
>            Assignee: Richard S. Hall
>
> If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:
>         String name1 = (String) r1.getPresentationName();        
>         String name2 = (String) r2.getPresentationName();        
>         return name1.compareToIgnoreCase(name2) ;
> Replacing the last line with
>         return name1 != null ? name1.compareToIgnoreCase(name2) : -1;
> fixes the issue.
> See also discussion (especially the latest posting by Peter Kriens) under 
> http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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


[jira] Commented: (FELIX-789) NPE in ResourceComparator if no presentationname given

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12642192#action_12642192 ] 

Richard S. Hall commented on FELIX-789:
---------------------------------------

I am working on OBR right now on a different issue, so I will look into this too.

> NPE in ResourceComparator if no presentationname given
> ------------------------------------------------------
>
>                 Key: FELIX-789
>                 URL: https://issues.apache.org/jira/browse/FELIX-789
>             Project: Felix
>          Issue Type: Bug
>          Components: Bundle Repository (OBR)
>    Affects Versions: bundlerepository-1.2.0
>         Environment: Eclipse Equinox 3.4.0
> org.apache.felix.bundlerepository_1.2.0
>            Reporter: Dirk Mahler
>
> If the OBR repository is created using the latest bindex version available from the OSGi web site there may be resource entries without presentationnames. Processing such an entry results in a NullPointerException in the class org.apache.felix.bundlerepository.ResourceComparator if the variable name1 becomes null:
>         String name1 = (String) r1.getPresentationName();        
>         String name2 = (String) r2.getPresentationName();        
>         return name1.compareToIgnoreCase(name2) ;
> Replacing the last line with
>         return name1 != null ? name1.compareToIgnoreCase(name2) : -1;
> fixes the issue.
> See also discussion (especially the latest posting by Peter Kriens) under 
> http://markmail.org/message/spi5uuceaqhll2t5#query:felix%20obr%20bindex%20nullpointerexception+page:1+mid:spi5uuceaqhll2t5+state:results

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