-
Bug
-
Resolution: Not an Issue
-
P4
-
9
-
None
Found suspicious code in the method sun.print.IPPPrintService#opGetAttributes which was introduced in JDK-8170578.
There is getAttMap field in IPPPrintService class.
private HashMap<String, AttributeClass> getAttMap;
And it used like this in 'opGetAttributes' method:
for (Map.Entry<String, AttributeClass> entry : responseMap[i].entrySet()) {
if (!getAttMap.containsKey(entry.getValue())) {
getAttMap.put(entry.getKey(), entry.getValue());
}
}
This call 'getAttMap.containsKey(entry.getValue())' will always result in false.
It seems it should be 'getAttMap.containsKey(entry.getKey())' instead.
There is getAttMap field in IPPPrintService class.
private HashMap<String, AttributeClass> getAttMap;
And it used like this in 'opGetAttributes' method:
for (Map.Entry<String, AttributeClass> entry : responseMap[i].entrySet()) {
if (!getAttMap.containsKey(entry.getValue())) {
getAttMap.put(entry.getKey(), entry.getValue());
}
}
This call 'getAttMap.containsKey(entry.getValue())' will always result in false.
It seems it should be 'getAttMap.containsKey(entry.getKey())' instead.
- relates to
-
JDK-8170578 CUPS Printing is broken with Ubuntu 16.10 (CUPS 2.2)
-
- Resolved
-