use generics
diff --git a/rse/plugins/org.eclipse.dltk.rse.core/src/org/eclipse/dltk/core/internal/rse/RSEEnvironmentProvider.java b/rse/plugins/org.eclipse.dltk.rse.core/src/org/eclipse/dltk/core/internal/rse/RSEEnvironmentProvider.java
index 0a49a1a..f52670f 100644
--- a/rse/plugins/org.eclipse.dltk.rse.core/src/org/eclipse/dltk/core/internal/rse/RSEEnvironmentProvider.java
+++ b/rse/plugins/org.eclipse.dltk.rse.core/src/org/eclipse/dltk/core/internal/rse/RSEEnvironmentProvider.java
@@ -139,7 +139,8 @@
 		if (isReady()) {
 			final IHost[] connections = SystemStartHere.getConnections();
 			if (connections != null && connections.length != 0) {
-				final List environments = new ArrayList(connections.length);
+				final List<IEnvironment> environments = new ArrayList<IEnvironment>(
+						connections.length);
 				for (int i = 0; i < connections.length; i++) {
 					final IHost connection = connections[i];
 					if (isSupportedConnection(connection)) {
@@ -149,8 +150,8 @@
 							environments.add(new RSEEnvironment(fs));
 					}
 				}
-				return (IEnvironment[]) environments
-						.toArray(new IEnvironment[environments.size()]);
+				return environments.toArray(new IEnvironment[environments
+						.size()]);
 			}
 		}
 		return new IEnvironment[0];