On Sat, 15 Mar 2025 23:30:21 GMT, Markus KARG <d...@openjdk.org> wrote:
> Some good reason to *not* adopt my proposal? I am still afraid of such a pattern in the future like: CharSequence cs = ... if (cs.getClass().getModule() == Object.class.getModule()) { // or cs.getClass().getClassLoader() == null cs.getChars(...); } else { // damn, can't trust an arbitrary char sequence! char[] intermediate = ... cs.getChars(...); // copy from intermediate etc. } ------------- PR Comment: https://git.openjdk.org/jdk/pull/21730#issuecomment-2727862188