提交 1b940b2e 编写于 作者: P prr

8035162: Service printing service

Reviewed-by: bae, jgodinez, mschoene
上级 f281bc22
...@@ -126,7 +126,7 @@ public class CUPSPrinter { ...@@ -126,7 +126,7 @@ public class CUPSPrinter {
/** /**
* Returns array of MediaSizeNames derived from PPD. * Returns array of MediaSizeNames derived from PPD.
*/ */
public MediaSizeName[] getMediaSizeNames() { MediaSizeName[] getMediaSizeNames() {
initMedia(); initMedia();
return cupsMediaSNames; return cupsMediaSNames;
} }
...@@ -135,7 +135,7 @@ public class CUPSPrinter { ...@@ -135,7 +135,7 @@ public class CUPSPrinter {
/** /**
* Returns array of Custom MediaSizeNames derived from PPD. * Returns array of Custom MediaSizeNames derived from PPD.
*/ */
public CustomMediaSizeName[] getCustomMediaSizeNames() { CustomMediaSizeName[] getCustomMediaSizeNames() {
initMedia(); initMedia();
return cupsCustomMediaSNames; return cupsCustomMediaSNames;
} }
...@@ -144,7 +144,7 @@ public class CUPSPrinter { ...@@ -144,7 +144,7 @@ public class CUPSPrinter {
/** /**
* Returns array of MediaPrintableArea derived from PPD. * Returns array of MediaPrintableArea derived from PPD.
*/ */
public MediaPrintableArea[] getMediaPrintableArea() { MediaPrintableArea[] getMediaPrintableArea() {
initMedia(); initMedia();
return cupsMediaPrintables; return cupsMediaPrintables;
} }
...@@ -152,7 +152,7 @@ public class CUPSPrinter { ...@@ -152,7 +152,7 @@ public class CUPSPrinter {
/** /**
* Returns array of MediaTrays derived from PPD. * Returns array of MediaTrays derived from PPD.
*/ */
public MediaTray[] getMediaTrays() { MediaTray[] getMediaTrays() {
initMedia(); initMedia();
return cupsMediaTrays; return cupsMediaTrays;
} }
......
...@@ -993,7 +993,9 @@ public class IPPPrintService implements PrintService, SunPrinterJobService { ...@@ -993,7 +993,9 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
public synchronized Class[] getSupportedAttributeCategories() { public synchronized Class[] getSupportedAttributeCategories() {
if (supportedCats != null) { if (supportedCats != null) {
return supportedCats; Class<?> [] copyCats = new Class<?>[supportedCats.length];
System.arraycopy(supportedCats, 0, copyCats, 0, copyCats.length);
return copyCats;
} }
initAttributes(); initAttributes();
...@@ -1050,7 +1052,9 @@ public class IPPPrintService implements PrintService, SunPrinterJobService { ...@@ -1050,7 +1052,9 @@ public class IPPPrintService implements PrintService, SunPrinterJobService {
} }
supportedCats = new Class[catList.size()]; supportedCats = new Class[catList.size()];
catList.toArray(supportedCats); catList.toArray(supportedCats);
return supportedCats; Class<?>[] copyCats = new Class<?>[supportedCats.length];
System.arraycopy(supportedCats, 0, copyCats, 0, copyCats.length);
return copyCats;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册