This patch fixes a number of warnings due to a mismatch between our attribute implementation and the interface (getCategory now returns Class<? extends Attribute>) and the use of raw types in getAssociatedAttributeArray(Set).
The committed version also includes some automated whitespace cleanup, removing trailing whitespace and replacing tabs with spaces. They are omitted in the version attached here for clarity. 2010-04-27 Andrew John Hughes <ahug...@redhat.com> * gnu/javax/print/ipp/IppPrintService.java: Fix whitespace. Use correct generic type for printerAttr map. (getPrinterAttributeSet(Class<? extends Attribute>)): Add appropriate generic type. * gnu/javax/print/ipp/attribute/supported/CharsetSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/CompressionSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<CompressionSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<FinishingsSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java: Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<JobSheetsSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MediaSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<MediaSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java: Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/OperationsSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<OrientationRequestedSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<PrintQualitySupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java, Fix whitespace. (getCategory()): Fix return type. (getAssociatedAttributeArray(Set<PrinterResolutionSupported>)): Add generic type to set and use for-each loop. * gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/SidesSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java, Fix whitespace. (getCategory()): Fix return type. * gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java, Fix whitespace. (getCategory()): Fix return type. -- 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.2 diff -u -u -w -r1.2 IppPrintService.java --- gnu/javax/print/ipp/IppPrintService.java 27 Apr 2010 16:52:33 -0000 1.2 +++ gnu/javax/print/ipp/IppPrintService.java 27 Apr 2010 21:20:47 -0000 @@ -143,7 +143,7 @@ * IPP may return sets of attributes e.g. for supported * compression methods so we need to map to sets here. */ - private Map printerAttr; + private Map<Class<? extends Attribute>, Set<? extends Attribute>> printerAttr; /** The set of listeners.*/ private HashSet printServiceAttributeListener; @@ -249,7 +249,7 @@ * @param attributeClass the category * @return The set of attributes of the category. */ - private Set getPrinterAttributeSet(Class attributeClass) + private Set getPrinterAttributeSet(Class<? extends Attribute> attributeClass) { return (Set) printerAttr.get(attributeClass); } Index: gnu/javax/print/ipp/attribute/supported/CharsetSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/CharsetSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 CharsetSupported.java --- gnu/javax/print/ipp/attribute/supported/CharsetSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/CharsetSupported.java 27 Apr 2010 21:20:47 -0000 @@ -40,6 +40,7 @@ import gnu.javax.print.ipp.attribute.CharsetSyntax; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; /** @@ -69,7 +70,7 @@ * * @return The class <code>CharsetSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return CharsetSupported.class; } 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.1 diff -u -u -w -r1.1 CompressionSupported.java --- gnu/javax/print/ipp/attribute/supported/CompressionSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/CompressionSupported.java 27 Apr 2010 21:20:47 -0000 @@ -42,6 +42,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.Compression; @@ -90,7 +91,7 @@ * * @return The class <code>CompressionSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return CompressionSupported.class; } @@ -145,15 +146,13 @@ * * @see #getAssociatedAttribute() */ - public static Compression[] getAssociatedAttributeArray(Set set) + public static Compression[] + getAssociatedAttributeArray(Set<CompressionSupported> set) { - CompressionSupported tmp; Compression[] result = new Compression[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (CompressionSupported tmp : set) { - tmp = (CompressionSupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } Index: gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 DocumentFormatSupported.java --- gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/DocumentFormatSupported.java 27 Apr 2010 21:20:48 -0000 @@ -40,6 +40,7 @@ import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.TextSyntax; @@ -73,7 +74,7 @@ * * @return The class <code>DocumentFormatSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return DocumentFormatSupported.class; } 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.1 diff -u -u -w -r1.1 FinishingsSupported.java --- gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/FinishingsSupported.java 27 Apr 2010 21:20:48 -0000 @@ -43,6 +43,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.Finishings; @@ -221,7 +222,7 @@ * * @return the class <code>FinishingsSupported</code> itself */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return FinishingsSupported.class; } @@ -286,15 +287,13 @@ * * @see #getAssociatedAttribute() */ - public static Finishings[] getAssociatedAttributeArray(Set set) + public static Finishings[] + getAssociatedAttributeArray(Set<FinishingsSupported> set) { - FinishingsSupported tmp; Finishings[] result = new Finishings[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (FinishingsSupported tmp : set) { - tmp = (FinishingsSupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } Index: gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 GeneratedNaturalLanguageSupported.java --- gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/GeneratedNaturalLanguageSupported.java 27 Apr 2010 21:20:48 -0000 @@ -40,6 +40,7 @@ import gnu.javax.print.ipp.attribute.NaturalLanguageSyntax; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; /** @@ -70,7 +71,7 @@ * * @return The class <code>GeneratedNaturalLanguageSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return GeneratedNaturalLanguageSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 IppVersionsSupported.java --- gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/IppVersionsSupported.java 27 Apr 2010 21:20:48 -0000 @@ -38,6 +38,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -78,11 +79,11 @@ } /** - * Returns category of this class. + * Returns the category of this class. * * @return The class <code>IppVersionsSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return IppVersionsSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 JobHoldUntilSupported.java --- gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/JobHoldUntilSupported.java 27 Apr 2010 21:20:48 -0000 @@ -40,6 +40,7 @@ import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.TextSyntax; @@ -115,7 +116,7 @@ * * @return The class <code>JobHoldUntilSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return JobHoldUntilSupported.class; } 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.1 diff -u -u -w -r1.1 JobSheetsSupported.java --- gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/JobSheetsSupported.java 27 Apr 2010 21:20:48 -0000 @@ -91,7 +91,7 @@ * * @return The class <code>JobSheetsSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return JobSheetsSupported.class; } @@ -130,21 +130,19 @@ * * @see #getAssociatedAttribute() */ - public static JobSheets[] getAssociatedAttributeArray(Set set) + public static JobSheets[] + getAssociatedAttributeArray(Set<JobSheetsSupported> set) { - JobSheetsSupported tmp; - ArrayList result = new ArrayList(); - Iterator it = set.iterator(); + ArrayList<JobSheets> result = new ArrayList<JobSheets>(); int j = 0; - while (it.hasNext()) + for (JobSheetsSupported tmp : set) { - tmp = (JobSheetsSupported) it.next(); - Attribute att = tmp.getAssociatedAttribute(); + JobSheets att = tmp.getAssociatedAttribute(); if (att != null) result.add(att); j++; } - return (JobSheets[]) result.toArray(new JobSheets[result.size()]); + return result.toArray(new JobSheets[result.size()]); } } 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.1 diff -u -u -w -r1.1 MediaSupported.java --- gnu/javax/print/ipp/attribute/supported/MediaSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/MediaSupported.java 27 Apr 2010 21:20:48 -0000 @@ -45,6 +45,7 @@ import java.util.Locale; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.TextSyntax; import javax.print.attribute.standard.Media; @@ -79,7 +80,7 @@ * * @return The class <code>MediaSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return MediaSupported.class; } @@ -99,20 +100,17 @@ * @param set set to process * @return The constructed array. */ - public static Media[] getAssociatedAttributeArray(Set set) + public static Media[] getAssociatedAttributeArray(Set<MediaSupported> set) { - MediaSupported tmp; Media tmp2; - ArrayList result = new ArrayList(); - Iterator it = set.iterator(); - while (it.hasNext()) + ArrayList<Media> result = new ArrayList<Media>(); + for (MediaSupported tmp : set) { - tmp = (MediaSupported) it.next(); tmp2 = (Media) IppUtilities.getEnumAttribute("media", tmp.toString()); if (tmp2 != null) result.add(tmp2); } - return (Media[]) result.toArray(new Media[result.size()]); + return result.toArray(new Media[result.size()]); } } 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.1 diff -u -u -w -r1.1 MultipleDocumentHandlingSupported.java --- gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/MultipleDocumentHandlingSupported.java 27 Apr 2010 21:20:48 -0000 @@ -42,6 +42,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.MultipleDocumentHandling; @@ -105,7 +106,7 @@ * * @return The class <code>MultipleDocumentHandlingSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return MultipleDocumentHandlingSupported.class; } @@ -160,15 +161,13 @@ * * @see #getAssociatedAttribute() */ - public static MultipleDocumentHandling[] getAssociatedAttributeArray(Set set) + public static MultipleDocumentHandling[] + getAssociatedAttributeArray(Set<MultipleDocumentHandlingSupported> set) { - MultipleDocumentHandlingSupported tmp; MultipleDocumentHandling[] result = new MultipleDocumentHandling[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (MultipleDocumentHandlingSupported tmp : set) { - tmp = (MultipleDocumentHandlingSupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } Index: gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 MultipleDocumentJobsSupported.java --- gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/MultipleDocumentJobsSupported.java 27 Apr 2010 21:20:48 -0000 @@ -38,6 +38,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -79,7 +80,7 @@ * * @return The class <code>MultipleDocumentJobsSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return MultipleDocumentJobsSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/OperationsSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/OperationsSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 OperationsSupported.java --- gnu/javax/print/ipp/attribute/supported/OperationsSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/OperationsSupported.java 27 Apr 2010 21:20:48 -0000 @@ -38,6 +38,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -186,7 +187,7 @@ * * @return The class <code>OperationsSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return OperationsSupported.class; } 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.1 diff -u -u -w -r1.1 OrientationRequestedSupported.java --- gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/OrientationRequestedSupported.java 27 Apr 2010 21:20:48 -0000 @@ -42,6 +42,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.OrientationRequested; @@ -97,7 +98,7 @@ * * @return The class <code>OrientationRequestedSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return OrientationRequestedSupported.class; } @@ -162,15 +163,13 @@ * * @see #getAssociatedAttribute() */ - public static OrientationRequested[] getAssociatedAttributeArray(Set set) + public static OrientationRequested[] + getAssociatedAttributeArray(Set<OrientationRequestedSupported> set) { - OrientationRequestedSupported tmp; OrientationRequested[] result = new OrientationRequested[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (OrientationRequestedSupported tmp : set) { - tmp = (OrientationRequestedSupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } Index: gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 PageRangesSupported.java --- gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/PageRangesSupported.java 27 Apr 2010 21:20:48 -0000 @@ -37,10 +37,10 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; - /** * <code>PageRangesSupported</code> is a boolean typed * attribute indicating (as EnumSyntax) if page ranges @@ -79,7 +79,7 @@ * * @return The class <code>PageRangesSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return PageRangesSupported.class; } 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.1 diff -u -u -w -r1.1 PrintQualitySupported.java --- gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/PrintQualitySupported.java 27 Apr 2010 21:20:48 -0000 @@ -42,6 +42,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.PrintQuality; @@ -89,7 +90,7 @@ * * @return The class <code>PrintQualitySupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return PrintQualitySupported.class; } @@ -154,15 +155,12 @@ * * @see #getAssociatedAttribute() */ - public static PrintQuality[] getAssociatedAttributeArray(Set set) + public static PrintQuality[] getAssociatedAttributeArray(Set<PrintQualitySupported> set) { - PrintQualitySupported tmp; PrintQuality[] result = new PrintQuality[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (PrintQualitySupported tmp : set) { - tmp = (PrintQualitySupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } 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.1 diff -u -u -w -r1.1 PrinterResolutionSupported.java --- gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/PrinterResolutionSupported.java 27 Apr 2010 21:20:48 -0000 @@ -40,6 +40,7 @@ import java.util.Iterator; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.ResolutionSyntax; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.standard.PrinterResolution; @@ -92,7 +93,7 @@ * * @return The class <code>PrinterResolutionSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return PrinterResolutionSupported.class; } @@ -126,15 +127,13 @@ * * @see #getAssociatedAttribute() */ - public static PrinterResolution[] getAssociatedAttributeArray(Set set) + public static PrinterResolution[] + getAssociatedAttributeArray(Set<PrinterResolutionSupported> set) { - PrinterResolutionSupported tmp; PrinterResolution[] result = new PrinterResolution[set.size()]; - Iterator it = set.iterator(); int j = 0; - while (it.hasNext()) + for (PrinterResolutionSupported tmp : set) { - tmp = (PrinterResolutionSupported) it.next(); result[j] = tmp.getAssociatedAttribute(); j++; } Index: gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 PrinterUriSupported.java --- gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/PrinterUriSupported.java 27 Apr 2010 21:20:48 -0000 @@ -40,6 +40,7 @@ import java.net.URI; +import javax.print.attribute.Attribute; import javax.print.attribute.SupportedValuesAttribute; import javax.print.attribute.URISyntax; @@ -70,7 +71,7 @@ * * @return The class <code>PrinterUriSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return PrinterUriSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/SidesSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/SidesSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 SidesSupported.java --- gnu/javax/print/ipp/attribute/supported/SidesSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/SidesSupported.java 27 Apr 2010 21:20:48 -0000 @@ -37,6 +37,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -98,7 +99,7 @@ * * @return The class <code>SidesSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return SidesSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 UriAuthenticationSupported.java --- gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/UriAuthenticationSupported.java 27 Apr 2010 21:20:48 -0000 @@ -38,6 +38,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -102,7 +103,7 @@ * * @return The class <code>UriAuthenticationSupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return UriAuthenticationSupported.class; } Index: gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java =================================================================== RCS file: /sources/classpath/classpath/gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java,v retrieving revision 1.1 diff -u -u -w -r1.1 UriSecuritySupported.java --- gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java 13 Mar 2006 18:56:15 -0000 1.1 +++ gnu/javax/print/ipp/attribute/supported/UriSecuritySupported.java 27 Apr 2010 21:20:48 -0000 @@ -38,6 +38,7 @@ package gnu.javax.print.ipp.attribute.supported; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -87,7 +88,7 @@ * * @return The class <code>UriSecuritySupported</code> itself. */ - public Class getCategory() + public Class<? extends Attribute> getCategory() { return UriSecuritySupported.class; }