src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java
branchJDK-8145252-TLS13-branch
changeset 56542 56aaa6cb3693
parent 47216 71c04702a3d5
child 56713 a02692615745
equal deleted inserted replaced
56541:92cbbfc996f3 56542:56aaa6cb3693
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    22  * or visit www.oracle.com if you need additional information or have any
    22  * or visit www.oracle.com if you need additional information or have any
    23  * questions.
    23  * questions.
    24  */
    24  */
    25 
    25 
    26 
       
    27 package sun.security.ssl;
    26 package sun.security.ssl;
    28 
    27 
    29 import java.util.Enumeration;
    28 import java.util.Enumeration;
       
    29 import java.util.Locale;
    30 import java.util.Vector;
    30 import java.util.Vector;
    31 import java.util.Locale;
       
    32 
       
    33 import javax.net.ssl.SSLSession;
    31 import javax.net.ssl.SSLSession;
    34 import javax.net.ssl.SSLSessionContext;
    32 import javax.net.ssl.SSLSessionContext;
    35 
       
    36 import sun.security.util.Cache;
    33 import sun.security.util.Cache;
    37 
    34 
    38 
    35 
    39 final class SSLSessionContextImpl implements SSLSessionContext {
    36 final class SSLSessionContextImpl implements SSLSessionContext {
    40     private Cache<SessionId, SSLSessionImpl> sessionCache;
    37     private Cache<SessionId, SSLSessionImpl> sessionCache;
   248         public Enumeration<byte[]> getSessionIds() {
   245         public Enumeration<byte[]> getSessionIds() {
   249             return  ids != null ? ids.elements() :
   246             return  ids != null ? ids.elements() :
   250                                   new Vector<byte[]>().elements();
   247                                   new Vector<byte[]>().elements();
   251         }
   248         }
   252     }
   249     }
   253 
       
   254 }
   250 }