Hi Wolfgang, On Fri, 2006-01-13 at 23:44 +0100, Wolfgang Baer wrote: > > It took me a while to realize what was going on here. I think a comment > > is in place (and how do you guarantee that all the other inner classes > > are registered? Like MediaSize.ISO.A4 for example.). > > All the static instances in the inner container classes like ISO or > OTHER should be automatically added as they are static. Or do I miss > something ? At least every instance is added as far as I can see. > > Evrything I do here is to call one instance of every container class > so it gets loaded and everyone of its static MediaSize objects are > instantiated. Should I put a comment here ?
Please do. I see now how initializing one static field makes sure all static fields are initialized, but since I had to ask it wasn't immediately obvious (at least to me). > > Are you sure that every newly created MediaSize object should > > automagically be added to the mediaCache and not just the standard > > MediaSizes? I see there is no other method to register a new "standard" > > MediaSize, but adding it through the public constructor seems asking for > > confusion. > > The just commited mauve test "userClass" shows that user constructed > MediaSize subclass instances are added to the cache used by findMedia > and the other static methods. So I am think I am right here. I still think this is kind of strange. It means any user can "register" new MediaSizes even by accident. Please also add a good comment about this to the MediaSize constructor. Thanks, Mark
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches