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

[jira] Created: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

Current implementation of ServiceRegistration.getReference() does not follow the spec
-------------------------------------------------------------------------------------

                 Key: FELIX-798
                 URL: https://issues.apache.org/jira/browse/FELIX-798
             Project: Felix
          Issue Type: Bug
          Components: Framework
    Affects Versions: felix-1.2.2
            Reporter: Stuart McCulloch
             Fix For: felix-1.4.0


According to the javadoc for getReference() it should throw an exception if the service is unregistered:

  java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.

see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()

However, the current ServiceRegistration implementation in Felix continues to return a valid reference
even after the service is unregistered (discovered this when working on service examples for the book)

I'll attach a patch for review.

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


[jira] Closed: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

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

Stuart McCulloch closed FELIX-798.
----------------------------------


Hi Richard - I've tested the new code and it works perfectly, thanks!

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Specification compliance
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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


[jira] Commented: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

Posted by "Stuart McCulloch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644262#action_12644262 ] 

Stuart McCulloch commented on FELIX-798:
----------------------------------------

FYI, the spec also mentions throwing an IllegalArgumentException when setting properties that have duplicate keys with different cases, but I can't tell where this is checked in the current implementation...

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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


[jira] Updated: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

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

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

    Component/s: Specification compliance

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Specification compliance
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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


[jira] Updated: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

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

Stuart McCulloch updated FELIX-798:
-----------------------------------

    Attachment: FELIX-798.txt

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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


[jira] Resolved: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

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

Richard S. Hall resolved FELIX-798.
-----------------------------------

    Resolution: Fixed

Stuart, I have applied your patch and fixed the other issue you raised. Please close this bug if you are satisfied. Thanks.

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework, Specification compliance
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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


[jira] Assigned: (FELIX-798) Current implementation of ServiceRegistration.getReference() does not follow the spec

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

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

    Assignee: Richard S. Hall

> Current implementation of ServiceRegistration.getReference() does not follow the spec
> -------------------------------------------------------------------------------------
>
>                 Key: FELIX-798
>                 URL: https://issues.apache.org/jira/browse/FELIX-798
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.2.2
>            Reporter: Stuart McCulloch
>            Assignee: Richard S. Hall
>             Fix For: felix-1.4.0
>
>         Attachments: FELIX-798.txt
>
>
> According to the javadoc for getReference() it should throw an exception if the service is unregistered:
>   java.lang.IllegalStateException - If this ServiceRegistration object has already been unregistered.
> see http://www.osgi.org/javadoc/r4v41/org/osgi/framework/ServiceRegistration.html#getReference()
> However, the current ServiceRegistration implementation in Felix continues to return a valid reference
> even after the service is unregistered (discovered this when working on service examples for the book)
> I'll attach a patch for review.

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