[jira] [Created] (ARIES-1943) TopologyManagerImport assumes all referenced ImportRegistrations are not closed

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (ARIES-1943) TopologyManagerImport assumes all referenced ImportRegistrations are not closed

ASF subversion and git services (Jira)
Arnoud Glimmerveen created ARIES-1943:
-----------------------------------------

             Summary: TopologyManagerImport assumes all referenced ImportRegistrations are not closed
                 Key: ARIES-1943
                 URL: https://issues.apache.org/jira/browse/ARIES-1943
             Project: Aries
          Issue Type: Bug
          Components: Remote Service Admin
    Affects Versions: rsa-1.14.0
            Reporter: Arnoud Glimmerveen


When an ImportRegistration is closed, all other methods must return null. Obtaining for instance the ImportReference after close is therefor not possible and the associated getter is expected to return null.

The current importer logic appears to assume that at least the ImportReference can always be obtained. This holds true when assuming that only a single thread performs the import task, however de current implementation uses up to 10 Threads. In that case whilst one Thread is busy closing an ImportRegistration, another may already have the reference to it and without the check for null will run into a NPE.

Note that apparently the Apache Aries RSA implementation does not have ImportRegistration.getImportReference() return null after close, which is I guess the reason why this has gone unnoticed. Looking at the [spec|https://osgi.org/specification/osgi.cmpn/7.0.0/service.remoteserviceadmin.html#org.osgi.service.remoteserviceadmin.ImportRegistration] this in itself should also be considered a bug.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)