core/src/main/java/io/fabric8/maven/core/util/kubernetes/ServiceUrlUtil.java
private static boolean portsMatch(ServicePort servicePort, IntOrString intOrString) {
        if (intOrString != null) {
            Integer port = servicePort.getPort();
            Integer intVal = intOrString.getIntVal();
            String strVal = intOrString.getStrVal();
            if (intVal != null) {
                if (port != null) {
                    return port.intValue() == intVal.intValue();
                } else {
                    /// should we find the port by name now?
                }
            } else if (strVal != null ){
                return Objects.equal(strVal, servicePort.getName());
            }
        }
        return false;
    }
private static boolean portsMatch(ServicePort servicePort, IntOrString intOrString) {
        if (intOrString != null) {
            Integer port = servicePort.getPort();
            Integer intVal = intOrString.getIntVal();
            String strVal = intOrString.getStrVal();
            if (intVal != null) {
                if (port != null) {
                    return port.intValue() == intVal.intValue();
                } else {
                    /// should we find the port by name now?
                }
            } else if (strVal != null ){
                return Objects.equal(strVal, servicePort.getName());
            }
        }
        return false;
    }
private static boolean portsMatch ( ServicePort servicePort , IntOrString intOrString ) { if ( intOrString != null ) { Integer port = servicePort . getPort ( ) ; Integer intVal = intOrString . getIntVal ( ) ; String strVal = intOrString . getStrVal ( ) ; if ( intVal != null ) { if ( port != null ) { return port . intValue ( ) == intVal . intValue ( ) ; } else { /// should we find the port by name now? } } else if ( strVal != null ) { return Objects . equal ( strVal , servicePort . getName ( ) ) ; } } return false ; }
Returns true if the given servicePort matches the intOrString value
Returns true if the given servicePort matches the intOrString value