From 9d1e88f076eb4a08b3d0175495f2e11ee49d8ec2 Mon Sep 17 00:00:00 2001 From: aph Date: Mon, 12 Dec 2005 17:29:45 +0000 Subject: [PATCH] 2005-12-12 Andrew Haley * java/lang/VMCompiler.java: Directly generate a new instance of gnu.java.security.provider.MD5. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108421 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 5 +++++ libjava/java/lang/VMCompiler.java | 28 ++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index aef9f35..0f7225b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-12-12 Andrew Haley + + * java/lang/VMCompiler.java: Directly generate a new instance of + gnu.java.security.provider.MD5. + 2005-12-08 Andrew Haley PR libgcj/25265 diff --git a/libjava/java/lang/VMCompiler.java b/libjava/java/lang/VMCompiler.java index 27523f6..4792011 100644 --- a/libjava/java/lang/VMCompiler.java +++ b/libjava/java/lang/VMCompiler.java @@ -80,22 +80,18 @@ final class VMCompiler private static Vector precompiledMapFiles; // We create a single MD5 engine and then clone it whenever we want - // a new one. This is simpler than trying to find a new one each - // time, and it avoids potential deadlocks due to class loader - // oddities. - private static final MessageDigest md5Digest; - - static - { - try - { - md5Digest = MessageDigest.getInstance("MD5"); - } - catch (NoSuchAlgorithmException _) - { - md5Digest = null; - } - } + // a new one. + + // We don't use + // + // md5Digest = MessageDigest.getInstance("MD5"); + // + // here because that loads a great deal of security provider code as + // interpreted bytecode -- before we're able to use this class to + // load precompiled classes. + + private static final MessageDigest md5Digest + = new gnu.java.security.provider.MD5(); static { -- 2.7.4