< prev index next >

## src/java.base/share/classes/java/security/PermissionCollection.java

Print this page

    @@ -1,7 +1,7 @@
      /*
    -  * Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
    +  * Copyright (c) 1997, 2021, 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
       * under the terms of the GNU General Public License version 2 only, as
       * published by the Free Software Foundation.  Oracle designates this

    @@ -97,11 +97,15 @@
      public abstract class PermissionCollection implements java.io.Serializable {

          @java.io.Serial
          private static final long serialVersionUID = -6727011328946861783L;

    -     // when set, add will throw an exception.
    +     /**
    +      * Whether this permission collection is read-only.
    +      * <p>
    +      * If set, the {@code add} method will throw an exception.
    +      */
          private volatile boolean readOnly;

          /**
           * Constructor for subclasses to call.
           */

< prev index next >