When registering a class under an interface that is not directly implemented by the class but indirectly by implementing an interface that extends the former interface, registration fails.
Example:
interface IParent
interface IChild extends IParent
class MyClass implements IChild
Registering an instance of MyClass under the interface IParent then fails with an IllegalArgumentException that the "service MyClass does not implement interfaces [IParent]".
The problem lies in ServiceReferenceImpl.checkService(...), which does go up the class hierarchy to check whether parent classes implement the registration interfaces but which does not go up the hierarchy of every implemented interface to check whether those implement the registration interfaces.
Futhermore, the test also fails when registering a class under the class it extends.
Example:
class AbstractClass
class ConcreteClass extends AbstractClass
Registering an instance of ConcreteClass under the interface AbstractClass fails with an IllegalArgumentException that the "service ConcreteClass does not implemente interfaces []".
After having a look into the (r3) specs I recommend implementing an instanceof loop over all interfaces as the specs recommend (pg. 106, step 1).
Also, in my opinion this is likely to be faster and easier than manually traversing class and interface hierarchies represented as Java object structures and comparing their names.