Better duplicated resource handling
@@ -25,6 +25,11 @@ public abstract class Resource
return Compiler.addResource(resource, true);
}
+ public static Resource findResource(Resource resource)
+ {
+ return Compiler.findResource(resource);
+ }
+
public abstract int internalHashCode();
public abstract boolean internalEquals(Object obj);
@@ -32,7 +37,8 @@ public abstract class Resource
@Override
public int hashCode()
{
- return internalHashCode() ^ Boolean.valueOf(global).hashCode();
+ return internalHashCode();
+ // return internalHashCode() ^ Boolean.valueOf(global).hashCode();
}
@Override
@@ -42,7 +48,8 @@ public abstract class Resource
{
final Resource res = (Resource) obj;
// fast discard from hash code and global state
- return (hashCode() == res.hashCode()) && (global == res.global) && internalEquals(obj);
+ return (hashCode() == res.hashCode()) && internalEquals(obj);
+ // return (hashCode() == res.hashCode()) && (global == res.global) && internalEquals(obj);
}
return false;
