jdk/src/java.base/share/classes/java/net/ResponseCache.java
changeset 32649 2ee9017c7597
parent 25859 3317bb8137f4
equal deleted inserted replaced
32648:1fa861caf840 32649:2ee9017c7597
    78      *
    78      *
    79      * @see #setDefault(ResponseCache)
    79      * @see #setDefault(ResponseCache)
    80      * @return the system-wide {@code ResponseCache}
    80      * @return the system-wide {@code ResponseCache}
    81      * @since 1.5
    81      * @since 1.5
    82      */
    82      */
    83     public synchronized  static ResponseCache getDefault() {
    83     public static synchronized ResponseCache getDefault() {
    84         SecurityManager sm = System.getSecurityManager();
    84         SecurityManager sm = System.getSecurityManager();
    85         if (sm != null) {
    85         if (sm != null) {
    86             sm.checkPermission(SecurityConstants.GET_RESPONSECACHE_PERMISSION);
    86             sm.checkPermission(SecurityConstants.GET_RESPONSECACHE_PERMISSION);
    87         }
    87         }
    88         return theResponseCache;
    88         return theResponseCache;
   101      * {@link NetPermission}{@code ("setResponseCache")}
   101      * {@link NetPermission}{@code ("setResponseCache")}
   102      *
   102      *
   103      * @see #getDefault()
   103      * @see #getDefault()
   104      * @since 1.5
   104      * @since 1.5
   105      */
   105      */
   106     public synchronized static void setDefault(ResponseCache responseCache) {
   106     public static synchronized void setDefault(ResponseCache responseCache) {
   107         SecurityManager sm = System.getSecurityManager();
   107         SecurityManager sm = System.getSecurityManager();
   108         if (sm != null) {
   108         if (sm != null) {
   109             sm.checkPermission(SecurityConstants.SET_RESPONSECACHE_PERMISSION);
   109             sm.checkPermission(SecurityConstants.SET_RESPONSECACHE_PERMISSION);
   110         }
   110         }
   111         theResponseCache = responseCache;
   111         theResponseCache = responseCache;