src/java.base/share/classes/java/nio/file/LinkPermission.java
changeset 57956 e0b8b019d2f5
parent 53018 8bf9268df0e2
equal deleted inserted replaced
57955:18863bf3501f 57956:e0b8b019d2f5
     1 /*
     1 /*
     2  * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2007, 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
    65  *
    65  *
    66  * @see Files#createLink
    66  * @see Files#createLink
    67  * @see Files#createSymbolicLink
    67  * @see Files#createSymbolicLink
    68  */
    68  */
    69 public final class LinkPermission extends BasicPermission {
    69 public final class LinkPermission extends BasicPermission {
       
    70     @java.io.Serial
    70     static final long serialVersionUID = -1441492453772213220L;
    71     static final long serialVersionUID = -1441492453772213220L;
    71 
    72 
    72     private void checkName(String name) {
    73     private void checkName(String name) {
    73         if (!name.equals("hard") && !name.equals("symbolic")) {
    74         if (!name.equals("hard") && !name.equals("symbolic")) {
    74             throw new IllegalArgumentException("name: " + name);
    75             throw new IllegalArgumentException("name: " + name);