jdk/src/share/classes/sun/misc/URLClassPath.java
changeset 3073 5e93bd389012
parent 1940 e81514210873
child 3436 c7d276696c5b
equal deleted inserted replaced
3070:0175bbf9a833 3073:5e93bd389012
   133      * file URLs from which to load classes and resources.
   133      * file URLs from which to load classes and resources.
   134      * <p>
   134      * <p>
   135      * If the URL specified is null or is already in the list of
   135      * If the URL specified is null or is already in the list of
   136      * URLs, then invoking this method has no effect.
   136      * URLs, then invoking this method has no effect.
   137      */
   137      */
   138     public void addURL(URL url) {
   138     public synchronized void addURL(URL url) {
       
   139         if (closed)
       
   140             return;
   139         synchronized (urls) {
   141         synchronized (urls) {
   140             if (url == null || path.contains(url))
   142             if (url == null || path.contains(url))
   141                 return;
   143                 return;
   142 
   144 
   143             urls.add(0, url);
   145             urls.add(0, url);