#61 Resources duplicated in entry.xml

closed-fixed
caching (5)
8
2002-05-12
2002-05-11
Kevin Herrboldt
No

Resources are being duplicated in entry.xml files. This seems to be caused by Reference being used as a HashMap key but the Reference class doesn't implement hashCode().

Discussion

    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=6750

    org.nanode.launcher.Version changed to always have a version-id. If no version-id supplied, Version.EMPTY_VERSION is used. Also added hashCode() method.

    Added hashCode() to org.nanode.launcher.Reference, also improved the equals() method.

    But to really fix this bug, the FileCacheEntry resources map has changed from a map of (Reference, CachedResource) to a map of (URL, CachedResource). This is because the CachedResource contains the Reference, and the Reference can change based on what's in the JNLP file, but the URL to a resource is immutable (if the URL changes, it's considered a different resource).