--- old/src/java.base/share/classes/sun/security/ssl/ProtocolList.java Fri May 29 00:48:08 2015 +++ new/src/java.base/share/classes/sun/security/ssl/ProtocolList.java Fri May 29 00:48:07 2015 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -124,8 +124,9 @@ ProtocolVersion selectProtocolVersion(ProtocolVersion protocolVersion) { ProtocolVersion selectedVersion = null; for (ProtocolVersion pv : protocols) { - if (pv.v > protocolVersion.v) { - break; // Safe to break here as this.protocols is sorted + if (pv.compareTo(protocolVersion) > 0) { + break; // Safe to break here as this.protocols is sorted, + // and DTLS and SSL/TLS protocols are not mixed. } selectedVersion = pv; }