[rfc][icedtea-web]: Update cache viewer to display information properly
Deepak Bhole
dbhole at redhat.com
Wed Apr 20 11:58:39 PDT 2011
* Andrew Su <asu at redhat.com> [2011-04-20 14:54]:
> Hi,
>
> With the recent change to the cache directory, this patch will make itw-setting's cache viewer display the cache information properly.
>
> ChangeLog:
> 2011-04-20 Andrew Su <asu at redhat.com>
>
> * netx/net/sourceforge/jnlp/controlpanel/CachePane.java:
> (generateData): Skip through the identifier for cached item.
>
Looks fairly straightforward. OK for head.
Cheers,
Deepak
> Cheers,
> Andrew
> diff -r f0cccaba8060 netx/net/sourceforge/jnlp/controlpanel/CachePane.java
> --- a/netx/net/sourceforge/jnlp/controlpanel/CachePane.java Wed Apr 20 14:35:13 2011 -0400
> +++ b/netx/net/sourceforge/jnlp/controlpanel/CachePane.java Wed Apr 20 14:42:57 2011 -0400
> @@ -235,16 +235,18 @@
> CacheDirectory.getDirStructure(root);
> ArrayList<Object[]> data = new ArrayList<Object[]>();
>
> - for (DirectoryNode type : root.getChildren()) {
> - for (DirectoryNode domain : type.getChildren()) {
> - for (DirectoryNode leaf : CacheDirectory.getLeafData(domain)) {
> - Object[] o = { leaf,
> - leaf.getFile().getAbsolutePath(),
> - type,
> - domain,
> - leaf.getFile().length(),
> - new SimpleDateFormat("MM/dd/yyyy").format(leaf.getFile().lastModified()) };
> - data.add(o);
> + for (DirectoryNode identifier : root.getChildren()) {
> + for (DirectoryNode type : identifier.getChildren()) {
> + for (DirectoryNode domain : type.getChildren()) {
> + for (DirectoryNode leaf : CacheDirectory.getLeafData(domain)) {
> + Object[] o = { leaf,
> + leaf.getFile().getAbsolutePath(),
> + type,
> + domain,
> + leaf.getFile().length(),
> + new SimpleDateFormat("MM/dd/yyyy").format(leaf.getFile().lastModified()) };
> + data.add(o);
> + }
> }
> }
> }
More information about the distro-pkg-dev
mailing list