src/java.base/share/classes/java/net/NetPermission.java
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 54158 5e1480a38a43
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, 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
   143  *   could access security sensitive information, or create false
   143  *   could access security sensitive information, or create false
   144  *   entries in the response cache.</td>
   144  *   entries in the response cache.</td>
   145  *   </tr>
   145  *   </tr>
   146  *
   146  *
   147  * <tr>
   147  * <tr>
       
   148  *   <th scope="row">setSocketImpl</th>
       
   149  *   <td>The ability to create a sub-class of Socket or ServerSocket with a
       
   150  *   user specified SocketImpl.</td>
       
   151  *   <td>Malicious user-defined SocketImpls can change the behavior of
       
   152  *   Socket and ServerSocket in surprising ways, by virtue of their
       
   153  *   ability to access the protected fields of SocketImpl.</td>
       
   154  *   </tr>
       
   155  *
       
   156  * <tr>
   148  *   <th scope="row">specifyStreamHandler</th>
   157  *   <th scope="row">specifyStreamHandler</th>
   149  *   <td>The ability
   158  *   <td>The ability
   150  *   to specify a stream handler when constructing a URL</td>
   159  *   to specify a stream handler when constructing a URL</td>
   151  *   <td>Malicious code may create a URL with resources that it would
   160  *   <td>Malicious code may create a URL with resources that it would
   152  *   normally not have access to (like file:/foo/fum/), specifying a
   161  *   normally not have access to (like file:/foo/fum/), specifying a
   173  * @author Roland Schemers
   182  * @author Roland Schemers
   174  * @since 1.2
   183  * @since 1.2
   175  */
   184  */
   176 
   185 
   177 public final class NetPermission extends BasicPermission {
   186 public final class NetPermission extends BasicPermission {
       
   187     @java.io.Serial
   178     private static final long serialVersionUID = -8343910153355041693L;
   188     private static final long serialVersionUID = -8343910153355041693L;
   179 
   189 
   180     /**
   190     /**
   181      * Creates a new NetPermission with the specified name.
   191      * Creates a new NetPermission with the specified name.
   182      * The name is the symbolic name of the NetPermission, such as
   192      * The name is the symbolic name of the NetPermission, such as