[OpenJDK 2D-Dev] [9] RFR JDK-6357887: selected printertray is ignored under linux
Philip Race
philip.race at oracle.com
Thu Aug 18 22:06:24 UTC 2016
Oh .. right under the covers the map is just a HashMap
and the key to the map is the class so just decides if these are
equal class objects. Hmm .. I don't know anymore if that was the
original intent
but we probably should not mess with it right now just for the optimisation.
But now I am wondering why it has to be CustomMediaTray and not just
MediaTray ... although I suspect that in the case of CUPS we are not
ever mapping the media to standard ones, so they are always custom.
That might be arise as a problem in the case of your other open review
regarding
validating the margins. I'll comment on that in that review but still surely
any MediaTray is what you would want here but it is probably moot if
you don't ever get a standard one. Please check into this and confirm
what I suspect .. or not ...
-phil.
On 8/17/16, 11:41 PM, Prasanta Sadhukhan wrote:
> MediaTray values are bundled with "Media" attribute so calling
> attributes.get(CustomMediatray.class) returns null.
> Modified webrev to get Media attribute and then see if the attribute
> is an instance of CustomMediatray.
>
> http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.01/
>
> Regards
> Prasanta
> On 8/17/2016 9:09 PM, Philip Race wrote:
>> This all looks fine although this can be a simple call to
>> attributes.get(CustomMediaTray.class) can't it ?
>>
>> 502 for (int i=0; i< attrs.length; i++) {
>> 503 Attribute attr = attrs[i];
>> 504 try {
>> 505 if (attr instanceof CustomMediaTray) {
>> 506 CustomMediaTray customTray =
>> (CustomMediaTray)attr;
>> 507 mOptions = " InputSlot="+
>> customTray.getChoiceName();
>> 508 }
>> 509 } catch (ClassCastException e) {
>>
>> -phil.
>>
>> On 8/10/16, 1:59 AM, Prasanta Sadhukhan wrote:
>>> Hi All,
>>>
>>> Please review a fix for an issue where it is seen that the selected
>>> printer tray is ignored in linux and default standard tray is used
>>> for printing.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-6357887
>>> webrev: http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.00/
>>>
>>> Issue was lpr command needs "-o InputSlot=<trayname>" to select the
>>> printertray which was not being passed to lpr command.
>>> Proposed fix added InputSlot option to lpr command to select the
>>> printertray.
>>>
>>> Tested in ubuntu and solaris11.
>>>
>>> Regards
>>> Prasanta
>
More information about the 2d-dev
mailing list