X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fblueprint%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fblueprint%2Fext%2FRoutedRpcRegistrationConverter.java;fp=opendaylight%2Fblueprint%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fblueprint%2Fext%2FRoutedRpcRegistrationConverter.java;h=0000000000000000000000000000000000000000;hp=66174438b23a89fc670aa464f1fc67eb5e7fd734;hb=2611e6a728e586ea34dd891f30a473bf54d6cbd8;hpb=aaea3e9a92ae9d6fac04c4a065db4b35cbca9ed0 diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RoutedRpcRegistrationConverter.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RoutedRpcRegistrationConverter.java deleted file mode 100644 index 66174438b2..0000000000 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/RoutedRpcRegistrationConverter.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2016 Brocade Communications Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.blueprint.ext; - -import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration; -import org.osgi.service.blueprint.container.Converter; -import org.osgi.service.blueprint.container.ReifiedType; - -/** - * Implements a Converter that converts RoutedRpcRegistration instances. This is to work around an issue - * when injecting a RoutedRpcRegistration instance into a bean where Aries is not able to convert the instance - * returned from the RpcRegistryProvider to the desired generic RoutedRpcRegistration type specified in the - * bean's setter method. This is because the actual instance class specifies a generic type variable T and, - * even though it extends RpcService and should match, Aries doesn't handle it correctly. - * - * @author Thomas Pantelis - */ -public class RoutedRpcRegistrationConverter implements Converter { - @Override - public boolean canConvert(final Object sourceObject, final ReifiedType targetType) { - return sourceObject instanceof RoutedRpcRegistration - && RoutedRpcRegistration.class.isAssignableFrom(targetType.getRawClass()); - } - - @Override - public Object convert(final Object sourceObject, final ReifiedType targetType) { - return sourceObject; - } -}