RE: Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java?

2020-02-13 Thread Patrick Zhang OS
Subject: Re: Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java? Hi Patrick, Private would be good, but since they are in a package-private class they are not visibile outside the package. If there is some other change to the class then fix it but otherwise

Re: Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java?

2020-02-13 Thread Roger Riggs
Hi Patrick, Private would be good, but since they are in a package-private class they are not visibile outside the package. If there is some other change to the class then fix it but otherwise not worth the overhead. Roger On 2/13/20 10:34 AM, Patrick Zhang OS wrote: Hi, A quick question,

Should indexOfLatin1Unsafe be private instead of public in java\lang\StringUTF16.java?

2020-02-13 Thread Patrick Zhang OS
Hi, A quick question, I read the code snippets of indexOf(String str), found indexOfUnsafe [1] and indexOfLatin1Unsafe [2] have different access control, but it looks both should be private. Did I miss any outer caller or any other restriction? Thanks for your comment. [1] private static int i