harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574593 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/ois.c
Date Tue, 11 Sep 2007 13:27:44 GMT
Author: hindessm
Date: Tue Sep 11 06:27:43 2007
New Revision: 574593

URL: http://svn.apache.org/viewvc?rev=574593&view=rev
Log:
Avoid another JNI check warning.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/ois.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/ois.c?rev=574593&r1=574592&r2=574593&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/ois.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/ois.c Tue Sep
11 06:27:43 2007
@@ -174,7 +174,14 @@
     }
   else
     {
-      return (jobject) (*env)->NewObject (env, instantiationClass, mid);        /* Instantiate
an object of a given class */
+      /* Instantiate an object of a given class and constuct it using
+         the constructor of the other class. */
+      jobject obj;
+      obj = (*env)->AllocObject(env, instantiationClass);
+      if (obj != NULL) {
+        (*env)->CallVoidMethod(env, obj, mid);
+      }
+      return obj;
     }
 
 }



Mime
View raw message