-
Bug
-
Resolution: Fixed
-
P3
-
1.4.0
-
None
-
beta2
-
generic
-
generic
Documentation says getSupportedAttributeValues for Copies should return CopiesSupported not Copies. Because of this, the code below results in ClassCastException.
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
public class GetCopiesSupported {
public static void main(String args[]) {
PrintService service = PrintServiceLookup.lookupDefaultPrintService();
if (service != null) {
CopiesSupported c = (CopiesSupported)
service.getSupportedAttributeValues(Copies.class,
null, null);
System.out.println("CopiesSupported : "+c);
}
}
}
import javax.print.*;
import javax.print.attribute.*;
import javax.print.attribute.standard.*;
public class GetCopiesSupported {
public static void main(String args[]) {
PrintService service = PrintServiceLookup.lookupDefaultPrintService();
if (service != null) {
CopiesSupported c = (CopiesSupported)
service.getSupportedAttributeValues(Copies.class,
null, null);
System.out.println("CopiesSupported : "+c);
}
}
}