}
@Override
- public void init(ExtendedBlueprintContainer container) {
- this.container = container;
+ public void init(ExtendedBlueprintContainer newContainer) {
+ this.container = newContainer;
LOG.debug("{}: In init", logName());
}
+ @SuppressWarnings("checkstyle:IllegalCatch")
@Override
public Object create() throws ComponentDefinitionException {
RpcProviderRegistry rpcRegistry = (RpcProviderRegistry) container.getComponentInstance(
Object implementation = container.getComponentInstance(implementationRefId);
try {
- if(!RpcService.class.isAssignableFrom(implementation.getClass())) {
+ if (!RpcService.class.isAssignableFrom(implementation.getClass())) {
throw new ComponentDefinitionException(String.format(
"Implementation \"ref\" instance %s for \"%s\" is not an RpcService",
implementation.getClass(), ROUTED_RPC_IMPLEMENTATION));
interfaceName, implementation.getClass(), container.getBundleContext().getBundle(),
ROUTED_RPC_IMPLEMENTATION);
- if(rpcInterfaces.size() > 1) {
+ if (rpcInterfaces.size() > 1) {
throw new ComponentDefinitionException(String.format(
- "Implementation \"ref\" instance %s for \"%s\" implements more than one RpcService " +
- "interface (%s). Please specify the exact \"interface\"", implementation.getClass(),
+ "Implementation \"ref\" instance %s for \"%s\" implements more than one RpcService "
+ + "interface (%s). Please specify the exact \"interface\"", implementation.getClass(),
ROUTED_RPC_IMPLEMENTATION, rpcInterfaces));
}
implementation, rpcInterface);
return rpcRegistry.addRoutedRpcImplementation(rpcInterface, (RpcService)implementation);
- } catch(ComponentDefinitionException e) {
+ } catch (ComponentDefinitionException e) {
throw e;
- } catch(Exception e) {
+ } catch (Exception e) {
throw new ComponentDefinitionException(String.format(
"Error processing \"%s\" for %s", ROUTED_RPC_IMPLEMENTATION, implementation.getClass()), e);
}
}
private String logName() {
- return (container != null ? container.getBundleContext().getBundle().getSymbolicName() : "") +
- " (" + id + ")";
+ return (container != null ? container.getBundleContext().getBundle().getSymbolicName() : "") + " (" + id + ")";
}
}