*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- * described by the edges in the graph.
- *
- * Specically it links together (1) required and provided interfaces of internal component
- * of a container and (2) the providers of externally required interfaces and internal required
- * interfaces.
+ * described by the edges in the graph. Specically it links together (1)
+ * required and provided interfaces of internal component of a container and (2)
+ * the providers of externally required interfaces and internal required
+ * interfaces.
if (from instanceof RequiredInterfaceNode) {
RequiredInterfaceNode required = (RequiredInterfaceNode) from;
if (from instanceof RequiredInterfaceNode) {
RequiredInterfaceNode required = (RequiredInterfaceNode) from;
ProvidedInterfaceNode provided = (ProvidedInterfaceNode) to;
required.getRequired().setProvider(provided.getProvided());
ProvidedInterfaceNode provided = (ProvidedInterfaceNode) to;
required.getRequired().setProvider(provided.getProvided());
} else if (to instanceof ExternalRequiredInterfaceNode) {
ExternalRequiredInterfaceNode external = (ExternalRequiredInterfaceNode) to;
ProvidedInterface provider = external.getRequired()
} else if (to instanceof ExternalRequiredInterfaceNode) {
ExternalRequiredInterfaceNode external = (ExternalRequiredInterfaceNode) to;
ProvidedInterface provider = external.getRequired()
- .getProvider();
- if (provider == null && !required.getRequired().isOptional()) {
- throw new SystemAssemblyException("Mandatory interface '"
- + from + "' is not provided.");
+ .getProvider();
+
+ if ((provider == null) && !required.getRequired().isOptional()) {
+ throw new SystemAssemblyException("Mandatory interface '" +
+ from + "' is not provided.");