classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] [FYI]: Patch for javax.print.attribute.standard package


From: Mark Wielaard
Subject: Re: [cp-patches] [FYI]: Patch for javax.print.attribute.standard package
Date: Sun, 01 Jan 2006 15:18:04 +0100

Hi Wolfgang,

On Fri, 2005-12-30 at 14:07 +0100, Wolfgang Baer wrote:
> 2005-12-30  Wolfgang Baer  <address@hidden>
> 
>       * javax/print/attribute/standard/package.html: Added description.
>       * javax/print/attribute/standard/MediaSize.java:
>       Added and updated javadocs to class and methods.
>       (static_initializer): Initialize nested class constants.
>       (MediaSize): Add instances to the cache.
>       (MediaSize): Likewise.
>       (MediaSize): Likewise.
>       (MediaSize): Likewise.
> [...]
> +  private static ArrayList mediaCache;
> +  
> +  static
> +    {
> +      mediaCache = new ArrayList();
> +
> +      MediaSize tmp = MediaSize.ISO.A0;
> +      tmp = MediaSize.JIS.B0;
> +      tmp = MediaSize.Engineering.A;
> +      tmp = MediaSize.NA.LEGAL;
> +      tmp = MediaSize.Other.EXECUTIVE;
> +    }

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.).

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.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]