Skip to content

Commit 877c34d

Browse files
authored
[java] use the correct base64 decoder (#11107)
use the correct decoder The slightly wrong decoder was used to decode base64, using this decoder will copy the byte array at the end of decoding. Using the correct one, based on the W3C WebDriver specification, will not copy the byte array after decoding it.
1 parent 7a20400 commit 877c34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/src/org/openqa/selenium/OutputType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public String toString() {
5555
OutputType<byte[]> BYTES = new OutputType<byte[]>() {
5656
@Override
5757
public byte[] convertFromBase64Png(String base64Png) {
58-
return Base64.getMimeDecoder().decode(base64Png);
58+
return Base64.getDecoder().decode(base64Png);
5959
}
6060

6161
@Override

0 commit comments

Comments
 (0)