As subject.

2010-04-28  Andrew John Hughes  <ahug...@redhat.com>

        * gnu/javax/print/ipp/IppPrintService.java:
        (printerAttr): Add generic typing.
        (printServiceAttributeListener): Likewise.
        (flavors): Likewise.
        (printerUris): Likewise.
        (IppPrintService(URI uri, String username, String password)):
        Use generic types in initialising listener set.
        (getPrinterAttributes()): Add generic types.  Remove cast.
        (getPrinterAttributeSet(Class<T>)): Return a set containing
        attributes of type T.  Now creates a new set and checks that
        all elements of the original set can be cast and added to this
        new set.
        (getPrinterDefaultAttribute(Class<? extends Attribute>)): Add
        generic types.
        (processResponse()): Add generic types.
        (getAttribute(Class<T>)): Use generic types corresponding to
        parent interface.
        (getSupportedAttributeCategories()): Use generic types.
        (getSupportedAttributeValues()): Likewise.
        (handleSupportedAttributeValuesResponse(IppResponse,Class<? extends 
Attribute>)):
        Likewise.
        (isAttributeCategorySupported(Class<? extends Attribute>)): Likewise.
        * gnu/javax/print/ipp/IppResponse.java:
        (parseResponse(InputStream)): Use generic types.
        (parseAttributes(Map<Class<? extends Attribute>, Set<Attribute>, 
DataInputStream)):
        Likewise.
        (addAttribute(Map<Class<? extends Attribute>, Set<Attribute>>, 
Attribute): Likewise.
        (IppResponse(URI, short)): Create lists with appropriate type 
parameters.
        (getJobAttributes()): Use generic return type.
        (getOperationAttributes()): Likewise.
        (getPrinterAttributes()): Likewise.
        (getUnsupportedAttributes()): Likewise.
        * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java:
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * gnu/javax/print/ipp/attribute/supported/MediaSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * 
gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * 
gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.
        * 
gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,
        (getAssociatedAttributeArray(Set<Attribute>)): Use superclass Attribute
        as set type parameter and cast when looping over it.

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
Index: gnu/javax/print/ipp/IppPrintService.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/IppPrintService.java,v
retrieving revision 1.3
diff -u -u -r1.3 IppPrintService.java
--- gnu/javax/print/ipp/IppPrintService.java    27 Apr 2010 21:24:02 -0000      
1.3
+++ gnu/javax/print/ipp/IppPrintService.java    28 Apr 2010 21:03:48 -0000
@@ -143,10 +143,10 @@
    * IPP may return sets of attributes e.g. for supported
    * compression methods so we need to map to sets here.
    */
-  private Map<Class<? extends Attribute>, Set<? extends Attribute>> 
printerAttr;
+  private Map<Class<? extends Attribute>, Set<Attribute>> printerAttr;
 
   /** The set of listeners.*/
-  private HashSet printServiceAttributeListener;
+  private HashSet<PrintServiceAttributeListener> printServiceAttributeListener;
 
   /** The username. */
   private transient String user;
@@ -158,13 +158,13 @@
   private String name;
 
   /** The list of supported document flavors. */
-  private List flavors;
+  private List<DocFlavor> flavors;
 
   /** The standard printer URI. */
   private PrinterURI printerUri;
 
   /** The list of all supported printer URIs. */
-  private ArrayList printerUris;
+  private ArrayList<PrinterURI> printerUris;
 
   /**
    * Logger for tracing - enable by passing
@@ -207,7 +207,8 @@
     user = username;
     passwd = password;
 
-    printServiceAttributeListener = new HashSet();
+    printServiceAttributeListener =
+      new HashSet<PrintServiceAttributeListener>();
 
     printerAttr = getPrinterAttributes();
     processResponse();
@@ -219,7 +220,8 @@
    * @return The Map with the printer attributes.
    * @throws IppException if an error occurs.
    */
-  private Map getPrinterAttributes() throws IppException
+  private Map<Class<? extends Attribute>, Set<Attribute>> 
getPrinterAttributes()
+    throws IppException
   {
     IppResponse response = null;
 
@@ -239,7 +241,7 @@
         throw new IppException("IOException in IPP request/response.", e);
       }
 
-    return (Map) response.getPrinterAttributes().get(0);
+    return response.getPrinterAttributes().get(0);
   }
 
   /**
@@ -249,9 +251,13 @@
    * @param attributeClass the category
    * @return The set of attributes of the category.
    */
-  private Set getPrinterAttributeSet(Class<? extends Attribute> attributeClass)
+  private <T extends Attribute> Set<T> getPrinterAttributeSet(Class<T> 
attributeClass)
   {
-    return (Set) printerAttr.get(attributeClass);
+    Set<Attribute> set = printerAttr.get(attributeClass);
+    Set<T> attSet = new HashSet<T>();
+    for (Attribute att : set)
+      attSet.add(attributeClass.cast(att));
+    return attSet;
   }
 
   /**
@@ -264,9 +270,9 @@
    * @throws ClassCastException if attributClass is not an
    * instance of <code>DefaultValueAttribute</code>.
    */
-  private Attribute getPrinterDefaultAttribute(Class attributeClass)
+  private Attribute getPrinterDefaultAttribute(Class<? extends Attribute> 
attributeClass)
   {
-    Set set = (Set) printerAttr.get(attributeClass);
+    Set<Attribute> set = printerAttr.get(attributeClass);
     return ((DefaultValueAttribute) set.toArray()[0]).getAssociatedAttribute();
   }
 
@@ -276,8 +282,7 @@
   private void processResponse()
   {
     // printer name
-    PrinterName[] tmp = (PrinterName[]) getPrinterAttributeSet(
-                         PrinterName.class).toArray(new PrinterName[1]);
+    PrinterName[] tmp = getPrinterAttributeSet(PrinterName.class).toArray(new 
PrinterName[1]);
     name = tmp[0].getValue();
 
     // supported flavors
@@ -285,13 +290,13 @@
     // for text doc flavors as cups doesn't send charset parameters
 
     // utf-8 is supported at least - so we go with this only for now
-    flavors = new ArrayList();
-    Set flavorAttributes = 
getPrinterAttributeSet(DocumentFormatSupported.class);
+    flavors = new ArrayList<DocFlavor>();
+    Set<DocumentFormatSupported> flavorAttributes = 
getPrinterAttributeSet(DocumentFormatSupported.class);
     if (flavorAttributes != null)
       {
-        for (Iterator it = flavorAttributes.iterator(); it.hasNext();)
+        for (DocumentFormatSupported dfs : flavorAttributes)
           {
-            String mimeType = ((DocumentFormatSupported) it.next()).getValue();
+            String mimeType = dfs.getValue();
 
             if (mimeType.equals("text/plain"))
               {
@@ -318,9 +323,10 @@
             boolean changed = false;
             try
               {
-                Class[] clazzes = new Class[] { DocFlavor.BYTE_ARRAY.class,
-                                                DocFlavor.INPUT_STREAM.class,
-                                                DocFlavor.URL.class };
+                Class<?>[] clazzes = new Class<?>[] { 
DocFlavor.BYTE_ARRAY.class,
+                    DocFlavor.INPUT_STREAM.class,
+                    DocFlavor.URL.class
+                    };
 
                 for (int j = 0; j < clazzes.length; j++)
                   {
@@ -368,12 +374,10 @@
       }
 
     // printer uris
-    Set uris = getPrinterAttributeSet(PrinterUriSupported.class);
-    printerUris = new ArrayList(uris.size());
-    Iterator it = uris.iterator();
-    while (it.hasNext())
+    Set<PrinterUriSupported> uris = 
getPrinterAttributeSet(PrinterUriSupported.class);
+    printerUris = new ArrayList<PrinterURI>(uris.size());
+    for (PrinterUriSupported uri : uris)
       {
-        PrinterUriSupported uri = (PrinterUriSupported) it.next();
         printerUris.add( new PrinterURI(uri.getURI()));
       }
   }
@@ -392,7 +396,7 @@
   /**
    * @see javax.print.PrintService#getAttribute(java.lang.Class)
    */
-  public PrintServiceAttribute getAttribute(Class category)
+  public <T extends PrintServiceAttribute> T getAttribute(Class<T> category)
   {
     if (category == null)
       throw new NullPointerException("category may not be null");
@@ -401,9 +405,9 @@
       throw new IllegalArgumentException(
          "category must be of type PrintServiceAttribute");
 
-    Set set = getPrinterAttributeSet(category);
+    Set<T> set = getPrinterAttributeSet(category);
     if (set != null && set.size() > 0)
-        return (PrintServiceAttribute) set.toArray()[0];
+      return set.iterator().next();
 
     return null;
   }
@@ -415,13 +419,10 @@
   {
     PrintServiceAttributeSet set = new HashPrintServiceAttributeSet();
 
-    Iterator it = printerAttr.values().iterator();
-    while (it.hasNext())
+    for (Set<Attribute> attrSet : printerAttr.values())
       {
-        Iterator it2 = ((Set) it.next()).iterator();
-        while (it2.hasNext())
+        for (Attribute attr : attrSet)
           {
-            Attribute attr = (Attribute) it2.next();
             if (attr instanceof PrintServiceAttribute)
               set.add(attr);
           }
@@ -433,7 +434,7 @@
   /**
    * @see javax.print.PrintService#getDefaultAttributeValue(java.lang.Class)
    */
-  public Object getDefaultAttributeValue(Class category)
+  public Object getDefaultAttributeValue(Class<? extends Attribute> category)
   {
     // required attributes
     if (category.equals(Fidelity.class))
@@ -515,9 +516,10 @@
   /**
    * @see javax.print.PrintService#getSupportedAttributeCategories()
    */
-  public Class[] getSupportedAttributeCategories()
+  public Class<?>[] getSupportedAttributeCategories()
   {
-    Set categories = new HashSet();
+    Set<Class<? extends Attribute>> categories =
+      new HashSet<Class<? extends Attribute>>();
 
     // Should only be job template attributes as of section 4.2
     if (printerAttr.containsKey(JobPrioritySupported.class))
@@ -533,7 +535,7 @@
     if (printerAttr.containsKey(FinishingsSupported.class))
       {
         // if only none finishing is supported - it does not count as supported
-        Set set = getPrinterAttributeSet(FinishingsSupported.class);
+        Set<FinishingsSupported> set = 
getPrinterAttributeSet(FinishingsSupported.class);
         if (! (set.size() == 1 && set.contains(FinishingsSupported.NONE)))
           categories.add(Finishings.class);
       }
@@ -570,7 +572,7 @@
     categories.add(JobName.class);
     categories.add(RequestingUserName.class);
 
-    return (Class[]) categories.toArray(new Class[categories.size()]);
+    return categories.toArray(new Class[categories.size()]);
   }
 
   /**
@@ -582,8 +584,8 @@
    * @see PrintService#getSupportedAttributeValues(Class, DocFlavor, 
AttributeSet)
    * @see #handleSupportedAttributeValuesResponse(IppResponse, Class)
    */
-  public Object getSupportedAttributeValues(Class category, DocFlavor flavor,
-                                            AttributeSet attributes)
+  public Object getSupportedAttributeValues(Class<? extends Attribute> 
category,
+                                            DocFlavor flavor, AttributeSet 
attributes)
   {
     // We currently ignore the attribute set - there is nothing in the IPP
     // specification which would come closer to what we do here.
@@ -665,14 +667,15 @@
    * @see #getSupportedAttributeValues(Class, DocFlavor, AttributeSet)
    */
   protected Object handleSupportedAttributeValuesResponse(IppResponse response,
-    Class category)
+                                                          Class<? extends 
Attribute> category)
   {
-    List printerAtts = response.getPrinterAttributes();
+    List<Map<Class<? extends Attribute>, Set<Attribute>>> printerAtts =
+      response.getPrinterAttributes();
 
     // only one will be returned
-    Map printerAttribute = (Map) printerAtts.get(0);
-    Class suppCategory = IppUtilities.getSupportedCategory(category);
-    Set attr = (Set) printerAttribute.get(suppCategory);
+    Map<Class<? extends Attribute>, Set<Attribute>> printerAttribute = 
printerAtts.get(0);
+    Class<? extends Attribute> suppCategory = 
IppUtilities.getSupportedCategory(category);
+    Set<Attribute> attr = printerAttribute.get(suppCategory);
 
     // We sometime assume its a single instance with arbritrary value just 
indicating
     // support or an array which is returned. This is because I sometimes just 
choosed
@@ -681,7 +684,7 @@
 
     //  Map whats in the JSP API
     if (suppCategory.equals(JobPrioritySupported.class))
-      return (JobPrioritySupported) attr.toArray(new 
JobPrioritySupported[1])[0];
+      return (JobPrioritySupported) attr.iterator().next();
     if (suppCategory.equals(JobHoldUntilSupported.class))
       return new JobHoldUntil(new Date());
     if (suppCategory.equals(JobSheetsSupported.class))
@@ -689,7 +692,7 @@
     if (suppCategory.equals(MultipleDocumentHandlingSupported.class))
       return 
MultipleDocumentHandlingSupported.getAssociatedAttributeArray(attr);
     if (suppCategory.equals(CopiesSupported.class))
-      return (CopiesSupported) attr.toArray(new CopiesSupported[1])[0];
+      return (CopiesSupported) attr.iterator().next();
     if (suppCategory.equals(FinishingsSupported.class))
       return FinishingsSupported.getAssociatedAttributeArray(attr);
     if (suppCategory.equals(PageRangesSupported.class))
@@ -707,16 +710,14 @@
     // Special handling as it might also be in range of integers
     if (suppCategory.equals(NumberUpSupported.class))
       {
-        NumberUpSupported[] tmp = (NumberUpSupported[])
-          attr.toArray(new NumberUpSupported[attr.size()]);
-
         if (attr.size() == 1) // number-up maybe in rangeofintegers
-          return tmp[0];
+          return attr.iterator().next();
 
         int[][] members = new int[attr.size()][2];
+        Iterator<Attribute> it = attr.iterator();
         for (int j = 0; j < attr.size(); j++)
           {
-            int value = tmp[j].getMembers()[0][0];
+            int value = ((NumberUpSupported) it.next()).getMembers()[0][0];
             members[j] = new int[] { value, value };
           }
 
@@ -732,7 +733,7 @@
    */
   public DocFlavor[] getSupportedDocFlavors()
   {
-    return (DocFlavor[]) flavors.toArray(new DocFlavor[flavors.size()]);
+    return flavors.toArray(new DocFlavor[flavors.size()]);
   }
 
   /**
@@ -792,24 +793,22 @@
       }
 
     // Validate Jobs returns only Unsupported and Operation
-    List unsupportedMaps = response.getUnsupportedAttributes();
+    List<Map<Class<? extends Attribute>, Set<Attribute>>> unsupportedMaps =
+      response.getUnsupportedAttributes();
     if (unsupportedMaps.size() == 0)
-      return  null;
+      return null;
 
-    Map unsupportedAttr = (Map) unsupportedMaps.get(0);
+    Map<Class<? extends Attribute>, Set<Attribute>> unsupportedAttr = 
unsupportedMaps.get(0);
     if (unsupportedAttr.size() == 0)
       return null;
 
     // Convert the return map with unsupported attributes
     // into an AttribueSet instance
     HashAttributeSet set = new HashAttributeSet();
-    Iterator it = unsupportedAttr.values().iterator();
-    while (it.hasNext())
+    for (Set<Attribute> unsupported : unsupportedAttr.values())
       {
-        Set unsupported = (Set) it.next();
-        Iterator it2 = unsupported.iterator();
-        while (it2.hasNext())
-          set.add((Attribute) it2.next());
+        for (Attribute att : unsupported)
+          set.add(att);
       }
 
     return set;
@@ -818,7 +817,7 @@
   /**
    * @see PrintService#isAttributeCategorySupported(Class)
    */
-  public boolean isAttributeCategorySupported(Class category)
+  public boolean isAttributeCategorySupported(Class<? extends Attribute> 
category)
   {
     if (category == null)
       throw new NullPointerException("category may not be null");
Index: gnu/javax/print/ipp/IppResponse.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/IppResponse.java,v
retrieving revision 1.3
diff -u -u -r1.3 IppResponse.java
--- gnu/javax/print/ipp/IppResponse.java        27 Apr 2010 21:34:03 -0000      
1.3
+++ gnu/javax/print/ipp/IppResponse.java        28 Apr 2010 21:03:48 -0000
@@ -184,7 +184,7 @@
 
       byte tag = 0;
       boolean proceed = true;
-      HashMap tmp;
+      HashMap<Class<? extends Attribute>, Set<Attribute>> tmp;
       // iterate over attribute-groups until end-of-attributes-tag is found
       while (proceed)
         {
@@ -200,23 +200,23 @@
               proceed = false;
               break;
             case IppDelimiterTag.OPERATION_ATTRIBUTES_TAG:
-              tmp = new HashMap();
+              tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
               tag = parseAttributes(tmp, stream);
               operationAttributes.add(tmp);
               break;
             case IppDelimiterTag.JOB_ATTRIBUTES_TAG:
-              tmp = new HashMap();
+              tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
               tag = parseAttributes(tmp, stream);
               jobAttributes.add(tmp);
               break;
             case IppDelimiterTag.PRINTER_ATTRIBUTES_TAG:
-              tmp = new HashMap();
+              tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
               tag = parseAttributes(tmp, stream);
               printerAttributes.add(tmp);
               break;
             case IppDelimiterTag.UNSUPPORTED_ATTRIBUTES_TAG:
               System.out.println("Called");
-              tmp = new HashMap();
+              tmp = new HashMap<Class<? extends Attribute>, Set<Attribute>>();
               tag = parseAttributes(tmp, stream);
               unsupportedAttributes.add(tmp);
               break;
@@ -247,7 +247,8 @@
      * @throws IppException if unexpected exceptions occur.
      * @throws IOException if IO problems with the underlying inputstream 
occur.
      */
-    private byte parseAttributes(Map attributes, DataInputStream stream)
+    private byte parseAttributes(Map<Class<? extends Attribute>, 
Set<Attribute>> attributes,
+                                 DataInputStream stream)
         throws IppException, IOException
     {
       Attribute lastAttribute = null;
@@ -386,7 +387,7 @@
               else if (name.equals("media-supported"))
                 attribute = new MediaSupported(str, null);
               else if (name.equals("media-default"))
-                  attribute = new MediaDefault(str, null);
+                attribute = new MediaDefault(str, null);
               else if (name.equals("job-sheets-default"))
                 attribute = new JobSheetsDefault(str, null);
               else if (name.equals("job-sheets-supported"))
@@ -473,7 +474,7 @@
             }
 
           if (attribute == null)
-            attribute =  new UnknownAttribute(tag, name, value);
+            attribute = new UnknownAttribute(tag, name, value);
 
           addAttribute(attributes, attribute);
           lastAttribute = attribute;
@@ -492,14 +493,15 @@
      * @param attribute
      *          the attribute to add
      */
-    private void addAttribute(Map attributeGroup, Attribute attribute)
+    private void addAttribute(Map<Class<? extends Attribute>, Set<Attribute>> 
attributeGroup,
+                              Attribute attribute)
     {
-      Class clazz = attribute.getCategory();
-      Set attributeValues = (Set) attributeGroup.get(clazz);
+      Class<? extends Attribute> clazz = attribute.getCategory();
+      Set<Attribute> attributeValues = attributeGroup.get(clazz);
 
       if (attributeValues == null) // first attribute of this category
         {
-          attributeValues = new HashSet();
+          attributeValues = new HashSet<Attribute>();
           attributeGroup.put(clazz, attributeValues);
         }
 
@@ -637,10 +639,10 @@
   short status_code;
   int request_id;
 
-  List operationAttributes;
-  List printerAttributes;
-  List jobAttributes;
-  List unsupportedAttributes;
+  List<Map<Class<? extends Attribute>, Set<Attribute>>> operationAttributes;
+  List<Map<Class<? extends Attribute>, Set<Attribute>>> printerAttributes;
+  List<Map<Class<? extends Attribute>, Set<Attribute>>> jobAttributes;
+  List<Map<Class<? extends Attribute>, Set<Attribute>>> unsupportedAttributes;
 
   byte[] data;
 
@@ -654,10 +656,14 @@
   {
     this.uri = uri;
     this.operation_id = operation_id;
-    operationAttributes = new ArrayList();
-    jobAttributes = new ArrayList();
-    printerAttributes = new ArrayList();
-    unsupportedAttributes = new ArrayList();
+    operationAttributes =
+      new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+    jobAttributes =
+      new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+    printerAttributes =
+      new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
+    unsupportedAttributes =
+      new ArrayList<Map<Class<? extends Attribute>, Set<Attribute>>>();
   }
 
   /**
@@ -704,9 +710,9 @@
    * There may occur more than one group of type job attribute in a response
    * because of e.g. multiple job or print service informations requested.
    *
-   * @return The list of job attribute grou maps.
+   * @return The list of job attribute group maps.
    */
-  public List getJobAttributes()
+  public List<Map<Class<? extends Attribute>, Set<Attribute>>> 
getJobAttributes()
   {
     return jobAttributes;
   }
@@ -716,9 +722,9 @@
    * There may occur more than one group of type job attribute in a response
    * because of e.g. multiple job or print service informations requested.
    *
-   * @return The list of operation attribute grou maps.
+   * @return The list of operation attribute group maps.
    */
-  public List getOperationAttributes()
+  public List<Map<Class<? extends Attribute>, Set<Attribute>>> 
getOperationAttributes()
   {
     return operationAttributes;
   }
@@ -728,9 +734,9 @@
    * There may occur more than one group of type job attribute in a response
    * because of e.g. multiple job or print service informations requested.
    *
-   * @return The list of printer attribute grou maps.
+   * @return The list of printer attribute group maps.
    */
-  public List getPrinterAttributes()
+  public List<Map<Class<? extends Attribute>, Set<Attribute>>> 
getPrinterAttributes()
   {
     return printerAttributes;
   }
@@ -761,9 +767,9 @@
    * There may occur more than one group of type job attribute in a response
    * because of e.g. multiple job or print service informations requested.
    *
-   * @return The list of unsupported attribute grou maps.
+   * @return The list of unsupported attribute group maps.
    */
-  public List getUnsupportedAttributes()
+  public List<Map<Class<? extends Attribute>, Set<Attribute>>> 
getUnsupportedAttributes()
   {
     return unsupportedAttributes;
   }
Index: gnu/javax/print/ipp/attribute/supported/CompressionSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/CompressionSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 CompressionSupported.java
--- gnu/javax/print/ipp/attribute/supported/CompressionSupported.java   27 Apr 
2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/CompressionSupported.java   28 Apr 
2010 21:03:48 -0000
@@ -147,13 +147,13 @@
    * @see #getAssociatedAttribute()
    */
   public static Compression[]
-    getAssociatedAttributeArray(Set<CompressionSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     Compression[] result = new Compression[set.size()];
     int j = 0;
-    for (CompressionSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((CompressionSupported) tmp).getAssociatedAttribute();
         j++;
       }
     return result;
Index: gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 FinishingsSupported.java
--- gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java    27 Apr 
2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java    28 Apr 
2010 21:03:49 -0000
@@ -288,13 +288,13 @@
    * @see #getAssociatedAttribute()
    */
   public static Finishings[]
-    getAssociatedAttributeArray(Set<FinishingsSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     Finishings[] result = new Finishings[set.size()];
     int j = 0;
-    for (FinishingsSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((FinishingsSupported) tmp).getAssociatedAttribute();
         j++;
       }
     return result;
Index: gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 JobSheetsSupported.java
--- gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java     27 Apr 
2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java     28 Apr 
2010 21:03:49 -0000
@@ -131,13 +131,13 @@
    * @see #getAssociatedAttribute()
    */
   public static JobSheets[]
-    getAssociatedAttributeArray(Set<JobSheetsSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     ArrayList<JobSheets> result = new ArrayList<JobSheets>();
     int j = 0;
-    for (JobSheetsSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        JobSheets att = tmp.getAssociatedAttribute();
+        JobSheets att = ((JobSheetsSupported) tmp).getAssociatedAttribute();
         if (att != null)
           result.add(att);
         j++;
Index: gnu/javax/print/ipp/attribute/supported/MediaSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/MediaSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 MediaSupported.java
--- gnu/javax/print/ipp/attribute/supported/MediaSupported.java 27 Apr 2010 
21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/MediaSupported.java 28 Apr 2010 
21:03:49 -0000
@@ -100,11 +100,11 @@
    * @param set set to process
    * @return The constructed array.
    */
-  public static Media[] getAssociatedAttributeArray(Set<MediaSupported> set)
+  public static Media[] getAssociatedAttributeArray(Set<Attribute> set)
   {
     Media tmp2;
     ArrayList<Media> result = new ArrayList<Media>();
-    for (MediaSupported tmp : set)
+    for (Attribute tmp : set)
       {
         tmp2 = (Media) IppUtilities.getEnumAttribute("media", tmp.toString());
         if (tmp2 != null)
Index: 
gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 MultipleDocumentHandlingSupported.java
--- 
gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java  
    27 Apr 2010 21:24:02 -0000      1.2
+++ 
gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java  
    28 Apr 2010 21:03:49 -0000
@@ -162,13 +162,13 @@
    * @see #getAssociatedAttribute()
    */
   public static MultipleDocumentHandling[]
-    getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     MultipleDocumentHandling[] result = new 
MultipleDocumentHandling[set.size()];
     int j = 0;
-    for (MultipleDocumentHandlingSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((MultipleDocumentHandlingSupported) 
tmp).getAssociatedAttribute();
         j++;
       }
     return result;
Index: 
gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 OrientationRequestedSupported.java
--- gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java  
27 Apr 2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java  
28 Apr 2010 21:03:49 -0000
@@ -164,13 +164,13 @@
    * @see #getAssociatedAttribute()
    */
   public static OrientationRequested[]
-    getAssociatedAttributeArray(Set<OrientationRequestedSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     OrientationRequested[] result = new OrientationRequested[set.size()];
     int j = 0;
-    for (OrientationRequestedSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((OrientationRequestedSupported) 
tmp).getAssociatedAttribute();
         j++;
       }
     return result;
Index: gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 PrintQualitySupported.java
--- gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java  27 Apr 
2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java  28 Apr 
2010 21:03:49 -0000
@@ -155,13 +155,13 @@
    *
    * @see #getAssociatedAttribute()
    */
-  public static PrintQuality[] 
getAssociatedAttributeArray(Set<PrintQualitySupported> set)
+  public static PrintQuality[] getAssociatedAttributeArray(Set<Attribute> set)
   {
     PrintQuality[] result = new PrintQuality[set.size()];
     int j = 0;
-    for (PrintQualitySupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((PrintQualitySupported) tmp).getAssociatedAttribute();
         j++;
       }
     return result;
Index: gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java
===================================================================
RCS file: 
/sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java,v
retrieving revision 1.2
diff -u -u -r1.2 PrinterResolutionSupported.java
--- gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java     
27 Apr 2010 21:24:02 -0000      1.2
+++ gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java     
28 Apr 2010 21:03:49 -0000
@@ -128,13 +128,13 @@
    * @see #getAssociatedAttribute()
    */
   public static PrinterResolution[]
-    getAssociatedAttributeArray(Set<PrinterResolutionSupported> set)
+    getAssociatedAttributeArray(Set<Attribute> set)
   {
     PrinterResolution[] result = new PrinterResolution[set.size()];
     int j = 0;
-    for (PrinterResolutionSupported tmp : set)
+    for (Attribute tmp : set)
       {
-        result[j] = tmp.getAssociatedAttribute();
+        result[j] = ((PrinterResolutionSupported) 
tmp).getAssociatedAttribute();
         j++;
       }
     return result;

Reply via email to