You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2006/12/14 07:48:26 UTC

svn commit: r487009 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main/native: include/shared/vmi.h luni/shared/luniglob.c

Author: varlax
Date: Wed Dec 13 22:48:25 2006
New Revision: 487009

URL: http://svn.apache.org/viewvc?view=rev&rev=487009
Log:
Fixed vmi properties handling as agreed on dev list.
Tested with j9 and drlvm on SUSE9

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/vmi.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/vmi.h?view=diff&rev=487009&r1=487008&r2=487009
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/vmi.h (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/shared/vmi.h Wed Dec 13 22:48:25 2006
@@ -44,7 +44,8 @@
     VMI_ERROR_UNIMPLEMENTED = 2,        /**< Function has not been implemented */
     VMI_ERROR_UNSUPPORTED_VERSION = 3,  /**< The requested VM interface version is not supported */
     VMI_ERROR_OUT_OF_MEMORY = 4,        /**< Not enough memory was available to complete the request */
-    VMI_ERROR_NOT_FOUND = 5,            /**< The requested system property was not found */
+    VMI_ERROR_ILLEGAL_ARG = 5,          /**< An attempt to set illegal value 
+                                        (e.g. NULL value is not allowed in system properties) */
     VMI_ERROR_READ_ONLY = 6,            /**< An attempt was made to modify a read-only item */
     vmiErrorEnsureWideEnum = 0x1000000  /* ensure 4-byte enum */
   } vmiError;

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?view=diff&rev=487009&r1=487008&r2=487009
==============================================================================
--- 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 Dec 13 22:48:25 2006
@@ -274,9 +274,14 @@
             BOOTCLASSPATH_PROPERTY,
             &bootstrapClassPath);
 
-        /* Gregory - no property is found, VM bootclasspath is not defined */
-        if (VMI_ERROR_NONE != rcGetProperty)
-            bootstrapClassPath = NULL;
+        if (VMI_ERROR_NONE != rcGetProperty) {
+            returnCode = JNI_ERR;
+            goto cleanup;
+        }
+        if (!bootstrapClassPath) {
+            /* no such property yet */
+            bootstrapClassPath = "";
+        }
 
         qsort(props, number, sizeof(key_value_pair), props_compare);