* lazy file handle merged
diff --git a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/LazyFileHandle.java b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/LazyFileHandle.java
index 62809c2..1213bbe 100644
--- a/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/LazyFileHandle.java
+++ b/core/plugins/org.eclipse.dltk.launching/src/org/eclipse/dltk/internal/launching/LazyFileHandle.java
@@ -209,20 +209,22 @@
public boolean equals(Object obj) {
if (this == obj)
return true;
- if (obj == null)
+ if (obj == null || !(obj instanceof IFileHandle))
return false;
- if (getClass() != obj.getClass())
- return false;
- LazyFileHandle other = (LazyFileHandle) obj;
+ IFileHandle other = (IFileHandle) obj;
if (environment == null) {
- if (other.environment != null)
+ if (other.getEnvironment() != null)
return false;
- } else if (!environment.equals(other.environment))
+ } else {
+ final IEnvironment otherEnvironment = other.getEnvironment();
+ if (otherEnvironment == null
+ || !environment.equals(otherEnvironment.getId()))
return false;
+ }
if (path == null) {
- if (other.path != null)
+ if (other.getPath() != null)
return false;
- } else if (!path.equals(other.path))
+ } else if (!path.equals(other.getPath()))
return false;
return true;
}