Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

TMS-29: Code clean up after merge.

  • Loading branch information...
commit 14e12eb2c192ab15dfc043c6f75bb9f27689af48 1 parent 0ded2f2
@haraldk haraldk authored
15 servlet/src/main/java/com/twelvemonkeys/servlet/image/
@@ -28,15 +28,14 @@
package com.twelvemonkeys.servlet.image;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
import javax.imageio.ImageIO;
import javax.imageio.spi.IIORegistry;
import javax.imageio.spi.ServiceRegistry;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
* Takes care of registering and de-registering local ImageIO plugins (service providers) for the servlet context.
@@ -69,13 +68,13 @@ public void contextDestroyed(final ServletContextEvent event) {
Class<?> category =;
Iterator<?> providers = registry.getServiceProviders(category, localFilter, false);
- // Copy the providers, deregistering while iterating over providers can lead to ConcurrentModificationExceptions.
- List<Object> providerObjects = new ArrayList<Object>();
+ // Copy the providers, as de-registering while iterating over providers will lead to ConcurrentModificationExceptions.
+ List<Object> providersCopy = new ArrayList<Object>();
while (providers.hasNext()) {
- providerObjects.add(;
+ providersCopy.add(;
- for (Object provider : providerObjects) {
+ for (Object provider : providersCopy) {
event.getServletContext().log(String.format("Unregistered locally installed provider class: %s", provider.getClass()));
Please sign in to comment.
Something went wrong with that request. Please try again.