classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] FYI: ResolutionSyntax.toString fixlet


From: Wolfgang Baer
Subject: [cp-patches] FYI: ResolutionSyntax.toString fixlet
Date: Sat, 19 Nov 2005 16:55:33 +0100
User-agent: Debian Thunderbird 1.0.7 (X11/20051017)

Hi,

a small fixlet for ResolutionSyntax.toString. This is backed by a
mauve test addition checked in earlier.

2005-11-19  Wolfgang Baer  <address@hidden>

        * javax/print/attribute/ResolutionSyntax.java (toString):
        Changed to not append the unitsName if null. Clarified api docs.

Regards,
Wolfgang

Index: javax/print/attribute/ResolutionSyntax.java
===================================================================
RCS file: 
/cvsroot/classpath/classpath/javax/print/attribute/ResolutionSyntax.java,v
retrieving revision 1.5
diff -u -r1.5 ResolutionSyntax.java
--- javax/print/attribute/ResolutionSyntax.java 19 Nov 2005 11:03:37 -0000      
1.5
+++ javax/print/attribute/ResolutionSyntax.java 19 Nov 2005 15:53:53 -0000
@@ -254,12 +254,16 @@
    * </p>
    * 
    * @param units the units to use
-   * @param unitsName the name of the units
+   * @param unitsName the name of the units. If <code>null</code>
+   * it is ommitted from the string representation.
    *
    * @return The string representation.
    */
   public String toString(int units, String unitsName)
   {
+    if (unitsName == null)
+      return getCrossFeedResolution(units) + "x" + getFeedResolution(units);
+    
     return ("" + getCrossFeedResolution(units)
             + "x" + getFeedResolution(units)
             + " " + unitsName);

reply via email to

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