On Wed, 23 Jun 2021 19:31:15 GMT, Alexander Zuev <kiz...@openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/JPasswordField.java line 546:
>> 
>>> 544:         public String getAfterIndex(int part, int index) {
>>> 545:             if (part == AccessibleText.CHARACTER) {
>>> 546:                 return getEchoString(super.getAfterIndex(part, index));
>> 
>> I don't see how removing the local variable changes anything. Explanation ??
>
> Here it is just a slight code cleanup. We do not need additional variable for 
> passing value from one method to another. It serves no other purpose at all.

Let me ask it this way.
Does super.getAfterIndex(part, index) return a String with any of the password 
in clear text ? 
It seems to me like it might.

-------------

PR: https://git.openjdk.java.net/jdk17/pull/127

Reply via email to