summaryrefslogtreecommitdiff
path: root/gnu/javax/print/ipp/IppRequest.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2010-04-27 23:05:34 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2010-04-27 23:05:34 +0000
commit8fce69e48341afae076e42bd0ecf6c79537d0843 (patch)
tree0b78c4488c955bf903228844aa8d0ef4550ff629 /gnu/javax/print/ipp/IppRequest.java
parent69b6ad399ffc49ad436def3b67d74ccdc0198ef8 (diff)
downloadclasspath-8fce69e48341afae076e42bd0ecf6c79537d0843.tar.gz
Fix return value of getCategory() and mutability of private variables in RequestedAttributes.java.
2010-04-27 Andrew John Hughes <ahughes@redhat.com> * gnu/javax/print/ipp/IppRequest.java: (write(RequestedAttributes)): Fix for change in return value of RequestedAttributes.getValues(). * gnu/javax/print/ipp/attribute/DetailedStatusMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/DocumentAccessError.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/RequestedAttributes.java: (RequestedAttributes()): Use appropriate generic type with attributes ArrayList. (getValues()): Return an array-based snapshot of the current state of attributes rather than providing direct mutable access to it. * gnu/javax/print/ipp/attribute/StatusMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/UnknownAttribute.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/CopiesDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/DocumentFormatDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/FinishingsDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobHoldUntilDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobPriorityDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/JobSheetsDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/MediaDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/MultipleDocumentHandlingDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/NumberUpDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/OrientationRequestedDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/PrintQualityDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/PrinterResolutionDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/defaults/SidesDefault.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/AttributesCharset.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/AttributesNaturalLanguage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobDetailedStatusMessages.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobDocumentAccessErrors.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobId.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobMoreInfo.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobPrinterUri.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobStateMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/job/JobUri.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/CharsetConfigured.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/DocumentFormat.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/MultipleOperationTimeOut.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/NaturalLanguageConfigured.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterCurrentTime.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterDriverInstaller.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterStateMessage.java: (getCategory()): Fix return value. * gnu/javax/print/ipp/attribute/printer/PrinterUpTime.java: (getCategory()): Fix return value.
Diffstat (limited to 'gnu/javax/print/ipp/IppRequest.java')
-rw-r--r--gnu/javax/print/ipp/IppRequest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/gnu/javax/print/ipp/IppRequest.java b/gnu/javax/print/ipp/IppRequest.java
index 661f144aa..ae1f2c409 100644
--- a/gnu/javax/print/ipp/IppRequest.java
+++ b/gnu/javax/print/ipp/IppRequest.java
@@ -380,21 +380,21 @@ public class IppRequest
*/
private void write(RequestedAttributes attribute) throws IOException
{
- List values = attribute.getValues();
+ String[] values = attribute.getValues();
String name = ((Attribute) attribute).getName();
out.writeByte(IppValueTag.KEYWORD);
out.writeShort(name.length());
out.write(name.getBytes());
- out.writeShort(((String) values.get(0)).length());
- out.write(((String) values.get(0)).getBytes());
+ out.writeShort(values[0].length());
+ out.write(values[0].getBytes());
- for (int i=1; i < values.size(); i++)
+ for (int i=1; i < values.length; i++)
{
out.writeByte(IppValueTag.KEYWORD);
out.writeShort(0x0000); // length for additional value
- out.writeShort(((String) values.get(i)).length());
- out.write(((String) values.get(i)).getBytes());
+ out.writeShort(values[i].length());
+ out.write(values[i].getBytes());
}
}