harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574944 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared: file.c luniglob.c
Date Wed, 12 Sep 2007 13:19:01 GMT
Author: hindessm
Date: Wed Sep 12 06:19:00 2007
New Revision: 574944

URL: http://svn.apache.org/viewvc?rev=574944&view=rev
Log:
Use non-weak reference to avoid JNI check error - which also means the
local reference to the same class is redundant.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c?rev=574944&r1=574943&r2=574944&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/file.c Wed Sep
12 06:19:00 2007
@@ -124,10 +124,6 @@
     return NULL;
 
   javaClass = HARMONY_CACHE_GET (env, CLS_array_of_byte);
-  javaClass = (*env)->NewLocalRef(env, javaClass);
-  if (javaClass == NULL) {
-      return NULL;
-  }
   answer =
     (*env)->NewObjectArray (env, numEntries, javaClass, NULL);
 cleanup:
@@ -444,7 +440,7 @@
   jclass arrayClass = (*env)->FindClass (env, "[B");
   if (arrayClass)
     {
-      jobject globalRef = (*env)->NewWeakGlobalRef (env, arrayClass);
+      jobject globalRef = (*env)->NewGlobalRef (env, arrayClass);
       if (globalRef)
         HARMONY_CACHE_SET (env, CLS_array_of_byte, globalRef);
     }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c?rev=574944&r1=574943&r2=574944&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/luniglob.c Wed
Sep 12 06:19:00 2007
@@ -432,5 +432,5 @@
 
   classRef = HARMONY_CACHE_GET (env, CLS_array_of_byte);
   if (classRef)
-    (*env)->DeleteWeakGlobalRef (env, (jweak) classRef);
+    (*env)->DeleteGlobalRef (env, classRef);
 }



Mime
View raw message