harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r649459 - in /harmony/enhanced/classlib/trunk/modules/misc/src/main: java/org/apache/harmony/misc/accessors/ObjectAccessor.java native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c
Date Fri, 18 Apr 2008 10:59:56 GMT
Author: tonywu
Date: Fri Apr 18 03:59:44 2008
New Revision: 649459

URL: http://svn.apache.org/viewvc?rev=649459&view=rev
Log:
Apply patch for HARMONY-5756 ([classlib][luni][performance] ObjectInputStream must use accessors
for instantiating objects)

Modified:
    harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java
    harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c

Modified: harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java?rev=649459&r1=649458&r2=649459&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java
Fri Apr 18 03:59:44 2008
@@ -64,7 +64,7 @@
      * This class complies to singleton pattern.
      */
     private static ObjectAccessor instance;
-    static ObjectAccessor getInstance() {
+    public static ObjectAccessor getInstance() {
         if (instance == null) {
             System.loadLibrary("accessors"); //$NON-NLS-1$
             instance = new ObjectAccessor();

Modified: harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c?rev=649459&r1=649458&r2=649459&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c
Fri Apr 18 03:59:44 2008
@@ -307,8 +307,13 @@
  */
 JNIEXPORT jobject JNICALL Java_org_apache_harmony_misc_accessors_ObjectAccessor_newInstance__Ljava_lang_Class_2J_3Ljava_lang_Object_2
 (JNIEnv *env, jobject accessorObj, jclass clss, jlong ctorID, jobjectArray args) {
-    jvalue* pargs = jarrayToValues(env, args);
-    jobject res = (*env)->NewObjectA(env, clss, (jmethodID)(intptr_t)ctorID, pargs);
+    jvalue *pargs = NULL;
+    jobject res;
+
+    if (args != NULL) {
+        pargs = jarrayToValues(env, args);
+    }
+    res = (*env)->NewObjectA(env, clss, (jmethodID)(intptr_t)ctorID, pargs);
     free(pargs);
     return res;
 }



Mime
View raw message