harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r574588 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
Date Tue, 11 Sep 2007 13:07:37 GMT
Author: hindessm
Date: Tue Sep 11 06:07:36 2007
New Revision: 574588

URL: http://svn.apache.org/viewvc?rev=574588&view=rev
Log:
Avoid copying buffer if it has not been modified.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c?rev=574588&r1=574587&r2=574588&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSFileSystem.c
Tue Sep 11 06:07:36 2007
@@ -74,7 +74,8 @@
   if(result == -1 && hyerror_last_error_number() == HYPORT_ERROR_FILE_LOCKED){
     throwNewExceptionByName(env, "java/io/IOException", netLookupErrorString(env, HYPORT_ERROR_FILE_LOCKED));
   }
-  (*env)->ReleaseByteArrayElements (env, byteArray, bytes, 0);
+  (*env)->ReleaseByteArrayElements (env, byteArray, bytes,
+                                    result==0 || result==-1 ? JNI_ABORT : 0);
 
   return result;
 }



Mime
View raw message