RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]
Johannes Döbler
duke at openjdk.org
Tue Jun 17 07:54:33 UTC 2025
On Mon, 16 Jun 2025 17:30:12 GMT, Justin Lu <jlu at openjdk.org> wrote:
>> Please review this PR which finishes Applet removal for the test: jdk/internal/loader/URLClassPath/ClassnameCharTest.java.
>>
>> `testclasses.jar` is updated such that the two classes no longer extend Applet.
>>
>>
>> $ javap fo\ o.class
>> public class fo o {
>> }
>> $ javap æ$'\302\211'$'\302\213'å$'\302\206'$'\302\214'.class
>> public class 手册 {
>> }
>>
>>
>> The bug description of [JDK-8358729](https://bugs.openjdk.org/browse/JDK-8358729) contains the original `javap` output for those classes.
>>
>> Additionally, the security APIs that were marked for removal are also removed from this test as well.
>
> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>
> Review suggestion - read class file from memory as bytes
test/jdk/jdk/internal/loader/URLClassPath/ClassnameCharTest.java line 101:
> 99: // final String path = name.replace('.', '/').concat(".class").concat(cookie);
> 100: String encodedName = ParseUtil.encodePath(name.replace('.', '/'), false);
> 101: final String path = (new StringBuffer(encodedName)).append(".class").append(cookie).toString();
Suggestion: `final String path = encodedName + ".class" + cookie;`, avoiding StringBuffer
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25703#discussion_r2151577656
More information about the core-libs-dev
mailing list