mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8216140: Correct UnicodeDecoder U+FFFE handling
Reviewed-by: rriggs
This commit is contained in:
parent
b8bf6b95a3
commit
1dc9d4d9cb
2 changed files with 76 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2019, 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
|
||||
|
@ -91,11 +91,6 @@ abstract class UnicodeDecoder extends CharsetDecoder {
|
|||
|
||||
char c = decode(b1, b2);
|
||||
|
||||
if (c == REVERSED_MARK) {
|
||||
// A reversed BOM cannot occur within middle of stream
|
||||
return CoderResult.malformedForLength(2);
|
||||
}
|
||||
|
||||
// Surrogates
|
||||
if (Character.isSurrogate(c)) {
|
||||
if (Character.isHighSurrogate(c)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue