Skip to content

Commit 0f406c4

Browse files
author
Justin Lu
committed
8369078: Fix faulty test conversion in IllegalCharsetName.java
Reviewed-by: naoto, alanb
1 parent 596af0a commit 0f406c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/jdk/java/nio/charset/Charset/IllegalCharsetName.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2010, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@ public void illegalCharsetsTest(String name) {
5050
assertThrows(IllegalCharsetNameException.class,
5151
() -> Charset.forName(name));
5252
assertThrows(IllegalCharsetNameException.class,
53-
() -> Charset.forName(name));
53+
() -> Charset.isSupported(name));
5454
}
5555

5656
// Charset.forName, Charset.isSupported, and the Charset constructor should
@@ -60,7 +60,7 @@ public void emptyCharsetsTest() {
6060
assertThrows(IllegalCharsetNameException.class,
6161
() -> Charset.forName(""));
6262
assertThrows(IllegalCharsetNameException.class,
63-
() -> Charset.forName(""));
63+
() -> Charset.isSupported(""));
6464
assertThrows(IllegalCharsetNameException.class,
6565
() -> new Charset("", new String[]{}) {
6666
@Override

0 commit comments

Comments
 (0)