src-java/flowhs-topology/flowhs-storm-topology/src/main/java/org/openkilda/wfm/topology/flowhs/validation/FlowValidator.java
/**
     * Check for equals endpoints.
     *
     * @param firstFlow a first flow.
     * @param secondFlow a second flow.
     */
Check for equals endpoints.
@param firstFlow a first flow.
@param secondFlow a second flow.
Check for equals endpoints . @param firstFlow a first flow . @param secondFlow a second flow .
@VisibleForTesting
    void checkForEqualsEndpoints(RequestedFlow firstFlow, RequestedFlow secondFlow) throws InvalidFlowException {
        String message = "New requested endpoint for '%s' conflicts with existing endpoint for '%s'";
        Set<FlowEndpoint> firstFlowEndpoints = validateFlowEqualsEndpoints(firstFlow, message);
        Set<FlowEndpoint> secondFlowEndpoints = validateFlowEqualsEndpoints(secondFlow, message);
        for (FlowEndpoint endpoint : secondFlowEndpoints) {
            if (firstFlowEndpoints.contains(endpoint)) {
                message = String.format(message, secondFlow.getFlowId(), firstFlow.getFlowId());
                throw new InvalidFlowException(message, ErrorType.DATA_INVALID);
            }
        }
    }
@ VisibleForTesting void checkForEqualsEndpoints ( RequestedFlow firstFlow , RequestedFlow secondFlow ) throws InvalidFlowException { String message = "New requested endpoint for '%s' conflicts with existing endpoint for '%s'" ; Set < FlowEndpoint > firstFlowEndpoints = validateFlowEqualsEndpoints ( firstFlow , message ) ; Set < FlowEndpoint > secondFlowEndpoints = validateFlowEqualsEndpoints ( secondFlow , message ) ; for ( FlowEndpoint endpoint : secondFlowEndpoints ) { if ( firstFlowEndpoints . contains ( endpoint ) ) { message = String . format ( message , secondFlow . getFlowId ( ) , firstFlow . getFlowId ( ) ) ; throw new InvalidFlowException ( message , ErrorType . DATA_INVALID ) ; } } }
Check for equals endpoints.
Check for equals endpoints .