[15] RFR: 8241311: Move some charset mapping tests from closed to open

naoto.sato at oracle.com naoto.sato at oracle.com
Tue Mar 24 01:06:13 UTC 2020


Hi Takiguchi-san,

On 3/23/20 5:48 AM, Ichiroh Takiguchi wrote:
> Hello Naoto.
> 
> I'm not reviewer, but I have a concern about following code
> on test/jdk/sun/nio/cs/mapping/TestConv.java
> ======
>   98             } catch (Exception ex) {
>   99                 System.out.println("Exception thrown while testing 
> " + encoding);
> 100                 ex.printStackTrace();
> 101                 return;
> 102             }
> ======
> 
> 3 stack trace (java.io.UnsupportedEncodingException) were displayed 
> against following encodings:
>    MS50221_0208, MS50221_0212, MS932_0208
> 
> I think only UnsupportedEncodingException should be caught.
> The other exception should be handled as error.
> 
> What do you think ?

Good catch. I believe the test logic that assumes the file name is the 
charset name is simply wrong. I added the check whether the input 
charset name is supported or not, and only do the test if the charset is 
supported:

http://cr.openjdk.java.net/~naoto/8241311/webrev.05/

Naoto

> 
> Thanks,
> Ichiroh Takiguchi
> 
> On 2020-03-21 01:21, naoto.sato at oracle.com wrote:
>> Hello,
>>
>> Please review the fix to the following issue:
>>
>> https://bugs.openjdk.java.net/browse/JDK-8241311
>>
>> The proposed changeset is located at:
>>
>> https://cr.openjdk.java.net/~naoto/8241311/webrev.04/
>>
>> This is simply to move some test cases that have been in closed
>> repository into open repository.
>>
>> Naoto


More information about the core-libs-dev mailing list