src/solaris/classes/sun/print/IPPPrintService.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -72,12 +72,11 @@
}
private static final String FORCE_PIPE_PROP = "sun.print.ippdebug";
static {
- String debugStr =
- (String)java.security.AccessController.doPrivileged(
+ String debugStr = java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction(FORCE_PIPE_PROP));
debugPrint = "true".equalsIgnoreCase(debugStr);
}
@@ -422,11 +421,11 @@
"initAttributes, error creating CUPSPrinter e="+e);
}
}
// use IPP to get all media,
- Media[] allMedia = (Media[])getSupportedMedia();
+ Media[] allMedia = getSupportedMedia();
ArrayList sizeList = new ArrayList();
ArrayList trayList = new ArrayList();
for (int i=0; i<allMedia.length; i++) {
if (allMedia[i] instanceof MediaSizeName) {
sizeList.add(allMedia[i]);
@@ -932,12 +931,11 @@
public CustomMediaSizeName findCustomMedia(MediaSizeName media) {
if (customMediaSizeNames == null) {
return null;
}
for (int i=0; i< customMediaSizeNames.length; i++) {
- CustomMediaSizeName custom =
- (CustomMediaSizeName)customMediaSizeNames[i];
+ CustomMediaSizeName custom = customMediaSizeNames[i];
MediaSizeName msn = custom.getStandardMedia();
if (media.equals(msn)) {
return customMediaSizeNames[i];
}
}