You see, you now have
102 MediaTray mt = null;
114 return( mt);
This can be just return null;
No need for new webrev for that, +1.
Vadim
On 25.08.2016 19:14, Prasanta Sadhukhan wrote:
On 8/25/2016 7:29 PM, Vadim Pakhnushev wrote:
In the PSPrinterJob.java customTray.getChoic
On 8/25/2016 7:29 PM, Vadim Pakhnushev wrote:
In the PSPrinterJob.java customTray.getChoiceName() is not checked for
null but in the UnixPrintJob it is checked.
Could this be a problem?
Checked for null just to be safe and simplified test method
Modified webrev
http://cr.openjdk.java.net/~ps
In the PSPrinterJob.java customTray.getChoiceName() is not checked for
null but in the UnixPrintJob it is checked.
Could this be a problem?
The getMediaTray method in the test could be simplified to
for (Media m : media) {
if (m instanceof MediaTray) {
if (m.toString().trim()...) {
+1
-phil
On 8/24/16, 11:27 PM, Prasanta Sadhukhan wrote:
Thanks Phil for the comments.
Modified webrev:
http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.02/
Regards
Prasanta
On 8/25/2016 12:05 AM, Phil Race wrote:
In fact what you should be doing here is
Attribute attr = attrs.get(Media.
Thanks Phil for the comments.
Modified webrev:
http://cr.openjdk.java.net/~psadhukhan/6357887/webrev.02/
Regards
Prasanta
On 8/25/2016 12:05 AM, Phil Race wrote:
In fact what you should be doing here is
Attribute attr = attrs.get(Media.class);
if (attr instanceof CustomMediaTray)
The progr
In fact what you should be doing here is
Attribute attr = attrs.get(Media.class);
if (attr instanceof CustomMediaTray)
The program below should show that the lookup works so long as the key
is the class understood by the API - not a sub-type.
-phil.
import javax.print.*;
import javax.print.
On 8/19/2016 3:36 AM, Philip Race wrote:
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 ju
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 wonde
On 8/18/2016 12:11 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.n
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
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
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 c
12 matches
Mail list logo