]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.tests.modelled.ui/src/org/simantics/tests/modelled/ui/Activator.java
Enhancements to modelled STS-tests
[simantics/platform.git] / bundles / org.simantics.tests.modelled.ui / src / org / simantics / tests / modelled / ui / Activator.java
index b3d8fc9d87db3646f204d6c88164909be5c36d14..8cae1510bca8b3b7aa59f4cd959c680f682b199d 100644 (file)
@@ -6,6 +6,7 @@ import java.util.List;
 
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Resource;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
 
@@ -41,8 +42,7 @@ public class Activator extends AbstractUIPlugin {
         */
        public void stop(BundleContext context) throws Exception {
                plugin = null;
-               for (Image image : imagesToDispose)
-                   image.dispose();
+               imagesToDispose.forEach(Resource::dispose);
                super.stop(context);
        }