harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r473160 - /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
Date Fri, 10 Nov 2006 01:38:25 GMT
Author: gshimansky
Date: Thu Nov  9 17:38:24 2006
New Revision: 473160

URL: http://svn.apache.org/viewvc?view=rev&rev=473160
Log:
Applied HARMONY-1932 [drlvm] ClassLoader.defineClass() method should throw LinkageError if
it's called more that once for the same class

Tests passed on ubuntu and windows xp


Modified:
    incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp

Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp?view=diff&rev=473160&r1=473159&r2=473160
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp Thu
Nov  9 17:38:24 2006
@@ -732,7 +732,6 @@
 {
     VM_thread* cur_thread = get_thread_ptr();
     LoadingClass* loading;
-    Class** pclss;
     Class* clss = NULL;
     m_lock._lock();
     do
@@ -741,12 +740,8 @@
             m_lock._unlock();
             return NULL;
         }
-        if((pclss = m_loadedClasses->Lookup(className)) != NULL) {
-            m_lock._unlock();
-            return *pclss;
-        }
         loading = m_loadingClasses->Lookup(className);
-        if(loading) {
+        if(loading && m_loadedClasses->Lookup(className) == NULL) {
             TRACE2("classloader.collisions", this << " " << cur_thread <<
" DC " << className->bytes);
             if(!loading->HasDefiner()) {
                 break;



Mime
View raw message