if (obj instanceof ResourceCoordinate) { ResourceCoordinate<T, K, S> resourceCoordinate = (ResourceCoordinate<T, K, S>) obj; if (!SharedResourcesBrokerUtils.isScopeTypeAncestor((ScopeType) currentScope.getType(), ((ResourceCoordinate) obj).getScope())) { throw new RuntimeException(String .format("%s returned an invalid coordinate: scope %s is not an ancestor of %s.", currentFactory.getName(), ((ResourceCoordinate) obj).getScope(), currentScope.getType())); broker.getWrappedScope(resourceCoordinate.getScope()), broker); } catch (NoSuchScopeException nsse) { throw new RuntimeException(String .format("%s returned an invalid coordinate: scope %s is not available.", factory.getName(), resourceCoordinate.getScope().name()), nsse);
if (obj instanceof ResourceCoordinate) { ResourceCoordinate<T, K, S> resourceCoordinate = (ResourceCoordinate<T, K, S>) obj; if (!SharedResourcesBrokerUtils.isScopeTypeAncestor((ScopeType) currentScope.getType(), ((ResourceCoordinate) obj).getScope())) { throw new RuntimeException(String .format("%s returned an invalid coordinate: scope %s is not an ancestor of %s.", currentFactory.getName(), ((ResourceCoordinate) obj).getScope(), currentScope.getType())); broker.getWrappedScope(resourceCoordinate.getScope()), broker); } catch (NoSuchScopeException nsse) { throw new RuntimeException(String .format("%s returned an invalid coordinate: scope %s is not available.", factory.getName(), resourceCoordinate.getScope().name()), nsse);