equal
deleted
inserted
replaced
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 = |