Hi Vinnie
Why does this test run in /othervm mode?
Thanks
Max
Oh, is it possible to use a non-Secure Random?
Thanks
Max
On 06/15/2011 05:00 PM, Vincent Ryan wrote:
On 06/15/11 09:45, Weijun Wang wrote:
Hi Vinnie
Why does this test run in /othervm mode?
Thanks
Max
It was failing due to SecureRandom problems on some platforms when run in samevm
mode.
On 06/15/11 10:04, Weijun Wang wrote:
Oh, is it possible to use a non-Secure Random?
Since it's just a test: yes. Or even use fixed seed values and avoid
(Secure)Random entirely. The test was contributed so I didn't alter
it significantly.
Thanks
Max
On 06/15/2011 05:00 PM, Vincent
Now back to the original issue. My guess is that it was failing in
samevm mode because readClassFile leaves the file open and it would
be good to fix that. We might also need to do something with the
file mapping.
But the current test passes without closing the stream, even on Windows.
I
Weijun Wang wrote:
But the current test passes without closing the stream, even on
Windows. I guess it's because the file opened is not in scratch
directory and needs not be cleaned up.
If we have to close the stream/channel, it seems the references need
to saved in DummyClassLoader's
I've just tried
try (FileInputStream fin = new FileInputStream(f);
FileChannel fc = fin.getChannel()) {
return fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
}
and it succeeds.
So both the channel and stream can be closed and the file mapping is
still usable?
Changeset: 33e6291f3251
Author:darcy
Date: 2011-06-15 08:37 -0700
URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/33e6291f3251
7041252: Use j.u.Objects.equals in security classes
Reviewed-by: weijun
! src/share/classes/sun/security/tools/KeyTool.java
!