harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r601676 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main: java/java/io/FileDescriptor.java native/include/unix/jclprots.h native/include/windows/jclprots.h native/luni/shared/filedesc.c native/luni/windows/makefile
Date Thu, 06 Dec 2007 10:02:15 GMT
Author: tellison
Date: Thu Dec  6 02:02:14 2007
New Revision: 601676

URL: http://svn.apache.org/viewvc?rev=601676&view=rev
Log:
Change FileDescriptor#valid() from native to Java code.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileDescriptor.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/unix/jclprots.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/windows/jclprots.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/filedesc.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileDescriptor.java?rev=601676&r1=601675&r2=601676&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileDescriptor.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/FileDescriptor.java
Thu Dec  6 02:02:14 2007
@@ -93,5 +93,7 @@
      * @return <code>true</code> if this FileDescriptor is valid,
      *         <code>false</code> otherwise
      */
-    public native boolean valid();
+    public boolean valid() {
+        return descriptor != -1;
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/unix/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/unix/jclprots.h?rev=601676&r1=601675&r2=601676&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/unix/jclprots.h (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/unix/jclprots.h Thu
Dec  6 02:02:14 2007
@@ -228,7 +228,6 @@
 /* NativesCommonFileDescriptor*/
 void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass
fdClazz));
 void JNICALL Java_java_io_FileDescriptor_sync PROTOTYPE((JNIEnv * env, jobject recv));
-jboolean JNICALL Java_java_io_FileDescriptor_valid PROTOTYPE((JNIEnv * env, jobject recv));
 
 /* NativesCommonProcess*/
 jint JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_availableImpl
PROTOTYPE((JNIEnv * env, jobject recv));

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/windows/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/windows/jclprots.h?rev=601676&r1=601675&r2=601676&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/windows/jclprots.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/include/windows/jclprots.h
Thu Dec  6 02:02:14 2007
@@ -405,8 +405,6 @@
     PROTOTYPE ((JNIEnv * env, jclass fdClazz));
   JNIEXPORT void JNICALL Java_java_io_FileDescriptor_sync
     PROTOTYPE ((JNIEnv * env, jobject recv));
-  JNIEXPORT jboolean JNICALL Java_java_io_FileDescriptor_valid
-    PROTOTYPE ((JNIEnv * env, jobject recv));
     
   /* NativesCommonProcess*/
   JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_availableImpl

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/filedesc.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/filedesc.c?rev=601676&r1=601675&r2=601676&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/filedesc.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/filedesc.c Thu
Dec  6 02:02:14 2007
@@ -20,17 +20,6 @@
 #include "exceptions.h"
 #include "harmonyglob.h"
 
-JNIEXPORT jboolean JNICALL
-Java_java_io_FileDescriptor_valid (JNIEnv * env, jobject recv)
-{
-  /**
-    * Currently only answer false if the descriptor is -1.  Possibly there 
-    * could be an OS check to see if the handle has been invalidated 
-    */
-  void *descriptor = getJavaIoFileDescriptorContentsAsAPointer (env, recv);
-  return (IDATA) descriptor != -1;
-}
-
 JNIEXPORT void JNICALL
 Java_java_io_FileDescriptor_syncImpl (JNIEnv * env, jobject recv)
 {

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile?rev=601676&r1=601675&r2=601676&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/windows/makefile Thu
Dec  6 02:02:14 2007
@@ -53,6 +53,6 @@
   $(LIBPATH)hyfdlibm$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
 
 DLLBASE=0x13200000
-COMMENT=/comment:"LUNI component native code. (c) Copyright 1991, 2005 The Apache Software
Foundation or its licensors, as applicable."
+COMMENT=/comment:"LUNI component native code. (c) Copyright 1991, 2007 The Apache Software
Foundation or its licensors, as applicable."
 
 !include <$(HY_HDK)\build\make\rules.mak>



Mime
View raw message