mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 09:40:10 +00:00
8170578: CUPS Printing is broken with Ubuntu 16.10 (CUPS 2.2)
Reviewed-by: prr
This commit is contained in:
parent
ef7192a7b8
commit
2679fdea07
@ -59,6 +59,7 @@ import java.nio.charset.Charset;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class IPPPrintService implements PrintService, SunPrinterJobService {
|
||||
@ -1758,6 +1759,19 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
|
||||
|
||||
if (responseMap != null && responseMap.length > 0) {
|
||||
getAttMap = responseMap[0];
|
||||
// If there is extra hashmap created due to duplicate
|
||||
// key/attribute present in IPPresponse, then use that
|
||||
// map too by appending to getAttMap after removing the
|
||||
// duplicate key/value
|
||||
if (responseMap.length > 1) {
|
||||
for (int i = 1; i < responseMap.length; i++) {
|
||||
for (Map.Entry<String, AttributeClass> entry : responseMap[i].entrySet()) {
|
||||
if (!getAttMap.containsKey(entry.getValue())) {
|
||||
getAttMap.put(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug_println(debugPrefix+"opGetAttributes - null input stream");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
@test
|
||||
@bug 8042713
|
||||
@bug 8042713 8170578
|
||||
@summary Print Dialog does not update attribute set with page range
|
||||
@run main/manual PrintAttributeUpdateTest
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user