harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r967053 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/print/META-INF/ classlib/modules/print/src/main/java/common/javax/print/ classlib/modules/print/src/main/java/common/javax/print/attrib...
Date Fri, 23 Jul 2010 11:48:27 GMT
Author: hindessm
Date: Fri Jul 23 11:48:26 2010
New Revision: 967053

URL: http://svn.apache.org/viewvc?rev=967053&view=rev
Log:
Merge changes from trunk@96604[49].

Added:
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/org/apache/harmony/print/
      - copied from r967049, harmony/enhanced/java/trunk/classlib/modules/print/src/main/java/common/org/apache/harmony/print/
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/
      - copied from r967049, harmony/enhanced/java/trunk/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/
      - copied from r967049, harmony/enhanced/java/trunk/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/Messages.java
      - copied unchanged from r967049, harmony/enhanced/java/trunk/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/Messages.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/messages.properties
      - copied unchanged from r967049, harmony/enhanced/java/trunk/classlib/modules/print/src/main/java/common/org/apache/harmony/print/internal/nls/messages.properties
Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/print/META-INF/MANIFEST.MF
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/ServiceUI.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/SimpleDoc.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/AttributeSetUtilities.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/HashAttributeSet.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/IntegerSyntax.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/ResolutionSyntax.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/Size2DSyntax.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/CopiesSupported.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobImpressionsSupported.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobKOctetsSupported.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobMediaSheetsSupported.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobStateReasons.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaSize.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/NumberUpSupported.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PageRanges.java
    harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PrinterStateReasons.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 11:48:26 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-966504,966571,966935
+/harmony/enhanced/java/trunk:929253-967049
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 11:48:26 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-966504,966571,966935
+/harmony/enhanced/java/trunk/classlib:929253-967049
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 11:48:26 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-966504,966571,966935
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-967049
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/META-INF/MANIFEST.MF?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/META-INF/MANIFEST.MF Fri Jul 23 11:48:26 2010
@@ -35,7 +35,8 @@ Import-Package: java.awt,
  javax.swing.event,
  javax.swing.text,
  org.apache.harmony.awt.gl,
- org.apache.harmony.awt.gl.windows
+ org.apache.harmony.awt.gl.windows,
+ org.apache.harmony.kernel.vm
 Export-Package: javax.print,
  javax.print.attribute,
  javax.print.attribute.standard,

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/ServiceUI.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/ServiceUI.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/ServiceUI.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/ServiceUI.java Fri Jul 23 11:48:26 2010
@@ -25,6 +25,8 @@ import java.awt.HeadlessException;
 import java.awt.KeyboardFocusManager;
 import java.awt.Window;
 import javax.print.attribute.PrintRequestAttributeSet;
+
+import org.apache.harmony.print.internal.nls.Messages;
 import org.apache.harmony.x.print.ServiceUIDialog;
 
 public class ServiceUI {
@@ -65,12 +67,18 @@ public class ServiceUI {
      */
     static int checkServices(PrintService[] services, PrintService defaultService,
             PrintRequestAttributeSet attributes) {
-        if (services == null) {
-            throw new IllegalArgumentException("Services list is null!");
-        } else if (services.length == 0) {
-            throw new IllegalArgumentException("Services list is empty!");
-        } else if (attributes == null) {
-            throw new IllegalArgumentException("Attribute set is null!");
+       
+    if (services == null) {                 
+            //print.02= Services list is null
+            throw new IllegalArgumentException(Messages.getString("print.02")); //$NON-NLS-1$                   
+        }    
+    else if (services.length == 0) {                  
+            //print.03= Services list is empty
+            throw new IllegalArgumentException(Messages.getString("print.03")); //$NON-NLS-1$
+          }   
+    else if (attributes == null) {        
+            //print.04= Attribute set is null
+            throw new IllegalArgumentException(Messages.getString("print.04")); //$NON-NLS-1$            
         }
         int serviceIndex = 0;
         boolean defaultServiceFound = (defaultService == null);
@@ -81,9 +89,9 @@ public class ServiceUI {
                 break;
             }
         }
-        if (!defaultServiceFound) {
-            throw new IllegalArgumentException(
-                    "Default service is absent in the services list!");
+        if (!defaultServiceFound) {                    
+            //print.05= Default service is absent in the services list
+            throw new IllegalArgumentException(Messages.getString("print.05")); //$NON-NLS-1$
         }
         return serviceIndex;
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/SimpleDoc.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/SimpleDoc.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/SimpleDoc.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/SimpleDoc.java Fri Jul 23 11:48:26 2010
@@ -25,6 +25,8 @@ import java.io.Reader;
 import java.io.StringReader;
 import javax.print.attribute.DocAttributeSet;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class SimpleDoc implements Doc {
     private Object printdata;
 
@@ -44,16 +46,19 @@ public final class SimpleDoc implements 
          * in the DocFlavor.
          */
         if (docflavor == null || printData == null) {
-            throw new IllegalArgumentException("Argument is null");
+            
+            //print.00= Argument is null
+            throw new IllegalArgumentException(Messages.getString("print.00")); //$NON-NLS-1$
         }
         try {
             Class<?> clazz = Class.forName(docflavor.getRepresentationClassName());
             if (!clazz.isInstance(printData)) {
                 throw new IllegalArgumentException("");
             }
-        } catch (Exception e) {
-            throw new IllegalArgumentException("Wrong type of print data");
-        }
+        } catch (Exception e) {          
+            //print.01= Wrong type of print data
+            throw new IllegalArgumentException(Messages.getString("print.01")); //$NON-NLS-1$
+            }
         this.printdata = printData;
         this.flavor = docflavor;
         this.attributes = docattributes;

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/AttributeSetUtilities.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/AttributeSetUtilities.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/AttributeSetUtilities.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/AttributeSetUtilities.java Fri Jul 23 11:48:26 2010
@@ -18,6 +18,8 @@ package javax.print.attribute;
 
 import java.io.Serializable;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class AttributeSetUtilities {
 
 
@@ -147,16 +149,19 @@ public final class AttributeSetUtilities
         }
 
 
-        public boolean add(Attribute attribute) {
-            throw new UnmodifiableSetException("Unmodifiable attribute set");
-        }
+        public boolean add(Attribute attribute) {                     
+            //print.06= Unmodifiable attribute set
+            throw new UnmodifiableSetException(Messages.getString("print.06")); //$NON-NLS-1$
+            }
 
-        public boolean addAll(AttributeSet attributeSet) {
-            throw new UnmodifiableSetException("Unmodifiable attribute set");
-        }
+        public boolean addAll(AttributeSet attributeSet) {             
+            //print.06= Unmodifiable attribute set
+            throw new UnmodifiableSetException(Messages.getString("print.06")); //$NON-NLS-1$        
+            }
 
-        public void clear() {
-            throw new UnmodifiableSetException("Unmodifiable attribute set");
+        public void clear() {            
+            //print.06= Unmodifiable attribute set
+            throw new UnmodifiableSetException(Messages.getString("print.06")); //$NON-NLS-1$
         }
 
         public boolean containsKey(Class attributeCategory) {
@@ -178,17 +183,19 @@ public final class AttributeSetUtilities
         public int hashCode() {
             return aset.hashCode();
         }
-
+        
         public boolean isEmpty() {
             return aset.isEmpty();
         }
-
-        public boolean remove(Attribute attribute) {
-            throw new UnmodifiableSetException("Unmodifiable attribute set");
+        
+        public boolean remove(Attribute attribute) {             
+            //print.06= Unmodifiable attribute set
+            throw new UnmodifiableSetException(Messages.getString("print.06")); //$NON-NLS-1$
         }
-
-        public synchronized boolean remove (Class attributeCategory) {
-            throw new UnmodifiableSetException("Unmodifiable attribute set");
+        
+        public synchronized boolean remove (Class attributeCategory) {             
+            //print.06= Unmodifiable attribute set
+            throw new UnmodifiableSetException(Messages.getString("print.06")); //$NON-NLS-1$
         }
 
         public int size() {
@@ -257,113 +264,124 @@ public final class AttributeSetUtilities
 
     public static AttributeSet 
         synchronizedView (AttributeSet attributeSet) {
-            if (attributeSet == null) {
-                throw new NullPointerException("Null attribute set");
+            if (attributeSet == null) {                           
+                //print.07= Null attribute set
+                throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$            
             }
             return new SynchronizedAttributeSet(attributeSet);
     }
   
     public static DocAttributeSet 
         synchronizedView (DocAttributeSet attributeSet) {
-            if (attributeSet == null) {
-                throw new NullPointerException("Null attribute set");
+            if (attributeSet == null) {                
+                //print.07= Null attribute set
+                throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$           
             }
             return new SynchronizedDocAttributeSet(attributeSet);
     }
     
     public static PrintRequestAttributeSet 
         synchronizedView(PrintRequestAttributeSet attributeSet) {
-            if (attributeSet == null) {
-                throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {                
+                //print.07= Null attribute set
+                throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$           
             }
             return new SynchronizedPrintRequestAttributeSet(attributeSet);
     }
 
     public static PrintJobAttributeSet
         synchronizedView(PrintJobAttributeSet attributeSet) {
-            if (attributeSet == null) {
-                throw new NullPointerException("Null attribute set");
+            if (attributeSet == null) {                
+                //print.07= Null attribute set
+                throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$           
             }
             return new SynchronizedPrintJobAttributeSet(attributeSet);
     }
 
     public static PrintServiceAttributeSet
         synchronizedView(PrintServiceAttributeSet attributeSet) {
-            if (attributeSet == null) {
-                throw new NullPointerException("Null attribute set");
+            if (attributeSet == null) {                
+                //print.07= Null attribute set
+                throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$           
             }
             return new SynchronizedPrintServiceAttributeSet(attributeSet);
     }
 
     
     public static AttributeSet unmodifiableView (AttributeSet attributeSet) {
-        if (attributeSet == null) {
-            throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {            
+            //print.07= Null attribute set
+            throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$       
         }
         return new UnmodifiableAttributeSet(attributeSet);
     }
     
     public static DocAttributeSet 
                     unmodifiableView (DocAttributeSet attributeSet) {
-        if (attributeSet == null) {
-            throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {            
+            //print.07= Null attribute set
+            throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$        
         }
         return new UnmodifiableDocAttributeSet(attributeSet);
     }
     
     public static PrintJobAttributeSet
                     unmodifiableView(PrintJobAttributeSet attributeSet) {
-        if (attributeSet == null) {
-            throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {            
+            //print.07= Null attribute set
+            throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$        
         }
         return new UnmodifiablePrintJobAttributeSet(attributeSet);
     }
     
     public static PrintRequestAttributeSet 
                     unmodifiableView(PrintRequestAttributeSet attributeSet) {
-        if (attributeSet == null) {
-            throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {            
+            //print.07= Null attribute set
+            throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$       
         }
         return new UnmodifiablePrintRequestAttributeSet(attributeSet);
     }
       
     public static PrintServiceAttributeSet
                         unmodifiableView(PrintServiceAttributeSet attributeSet) {
-        if (attributeSet == null) {
-            throw new NullPointerException("Null attribute set");
+        if (attributeSet == null) {            
+            //print.07= Null attribute set
+            throw new NullPointerException(Messages.getString("print.07")); //$NON-NLS-1$       
         }
         return new UnmodifiablePrintServiceAttributeSet (attributeSet);
     }
 
     
     public static Class<?> verifyAttributeCategory(Object object, Class<?> interfaceName) {
-        if (!(Attribute.class).isAssignableFrom(interfaceName)) {
-            throw new ClassCastException(interfaceName.getName() + " is not "
-                    + "interface Attribute or it's subinterface");
+        if (!(Attribute.class).isAssignableFrom(interfaceName)) {          
+            //print.08={0} is not interface Attribute or it's subinterface
+            throw new ClassCastException(Messages.getString("print.08",
+                                                            interfaceName.getName())); //$NON-NLs-1$            
         } else if (interfaceName.isAssignableFrom((Class<?>) object)) {
             return (Class<?>) object;
-        } else {
-            throw new ClassCastException(object.getClass().getName() + "doesn't implement"
-                    + interfaceName.getName());
+        } else {                   
+            //print.09={0} doesn't implement {1}
+            throw new ClassCastException(Messages.getString("print.09", object.getClass().getName(), interfaceName.getName())); //$NON-NLS-1$        
         }
     }
 
     public static Attribute verifyAttributeValue(Object attribute, Class<?> interfaceName) {
-        if (attribute == null) {
-            throw new NullPointerException("Null attribute");
+        if (attribute == null) {                      
+          //print.0A= Null attribute 
+            throw new NullPointerException(Messages.getString("print.0A")); //$NON-NLS-1$            
         } else if (interfaceName.isInstance(attribute)) {
             return (Attribute) attribute;
-        } else {
-            throw new ClassCastException("Object is not an instance of "
-                    + interfaceName.getName());
+        } else {                  
+            //print.0B= Object is not an instance of {0}
+            throw new ClassCastException(Messages.getString("print.0B", interfaceName.getName())); //$NON-NLS-1$        
         }
     }
 
     public static void verifyCategoryForValue(Class<?> attributeCategory, Attribute attribute) {
-        if (!attributeCategory.equals(attribute.getCategory())) {
-            throw new IllegalArgumentException(attributeCategory.getName()
-                    + "is not equal to the category of the attribute"
-                    + attribute.getCategory().getName());
+        if (!attributeCategory.equals(attribute.getCategory())) {                        
+            //print.0C= {0} is not equal to the category of the attribute {1}
+            throw new IllegalArgumentException(Messages.getString("print.0C", attributeCategory.getName(), attribute.getCategory().getName())); //$NON-NLs-1$        
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/HashAttributeSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/HashAttributeSet.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/HashAttributeSet.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/HashAttributeSet.java Fri Jul 23 11:48:26 2010
@@ -23,6 +23,8 @@ import java.io.ObjectOutputStream;
 import java.io.IOException;
 import java.util.HashMap;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public class HashAttributeSet implements Serializable, AttributeSet {
     private static final long serialVersionUID = 5311560590283707917L;
 
@@ -47,23 +49,26 @@ public class HashAttributeSet implements
     }
 
     protected HashAttributeSet(Class<?> interfaceName) {
-        if (interfaceName == null) {
-            throw new NullPointerException("Null attribute interface");
+        if (interfaceName == null) {             
+            //print.0D= Null attribute interface
+            throw new NullPointerException(Messages.getString("print.0D")); //$NON-NLS-1$        
         }
         attributeInterfaceName = interfaceName;
     }
 
     protected HashAttributeSet(Attribute attribute, Class<?> interfaceName) {
-        if (interfaceName == null) {
-            throw new NullPointerException("Null attribute interface");
+        if (interfaceName == null) {            
+            //print.0D= Null attribute interface
+            throw new NullPointerException(Messages.getString("print.0D")); //$NON-NLS-1$            
         }
         attributeInterfaceName = interfaceName;
         add(attribute);
     }
 
     protected HashAttributeSet(Attribute[] attributes, Class<?> interfaceName) {
-        if (interfaceName == null) {
-            throw new NullPointerException("Null attribute interface");
+        if (interfaceName == null) {            
+             //print.0D= Null attribute interface
+            throw new NullPointerException(Messages.getString("print.0D")); //$NON-NLS-1$        
         }
         attributeInterfaceName = interfaceName;
         if (attributes != null) {

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/IntegerSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/IntegerSyntax.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/IntegerSyntax.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/IntegerSyntax.java Fri Jul 23 11:48:26 2010
@@ -19,6 +19,8 @@ package javax.print.attribute;
 
 import java.io.Serializable;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public abstract class IntegerSyntax implements Cloneable, Serializable {
     private static final long serialVersionUID = 3644574816328081943L;
     
@@ -31,9 +33,9 @@ public abstract class IntegerSyntax impl
 
     protected IntegerSyntax(int intValue, int lowerBound, int upperBound) {
         super();
-        if ((intValue < lowerBound) || (intValue > upperBound)) {
-            throw new IllegalArgumentException("Value " + intValue + " not in valid range ("
-                    + lowerBound + "," + upperBound + ")");
+        if ((intValue < lowerBound) || (intValue > upperBound)) {             
+            //print.0E= Value {0} not in valid range ({1})
+            throw new IllegalArgumentException(Messages.getString("print.0E", intValue, lowerBound+","+upperBound)); //$NON-NLS-1$        
         }
         value = intValue;
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/ResolutionSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/ResolutionSyntax.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/ResolutionSyntax.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/ResolutionSyntax.java Fri Jul 23 11:48:26 2010
@@ -19,6 +19,8 @@ package javax.print.attribute;
 
 import java.io.Serializable;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public abstract class ResolutionSyntax implements Cloneable, Serializable {
     private static final long serialVersionUID = 2706743076526672017L;
 
@@ -31,14 +33,17 @@ public abstract class ResolutionSyntax i
     private final int feedRes;
 
     public ResolutionSyntax(int crossFeedResolution, int feedResolution, int units) {
-        if (crossFeedResolution < 1) {
-            throw new IllegalArgumentException("CrossFeedResolution " + "is less than 1");
-        }
-        if (feedResolution < 1) {
-            throw new IllegalArgumentException("FeedResolution is less than 1");
-        }
-        if (units < 1) {
-            throw new IllegalArgumentException("Units is less than 1");
+        if (crossFeedResolution < 1) {           
+            //print.0F= CrossFeedResolution is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.0F")); //$NON-NLS-1$            
+        }
+        if (feedResolution < 1) {            
+            //print.10= Feed resolution is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.10")); //$NON-NLS-1$        
+        }
+        if (units < 1) {            
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         crossFeedRes = crossFeedResolution * units;
         feedRes = feedResolution * units;
@@ -56,7 +61,8 @@ public abstract class ResolutionSyntax i
 
     public int getCrossFeedResolution(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$
         }
         return Math.round(((float) crossFeedRes) / units);
     }
@@ -67,7 +73,8 @@ public abstract class ResolutionSyntax i
 
     public int getFeedResolution(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$
         }
         return Math.round(((float) feedRes) / units);
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/SetOfIntegerSyntax.java Fri Jul 23 11:48:26 2010
@@ -20,22 +20,26 @@ package javax.print.attribute;
 import java.io.Serializable;
 import java.util.Vector;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public abstract class SetOfIntegerSyntax implements Cloneable, Serializable {
     private static final long serialVersionUID = 3666874174847632203L;
 
     private int[][] canonicalArray;
 
     protected SetOfIntegerSyntax(int value) {
-        if (value < 0) {
-            throw new IllegalArgumentException("Value " + value + " is less than 0");
+        if (value < 0) {                       
+            //print.12= Value {0} is less than 0
+            throw new IllegalArgumentException(Messages.getString("print.12", value)); //NON-NLS-1$            
         }
         canonicalArray = new int[][] { { value, value } };
     }
 
     protected SetOfIntegerSyntax(int lowerBound, int upperBound) {
         if (lowerBound <= upperBound) {
-            if (lowerBound < 0) {
-                throw new IllegalArgumentException("Lower bound is less than 0");
+            if (lowerBound < 0) {              
+            //print.13= Lower bound is less than 0
+            throw new IllegalArgumentException(Messages.getString("print.13")); //NON-NLS-1$              
             }
             canonicalArray = new int[][] { { lowerBound, upperBound } };
         } else {
@@ -103,9 +107,9 @@ public abstract class SetOfIntegerSyntax
                             continue;
                         } else if (Character.isDigit(symbol)) {
                             num1long = num1long * 10 + Character.digit(symbol, 10);
-                            if (num1long > Integer.MAX_VALUE) {
-                                throw new IllegalArgumentException(num1long
-                                        + " is out of int range");
+                            if (num1long > Integer.MAX_VALUE) {                                                            
+                                //print.14= {0} is out of int range
+                                throw new IllegalArgumentException(Messages.getString("print.24", num1long)); //$NON-NLs-1$
                             }
                             num2long = num1long;
                         } else if ((symbol == ':') || (symbol == '-')) {
@@ -131,9 +135,9 @@ public abstract class SetOfIntegerSyntax
                             continue;
                         } else if (Character.isDigit(symbol)) {
                             num2long = num2long * 10 + Character.digit(symbol, 10);
-                            if (num2long > Integer.MAX_VALUE) {
-                                throw new IllegalArgumentException(num2long
-                                        + " is out of int range");
+                            if (num2long > Integer.MAX_VALUE) {                             
+                                //print.14= {0} is out of int range
+                                throw new IllegalArgumentException(Messages.getString("print.14", num2long)); //$NON-NLs-1$                                
                             }
                         } else {
                             throw new IllegalArgumentException();
@@ -159,7 +163,8 @@ public abstract class SetOfIntegerSyntax
         int num2;
         for (int[] element : values) {
             if (element == null) {
-                throw new NullPointerException("int[][] array has null element");
+                //print.15= int[][] array has null element
+                throw new NullPointerException(Messages.getString("print.15")); //$NON-NLS-1$
             }
             if (element.length == 1) {
                 num1 = element[0];
@@ -168,11 +173,12 @@ public abstract class SetOfIntegerSyntax
                 num1 = element[0];
                 num2 = element[1];
             } else {
-                throw new IllegalArgumentException("Only array of length-1 "
-                        + "or length-2 arrays of ints are valid");
+            	//print.16= Only array of length-1 or length-2 arrays of ints are valid
+                throw new IllegalArgumentException(Messages.getString("print.16")); //$NON-NLS-1$                
             }
             if (num1 < 0) {
-                throw new IllegalArgumentException("Valid values are " + "not less than 0");
+                //print.17= Valid values are not less than 0
+                throw new IllegalArgumentException(Messages.getString("print.17")); //$NON-NLS-1$            
             } else if (num1 <= num2) {
                 addRange(vector, num1, num2);
             }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/Size2DSyntax.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/Size2DSyntax.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/Size2DSyntax.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/Size2DSyntax.java Fri Jul 23 11:48:26 2010
@@ -19,6 +19,8 @@ package javax.print.attribute;
 
 import java.io.Serializable;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public abstract class Size2DSyntax implements Cloneable, Serializable {
     private static final long serialVersionUID = 5584439964938660530L;
     
@@ -32,7 +34,8 @@ public abstract class Size2DSyntax imple
 
     protected Size2DSyntax(int x, int y, int units) {
         if ((x < 0) || (y < 0) || (units < 1)) {
-            throw new IllegalArgumentException("Valid values are:" + "x>=0, y>=0, units>=1");
+            //print.18= Valid values are x>=0, y>=0, units>=1
+            throw new IllegalArgumentException(Messages.getString("print.18")); //$NON-NLs-1$            
         }
         this.x = x * units;
         this.y = y * units;
@@ -40,7 +43,8 @@ public abstract class Size2DSyntax imple
 
     protected Size2DSyntax(float x, float y, int units) {
         if ((x < 0.0f) || (y < 0.0f) || (units < 1)) {
-            throw new IllegalArgumentException("Valid values are:" + "x>=0.0, y>=0.0, units>=1");
+            //print.19= VAlid values are x>=0.0, y>=0.0, units>=1
+            throw new IllegalArgumentException(Messages.getString("print.19")); //$NON-NLs-1$            
         }
         this.x = Math.round(x * units);
         this.y = Math.round(y * units);
@@ -61,14 +65,16 @@ public abstract class Size2DSyntax imple
 
     public float getX(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$
         }
         return ((float) x) / units;
     }
 
     public float getY(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         return ((float) y) / units;
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/CopiesSupported.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/CopiesSupported.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/CopiesSupported.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/CopiesSupported.java Fri Jul 23 11:48:26 2010
@@ -21,6 +21,8 @@ import javax.print.attribute.Attribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 import javax.print.attribute.SupportedValuesAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class CopiesSupported extends SetOfIntegerSyntax implements
         SupportedValuesAttribute {
     private static final long serialVersionUID = 6927711687034846001L;
@@ -28,16 +30,19 @@ public final class CopiesSupported exten
     public CopiesSupported(int value) {
         super(value);
         if (value < 1) {
-            throw new IllegalArgumentException("Value" + value + "is less than 1");
+            //print.1A= Value {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1A", value)); //NON-NLS-1$        
         }
     }
 
     public CopiesSupported(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range");
-        } else if (lowerBound < 1) {
-            throw new IllegalArgumentException("Lower bound" + lowerBound + "is less than 1");
+            //print.1B= Null range
+            throw new IllegalArgumentException(Messages.getString("print.1B")); //$NON-NLS-1$            
+        } else if (lowerBound < 1) {                     
+            //print.1C= Lower bound {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1C", lowerBound)); //$NON-NLS-1$            
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobImpressionsSupported.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobImpressionsSupported.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobImpressionsSupported.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobImpressionsSupported.java Fri Jul 23 11:48:26 2010
@@ -21,6 +21,8 @@ import javax.print.attribute.Attribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 import javax.print.attribute.SupportedValuesAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class JobImpressionsSupported extends SetOfIntegerSyntax implements
         SupportedValuesAttribute {
     private static final long serialVersionUID = -4887354803843173692L;
@@ -28,9 +30,11 @@ public final class JobImpressionsSupport
     public JobImpressionsSupported(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range: lowerBound " + "> upperBound");
-        } else if (lowerBound < 0) {
-            throw new IllegalArgumentException("Lower bound " + lowerBound + " is less than 0");
+            //print.1D= Null range: lowerBound > upperBound
+            throw new IllegalArgumentException(Messages.getString("print.1D")); //$NON-NLS-1$
+       	} else if (lowerBound < 0) {
+            //print.1E=Lower bound {0} is less than 0
+            throw new IllegalArgumentException(Messages.getString("print.1E", lowerBound)); //$NON-NLs-1$            
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobKOctetsSupported.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobKOctetsSupported.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobKOctetsSupported.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobKOctetsSupported.java Fri Jul 23 11:48:26 2010
@@ -21,6 +21,8 @@ import javax.print.attribute.Attribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 import javax.print.attribute.SupportedValuesAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class JobKOctetsSupported extends SetOfIntegerSyntax implements
         SupportedValuesAttribute {
     private static final long serialVersionUID = -2867871140549897443L;
@@ -28,9 +30,11 @@ public final class JobKOctetsSupported e
     public JobKOctetsSupported(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range: lowerBound " + "> upperBound");
+		    //print.1D= Null range: lowerBound > upperBound
+            throw new IllegalArgumentException(Messages.getString("print.1D")); //$NON-NLS-1$        
         } else if (lowerBound < 0) {
-            throw new IllegalArgumentException("Lower bound " + lowerBound + " is less than 0");
+            //print.1E=Lower bound {0} is less than 0
+            throw new IllegalArgumentException(Messages.getString("print.1E", lowerBound)); //$NON-NLs-1$        
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobMediaSheetsSupported.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobMediaSheetsSupported.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobMediaSheetsSupported.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobMediaSheetsSupported.java Fri Jul 23 11:48:26 2010
@@ -21,6 +21,8 @@ import javax.print.attribute.Attribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 import javax.print.attribute.SupportedValuesAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class JobMediaSheetsSupported extends SetOfIntegerSyntax implements
         SupportedValuesAttribute {
     private static final long serialVersionUID = 2953685470388672940L;
@@ -28,9 +30,11 @@ public final class JobMediaSheetsSupport
     public JobMediaSheetsSupported(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range: lowerBound " + "> upperBound");
+            //print.1D= Null range: lowerBound > upperBound
+            throw new IllegalArgumentException(Messages.getString("print.1D")); //$NON-NLS-1$        
         } else if (lowerBound < 0) {
-            throw new IllegalArgumentException("Lower bound " + lowerBound + " is less then 0");
+            //print.1E=Lower bound {0} is less than 0
+            throw new IllegalArgumentException(Messages.getString("print.1E", lowerBound)); //$NON-NLs-1$        
         }
     }
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobStateReasons.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobStateReasons.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobStateReasons.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/JobStateReasons.java Fri Jul 23 11:48:26 2010
@@ -22,6 +22,8 @@ import java.util.HashSet;
 import javax.print.attribute.Attribute;
 import javax.print.attribute.PrintJobAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class JobStateReasons extends HashSet<JobStateReason> implements PrintJobAttribute {
     private static final long serialVersionUID = 8849088261264331812L;
 
@@ -47,7 +49,8 @@ public final class JobStateReasons exten
     @Override
     public boolean add(JobStateReason reason) {
         if (reason == null) {
-            throw new NullPointerException("Null JobStateReason");
+            //print.1F=Null JobStateReason
+            throw new NullPointerException(Messages.getString("print.1F")); //$NON-NLS-1$            
         }
         return super.add(reason);
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaPrintableArea.java Fri Jul 23 11:48:26 2010
@@ -22,6 +22,8 @@ import javax.print.attribute.DocAttribut
 import javax.print.attribute.PrintJobAttribute;
 import javax.print.attribute.PrintRequestAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class MediaPrintableArea implements DocAttribute, PrintJobAttribute,
         PrintRequestAttribute {
     private static final long serialVersionUID = -1597171464050795793L;
@@ -83,28 +85,32 @@ public final class MediaPrintableArea im
 
     public float getX(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+             //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         return ((float) x) / units;
     }
 
     public float getY(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         return ((float) y) / units;
     }
 
     public float getWidth(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         return ((float) width) / units;
     }
 
     public float getHeight(int units) {
         if (units < 1) {
-            throw new IllegalArgumentException("units is less than 1");
+            //print.11= Units is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.11")); // $NON-NLS-1$        
         }
         return ((float) height) / units;
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaSize.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaSize.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaSize.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/MediaSize.java Fri Jul 23 11:48:26 2010
@@ -25,6 +25,8 @@ import java.util.Map;
 import javax.print.attribute.Attribute;
 import javax.print.attribute.Size2DSyntax;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 @SuppressWarnings("unused")
 public class MediaSize extends Size2DSyntax implements Attribute {
     private static final long serialVersionUID = -1967958664615414771L;
@@ -338,8 +340,9 @@ public class MediaSize extends Size2DSyn
 
     public MediaSize(int x, int y, int units) {
         super(x, y, units);
-        if (x > y) {
-            throw new IllegalArgumentException("x > y");
+        if (x > y) {            
+            //print.20= x > y
+            throw new IllegalArgumentException(Messages.getString("print.20")); //$NON-NLS-1$            
         }
         synchronized (MediaSize.class) {
             sizesList.add(this);
@@ -348,8 +351,9 @@ public class MediaSize extends Size2DSyn
 
     public MediaSize(float x, float y, int units) {
         super(x, y, units);
-        if (x > y) {
-            throw new IllegalArgumentException("x > y");
+        if (x > y) {            
+            //print.20= x > y
+            throw new IllegalArgumentException(Messages.getString("print.20")); //$NON-NLS-1$      
         }
         synchronized (MediaSize.class) {
             sizesList.add(this);
@@ -358,8 +362,9 @@ public class MediaSize extends Size2DSyn
 
     public MediaSize(int x, int y, int units, MediaSizeName mediaSizeName) {
         super(x, y, units);
-        if (x > y) {
-            throw new IllegalArgumentException("x > y");
+        if (x > y) {            
+            //print.20= x > y
+            throw new IllegalArgumentException(Messages.getString("print.20")); //$NON-NLS-1$        
         }
         this.mediaSizeName = mediaSizeName;
         synchronized (MediaSize.class) {
@@ -370,8 +375,9 @@ public class MediaSize extends Size2DSyn
 
     public MediaSize(float x, float y, int units, MediaSizeName mediaSizeName) {
         super(x, y, units);
-        if (x > y) {
-            throw new IllegalArgumentException("x > y");
+        if (x > y) {           
+            //print.20= x > y
+            throw new IllegalArgumentException(Messages.getString("print.20")); //$NON-NLS-1$       
         }
         this.mediaSizeName = mediaSizeName;
         synchronized (MediaSize.class) {
@@ -389,9 +395,9 @@ public class MediaSize extends Size2DSyn
     }
 
     public static MediaSizeName findMedia(float x, float y, int units) {
-        if ((x <= 0.0) || (y <= 0.0) || (units < 1)) {
-            throw new IllegalArgumentException("Valid values are: "
-                    + "x > 0, y > 0, units >= 1");
+        if ((x <= 0.0) || (y <= 0.0) || (units < 1)) {            
+            //print.21=Valid values are: x > 0, y > 0, units >=1
+            throw new IllegalArgumentException(Messages.getString("print.21")); //$NON-NLs-1$            
         }
         synchronized (MediaSize.class) {
             MediaSize hit = null;

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/NumberUpSupported.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/NumberUpSupported.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/NumberUpSupported.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/NumberUpSupported.java Fri Jul 23 11:48:26 2010
@@ -21,6 +21,8 @@ import javax.print.attribute.Attribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 import javax.print.attribute.SupportedValuesAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class NumberUpSupported extends SetOfIntegerSyntax implements
         SupportedValuesAttribute {
     private static final long serialVersionUID = -1041573395759141805L;
@@ -28,31 +30,37 @@ public final class NumberUpSupported ext
     public NumberUpSupported(int value) {
         super(value);
         if (value < 1) {
-            throw new IllegalArgumentException("Value" + value + "is less than 1");
+            //print.1A= Value {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1A", value)); //NON-NLS-1$        
         }
     }
 
     public NumberUpSupported(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range: lowerBound " + "> upperBound");
-        } else if (lowerBound < 1) {
-            throw new IllegalArgumentException("Lower bound " + lowerBound + " is less than 1");
+             //print.1D= Null range: lowerBound > upperBound
+            throw new IllegalArgumentException(Messages.getString("print.1D")); //$NON-NLS-1$        
+        } else if (lowerBound < 1) {             
+            //print.1C= Lower bound {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1C", lowerBound)); //$NON-NLS-1$            
         }
     }
 
     public NumberUpSupported(int[][] members) {
         super(members);
         if (members == null) {
-            throw new NullPointerException("Null int[][] parameter");
+            //print.22=Null int [][] parameter
+            throw new NullPointerException(Messages.getString("print.22")); //$NON-NLS-1$            
         }
         int[][] canonicalArray = getMembers();
         if (canonicalArray.length == 0) {
-            throw new IllegalArgumentException("Zero-length array");
+            //print.23=Zero-length array
+            throw new IllegalArgumentException(Messages.getString("print.23")); //$NON-NLS-1$            
         }
         for (int i = 0; i < canonicalArray.length; i++) {
             if (canonicalArray[i][0] < 1) {
-                throw new IllegalArgumentException("Valid values are not " + "less than 1");
+                //print.24=Valid values are not less than 1
+                throw new IllegalArgumentException(Messages.getString("print.24")); //$NON-NLs-1$            
             }
         }
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PageRanges.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PageRanges.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PageRanges.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PageRanges.java Fri Jul 23 11:48:26 2010
@@ -23,6 +23,8 @@ import javax.print.attribute.PrintJobAtt
 import javax.print.attribute.PrintRequestAttribute;
 import javax.print.attribute.SetOfIntegerSyntax;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 public final class PageRanges extends SetOfIntegerSyntax implements DocAttribute,
         PrintJobAttribute, PrintRequestAttribute {
     private static final long serialVersionUID = 8639895197656148392L;
@@ -30,23 +32,27 @@ public final class PageRanges extends Se
     public PageRanges(int value) {
         super(value);
         if (value < 1) {
-            throw new IllegalArgumentException("Value" + value + "is less than 1");
+            //print.1A= Value {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1A", value)); //NON-NLS-1$        
         }
     }
 
     public PageRanges(int lowerBound, int upperBound) {
         super(lowerBound, upperBound);
         if (lowerBound > upperBound) {
-            throw new IllegalArgumentException("Null range: lowerBound " + "> upperBound");
+            //print.1D= Null range: lowerBound > upperBound
+            throw new IllegalArgumentException(Messages.getString("print.1D")); //$NON-NLS-1$        
         } else if (lowerBound < 1) {
-            throw new IllegalArgumentException("Lower bound " + lowerBound + " is less than 1");
+             //print.1C= Lower bound {0} is less than 1
+            throw new IllegalArgumentException(Messages.getString("print.1C", lowerBound)); //$NON-NLS-1$        
         }
     }
 
     public PageRanges(int[][] members) {
         super(members);
         if (members == null) {
-            throw new NullPointerException("Null int[][] parameter");
+             //print.22=Null int [][] parameter
+            throw new NullPointerException(Messages.getString("print.22")); //$NON-NLS-1$        
         }
         precisionCheck();
     }
@@ -54,7 +60,8 @@ public final class PageRanges extends Se
     public PageRanges(String string) {
         super(string);
         if (string == null) {
-            throw new NullPointerException("Null string parameter");
+            //print.25=Null string parameter
+            throw new NullPointerException(Messages.getString("print.25")); //$NON-NLs-1$            
         }
         precisionCheck();
     }
@@ -62,11 +69,13 @@ public final class PageRanges extends Se
     private void precisionCheck() {
         int[][] canonicalArray = getMembers();
         if (canonicalArray.length == 0) {
-            throw new IllegalArgumentException("Zero-length array");
+            //print.23=Zero-length array
+            throw new IllegalArgumentException(Messages.getString("print.23")); //$NON-NLS-1$        
         }
         for (int i = 0; i < canonicalArray.length; i++) {
             if (canonicalArray[i][0] < 1) {
-                throw new IllegalArgumentException("Valid values are not " + "less than 1");
+                //print.24= valid values are not less than 1
+                throw new IllegalArgumentException(Messages.getString("print.24")); //$NON-NLs-1$           
             }
         }
     }

Modified: harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PrinterStateReasons.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PrinterStateReasons.java?rev=967053&r1=967052&r2=967053&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PrinterStateReasons.java (original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/print/src/main/java/common/javax/print/attribute/standard/PrinterStateReasons.java Fri Jul 23 11:48:26 2010
@@ -25,6 +25,8 @@ import java.util.Set;
 import javax.print.attribute.Attribute;
 import javax.print.attribute.PrintServiceAttribute;
 
+import org.apache.harmony.print.internal.nls.Messages;
+
 /*
  * Table values are obtained from RFC2911: Internet Printing Protocol/1.1: 
  * Model and Semantics, section 4.4.11, http://ietf.org/rfc/rfc2911.txt?number=2911
@@ -63,17 +65,20 @@ public final class PrinterStateReasons e
     @Override
     public Severity put(PrinterStateReason reason, Severity severity) {
         if (reason == null) {
-            throw new NullPointerException("Reason is null");
+            //print.26=Reason is null
+            throw new NullPointerException(Messages.getString("print.26")); //$NON-NLS-1$            
         }
         if (severity == null) {
-            throw new NullPointerException("Severity is null");
+            //print.27=Severity is null
+            throw new NullPointerException(Messages.getString("print.27")); //$NON-NLS-1$
         }
         return super.put(reason, severity);
     }
 
     public Set<PrinterStateReason> printerStateReasonSet(Severity severity) {
         if (severity == null) {
-            throw new NullPointerException("Severity is null");
+            //print.27=Severity is null
+            throw new NullPointerException(Messages.getString("print.27")); //$NON-NLS-1$       
         }
         Set<PrinterStateReason> set = new HashSet<PrinterStateReason>();
         for (Map.Entry<PrinterStateReason, Severity> mapEntry : entrySet()) {

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 11:48:26 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-966504,966571,966935
+/harmony/enhanced/java/trunk/drlvm:929253-967049
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 23 11:48:26 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-966504,966571,966935
+/harmony/enhanced/java/trunk/jdktools:929253-967049
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message