@@ -511,11 +511,6 @@ private void initAttributes() {
511
511
512
512
513
513
public DocPrintJob createPrintJob () {
514
- @ SuppressWarnings ("removal" )
515
- SecurityManager security = System .getSecurityManager ();
516
- if (security != null ) {
517
- security .checkPrintJobAccess ();
518
- }
519
514
// REMIND: create IPPPrintJob
520
515
return new UnixPrintJob (this );
521
516
}
@@ -587,15 +582,7 @@ public DocPrintJob createPrintJob() {
587
582
if (flavor == null ||
588
583
flavor .equals (DocFlavor .SERVICE_FORMATTED .PAGEABLE ) ||
589
584
flavor .equals (DocFlavor .SERVICE_FORMATTED .PRINTABLE )) {
590
- try {
591
585
return new Destination ((new File ("out.ps" )).toURI ());
592
- } catch (SecurityException se ) {
593
- try {
594
- return new Destination (new URI ("file:out.ps" ));
595
- } catch (URISyntaxException e ) {
596
- return null ;
597
- }
598
- }
599
586
}
600
587
return null ;
601
588
} else if (category == Fidelity .class ) {
@@ -797,11 +784,7 @@ public DocPrintJob createPrintJob() {
797
784
return null ;
798
785
}
799
786
} else if (category == RequestingUserName .class ) {
800
- String userName = "" ;
801
- try {
802
- userName = System .getProperty ("user.name" , "" );
803
- } catch (SecurityException se ) {
804
- }
787
+ String userName = System .getProperty ("user.name" , "" );
805
788
return new RequestingUserName (userName , null );
806
789
} else if (category == Sides .class ) {
807
790
// The printer takes care of Sides so if short-edge
@@ -1574,15 +1557,7 @@ public boolean isAttributeValueSupported(Attribute attr,
1574
1557
} else if (category == Chromaticity .class ) {
1575
1558
return Chromaticity .COLOR ;
1576
1559
} else if (category == Destination .class ) {
1577
- try {
1578
- return new Destination ((new File ("out.ps" )).toURI ());
1579
- } catch (SecurityException se ) {
1580
- try {
1581
- return new Destination (new URI ("file:out.ps" ));
1582
- } catch (URISyntaxException e ) {
1583
- return null ;
1584
- }
1585
- }
1560
+ return new Destination ((new File ("out.ps" )).toURI ());
1586
1561
} else if (category == Fidelity .class ) {
1587
1562
return Fidelity .FIDELITY_FALSE ;
1588
1563
} else if (category == Finishings .class ) {
@@ -1674,11 +1649,7 @@ public boolean isAttributeValueSupported(Attribute attr,
1674
1649
return new PageRanges (1 , Integer .MAX_VALUE );
1675
1650
}
1676
1651
} else if (category == RequestingUserName .class ) {
1677
- String userName = "" ;
1678
- try {
1679
- userName = System .getProperty ("user.name" , "" );
1680
- } catch (SecurityException se ) {
1681
- }
1652
+ String userName = System .getProperty ("user.name" , "" );
1682
1653
return new RequestingUserName (userName , null );
1683
1654
} else if (category == SheetCollate .class ) {
1684
1655
return SheetCollate .UNCOLLATED ;
0 commit comments