FELIX-5112 ClassCastException when deploying an OBR Resource already present in the runtime Cleaned up code Committed on behalf of @skahmann with many thanks. Contributed via https://github.com/apache/felix/pull/44