jdk/src/share/classes/com/sun/media/sound/JSSecurityManager.java
changeset 23889 c8412b2715b5
parent 20468 4424783ed2ce
child 26030 576ffa819e23
equal deleted inserted replaced
23888:89df6a57f25f 23889:c8412b2715b5
   183             thread.start();
   183             thread.start();
   184         }
   184         }
   185         return thread;
   185         return thread;
   186     }
   186     }
   187 
   187 
   188     static <T> List<T> getProviders(final Class<T> providerClass) {
   188     static synchronized <T> List<T> getProviders(final Class<T> providerClass) {
   189         List<T> p = new ArrayList<>();
   189         List<T> p = new ArrayList<>(7);
   190         // ServiceLoader creates "lazy" iterator instance, but it ensures that
   190         // ServiceLoader creates "lazy" iterator instance, but it ensures that
   191         // next/hasNext run with permissions that are restricted by whatever
   191         // next/hasNext run with permissions that are restricted by whatever
   192         // creates the ServiceLoader instance, so it requires to be called from
   192         // creates the ServiceLoader instance, so it requires to be called from
   193         // privileged section
   193         // privileged section
   194         final PrivilegedAction<Iterator<T>> psAction =
   194         final PrivilegedAction<Iterator<T>> psAction =