[icedtea-web] RFC: move TimedHashMap to netx
Omair Majid
omajid at redhat.com
Mon Feb 14 13:33:29 PST 2011
Hi,
The attached patch moves TimeHashMap from
plugin/icedteanp/java/sun/applet/PluginProxySelector.java to
netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other
ProxySelectors can also use it. My patch for adding proxy auto config
support will be using this new class.
Other than the movement, there are a few minor changes to it:
- It no longer extends HashMap. TimedHashMap did not override all the
HashMap methods and it was possible to see inconsistent data. By
reducing the interface, this should not be a problem any more (the
plugin code still compiles fine).
- The use of Date has been replaced by System.nanoTime(). This should
give us a more monotonic clock and be less susceptible to clock
changes (especially to moving the clock backwards).
Any thoughts or concerns?
ChangeLog:
2011-02-14 Omair Majid <omajid at redhat.com>
* plugin/icedteanp/java/sun/applet/PluginProxySelector.java:
Move TimedHashMap to its own class.
* netx/net/sourceforge/jnlp/util/TimedHashMap.java: New class.
Moved from sun.applet.PluginProxySelector. Do not subclass HashMap.
Use System.nanoTime() instead of Date.getTime().
Cheers,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timedhashmap-01.patch
Type: text/x-patch
Size: 6487 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110214/e36a1523/timedhashmap-01.patch
More information about the distro-pkg-dev
mailing list