8167252: Some of Charset.availableCharsets() does not contain itself

Reviewed-by: bpb, alanb, iris, lancea, jpai
This commit is contained in:
Naoto Sato 2023-06-15 16:34:00 +00:00
parent 653a8d0cce
commit 3eeb681a0d
4 changed files with 37 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, 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
@ -45,6 +45,12 @@ abstract class Unicode extends Charset
|| (cs instanceof UTF_16BE)
|| (cs instanceof UTF_16LE)
|| (cs instanceof UTF_16LE_BOM)
|| (cs instanceof CESU_8)
|| (cs instanceof UTF_32)
|| (cs instanceof UTF_32BE)
|| (cs instanceof UTF_32BE_BOM)
|| (cs instanceof UTF_32LE)
|| (cs instanceof UTF_32LE_BOM)
|| (cs.name().equals("GBK"))
|| (cs.name().equals("GB18030"))
|| (cs.name().equals("ISO-8859-2"))