Lyderic Landry wrote:
>In my case, /com/example is actually removed from $HOME/Library/
>Preferences/com.apple.java.util.prefs.plist in the case there is no other
>subnodes from this domain. That is to say that the whole tree corresponding
>to the domain is removed, not only the ultimate node.
I don't see this behavior at all.
The com/example node remains after I delete its child node. I used
PrefsDelete exactly as posted. Run on Java 1.5.0_06-112, OS 10.4.7, ppc
arch. I get the same results when I change to Java 1.4.2 and/or the i386
arch.
>I think this is the desired behaviour.
It may be YOUR desired behavior, but it appears to conflict with the
specified behavior described in the Preferences API. It also isn't
repeatable on any of my Mac configurations.
Please post details of your configuration, and file a bug-report.
>I suppose the Windows behaviour explains why everyone complains the
>registry becomes bloated after a while on this platform.
It explains the complaint, but it doesn't justify the bloat.
There is no good reason why removing a Java program should leave all its
prefs behind. Nor is there a good reason why a program that removes itself
can't remove its own prefs sub-tree. The WHOLE sub-tree, not just some
keys.
At worst, a common node like "/com" will live a long time because it has
many children. However, if com.YourDomain.YourApp isn't removing the
YourApp node and a potentially empty YourDomain node, the blame lies with
the developer, not with the Preferences API. There is more than enough
capability in the Preferences API to ascend the prefs-tree removing
deadwood nodes, keeping the registry as clean as possible.
Maybe I should bundle and sell an improved version of PrefsDelete that
trims these unsightly excesses. As a product name, I'm considering
NoseHairTrimmer... or maybe not.
-- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden