private static boolean isSecure ( String protocol ) throws BugError { if ( HTTP . equalsIgnoreCase ( protocol ) ) { return false ; } else if ( HTTPS . equalsIgnoreCase ( protocol ) ) { return true ; } else { throw new BugError ( "Unsupported protocol |%s| for HTTP transaction." , protocol ) ; } }
Predicate to test if given protocol is secure .