[OpenJDK 2D-Dev]  RFR JDK-8170578: The Pages Range From in print dialog is disabled
prasanta.sadhukhan at oracle.com
Tue Jan 10 09:14:28 UTC 2017
On 1/10/2017 2:43 PM, Prasanta Sadhukhan wrote:
> Actually, in ubuntu16.10 attribute map did not have
> "page-ranges-supported" attribute because 2 attribute hashmap is
> created in IPPPrintService#readIPPResponse() and most of the supported
> attributes are part of the 2nd hashmap (responseMap)
> whereas only the 1st hashmap is utilised through responseMap
> As to why 2 hashmaps are created in ubuntu16.10, it is because
> readIPPResponse() checks if key is already present in existing map,
> then create a new hashmap through this code
> and in ubuntu16.10, some attributes (like
> pwg-raster-document-type-supported which is not there in ubuntu 14.04]
> are duplicated.
> Proposed fix is to check if there are more than 1 hashmaps, if it is,
> get the entries from those maps, remove duplicate entries and append
> to existing hashmap to get a consolidated map having all the IPP
Missing webrev link:
> On 12/21/2016 11:28 PM, Phil Race wrote:
>> So now I am very suspicious.
>> First (previous fix I reviewed) Job Sheets weren't supported on
>> 16.10, now its PageRanges.
>> I think this merits investigation of what is going on before we
>> commit this fix.
>> Why are attributes that have always been supported by CUPS suddenly
>> unavailable ?
>> And for the cases we image the pages ourselves, we can implement
>> internally, so for a normal PrinterJob it always can be supported ..
>> regardless of
>> what the printer says.
>> On 12/14/2016 09:50 PM, Prasanta Sadhukhan wrote:
>>> Hi All,
>>> Please review a testbug fix for jdk9 for an issue where it it seen
>>> that PageRanges option is disabled in printer dialog in ubuntu16.10.
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8170578
>>> webrev: http://cr.openjdk.java.net/~psadhukhan/8170578/webrev.00/
>>> Issue was, in ubuntu16.10 the attribute map [obtained here
>>> does not have
>>> "pageranges-supported" attribute returned by CUPS
>>> so this category is not added to supported categories
>>> so isAttributeCategorySupported() called by ServiceDialog returns false
>>> resulting in PageRanges option getting disabled.
>>> Fix is to check if PageRanges category is supported in underlying
>>> platform, only then proceed with the test.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the 2d-dev