cas/src/main/java/org/springframework/security/cas/web/authentication/DefaultServiceAuthenticationDetails.java
private static int getServicePort(URL casServiceUrl) {
		int port = casServiceUrl.getPort();
		if (port == -1) {
			port = casServiceUrl.getDefaultPort();
		}
		return port;
	}
private static int getServicePort(URL casServiceUrl) {
		int port = casServiceUrl.getPort();
		if (port == -1) {
			port = casServiceUrl.getDefaultPort();
		}
		return port;
	}
private static int getServicePort ( URL casServiceUrl ) { int port = casServiceUrl . getPort ( ) ; if ( port == - 1 ) { port = casServiceUrl . getDefaultPort ( ) ; } return port ; }
Gets the port from the casServiceURL ensuring to return the proper value if the
default port is being used.
@param casServiceUrl the casServerUrl to be used (i.e.
"https://example.com/context/login/cas")
@return the port that is configured for the casServerUrl
Gets the port from the casServiceURL ensuring to return the proper value if the default port is being used .