RFR: 8284910: Buffer clean in PasswordCallback [v2]

Xue-Lei Andrew Fan xuelei at openjdk.java.net
Mon Apr 18 15:25:36 UTC 2022


On Mon, 18 Apr 2022 14:33:35 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

> Please combine these closely related cases into a single test, preferably with TestNG or JUnit.
I normally prefer to have one job in one test, so that it is easier for debugging.  I'm fine to combine them as the cases are simple enough.

> test/jdk/javax/security/auth/callback/ClearPasswordMethod.java line 53:
> 
>> 51:             System.gc();
>> 52:             Thread.sleep(100);
>> 53:         }
> 
> The test could complete more quickly if the loop was exited when whm.size() == 0.
> And in the other test.

Good point.  It has been a concern to me to have the threads sleep. I will check other PRs, and add the size checking as well.

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

PR: https://git.openjdk.java.net/jdk/pull/8272



More information about the security-dev mailing list