commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r828955 - in /commons/sandbox/runtime/trunk/src: main/native/include/acr_file.h main/native/shared/clazz.c main/native/shared/fco.c main/native/test/testcase.c test/org/apache/commons/runtime/TestPrivate.java
Date Fri, 23 Oct 2009 08:15:03 GMT
Author: mturk
Date: Fri Oct 23 08:15:02 2009
New Revision: 828955

URL: http://svn.apache.org/viewvc?rev=828955&view=rev
Log:
We don't have File instance any more

Modified:
    commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h
    commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
    commons/sandbox/runtime/trunk/src/main/native/shared/fco.c
    commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h?rev=828955&r1=828954&r2=828955&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_file.h Fri Oct 23 08:15:02 2009
@@ -240,16 +240,7 @@
  */
 ACR_DECLARE(int) ACR_FileProtectionGet(JNIEnv *_E, acr_pchar_t *fname);
 
-/** Create new File object with FileType set.
- * @param env JNI environment to use. If NULL no exception will be thrown
- *            if stat fails.
- * @param fname Abstract file name to use.
- * @param ftype File type.
- */
-ACR_DECLARE(jobject) ACR_IoFileObjectCreate(JNIEnv *_E, const acr_pchar_t *fname,
-                                            int ftype);
-
-                                            /** Create temporary unique file.
+/** Create temporary unique file.
  * @param env JNI environment to use. If NULL no exception will be thrown
  *            if stat fails.
  * @param tmpath Path where to create the file.

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c?rev=828955&r1=828954&r2=828955&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/clazz.c Fri Oct 23 08:15:02 2009
@@ -385,7 +385,6 @@
 ACR_CLASS_LDEC(Mutex);
 ACR_CLASS_LDEC(Semaphore);
 ACR_CLASS_LDEC(SharedMemory);
-ACR_CLASS_LDEC(io_File);
 ACR_CLASS_LDEC(io_FileInfo);
 ACR_CLASS_LDEC(io_MemoryMapProvider);
 ACR_CLASS_LDEC(io_Path);
@@ -404,7 +403,6 @@
     ACR_CLASS_LRUN(Mutex);
     ACR_CLASS_LRUN(Semaphore);
     ACR_CLASS_LRUN(SharedMemory);
-    ACR_CLASS_LRUN(io_File);
     ACR_CLASS_LRUN(io_FileInfo);
     ACR_CLASS_LRUN(io_MemoryMapProvider);
     ACR_CLASS_LRUN(io_Path);
@@ -429,7 +427,6 @@
     ACR_CLASS_URUN(Mutex);
     ACR_CLASS_URUN(Semaphore);
     ACR_CLASS_URUN(SharedMemory);
-    ACR_CLASS_URUN(io_File);
     ACR_CLASS_URUN(io_FileInfo);
     ACR_CLASS_URUN(io_MemoryMapProvider);
     ACR_CLASS_URUN(io_Path);

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/fco.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/fco.c?rev=828955&r1=828954&r2=828955&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/fco.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/fco.c Fri Oct 23 08:15:02 2009
@@ -31,51 +31,3 @@
 /**
  * Common File object
  */
-
-J_DECLARE_CLAZZ = {
-    NULL,
-    NULL,
-    ACR_IO_CLASS_PATH "File"
-};
-
-J_DECLARE_M_ID(0000) = {
-    NULL,
-    "<init>",
-    "(L" ACR_IO_CLASS_PATH "Path;I)V"
-};
-
-
-ACR_CLASS_LDEF(io_File)
-{
-    int rv;
-
-    if ((rv = ACR_LoadClass(_E, &_clazzn, 0)) != ACR_SUCCESS)
-        return rv;
-    J_LOAD_METHOD(0000);
-
-    return ACR_SUCCESS;
-}
-
-ACR_CLASS_UDEF(io_File)
-{
-    ACR_UnloadClass(_E, &_clazzn);
-}
-
-
-ACR_DECLARE(jobject) ACR_IoFileObjectCreate(JNIEnv *_E,
-                                            const acr_pchar_t *fname,
-                                            int ftype)
-{
-    if (_clazzn.i && J4MID(0000)) {
-        jobject path;
-        if ((path = ACR_NewPathObject(_E, ftype, fname)))
-            return (*_E)->NewObject(_E, _clazzn.i, J4MID(0000),
-                                    path, ftype);
-        else
-            return NULL;
-    }
-    else {
-        ACR_SET_OS_ERROR(ACR_ECLASSNOTFOUND);
-        return NULL;
-    }
-}

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testcase.c?rev=828955&r1=828954&r2=828955&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testcase.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testcase.c Fri Oct 23 08:15:02 2009
@@ -428,18 +428,9 @@
     RETURN_JWSTR(L"Hello world");
 }
 
-ACR_CLASS_LDEC(io_File);
-
-static int ldfile(JNIEnv *_E)
-{
-    ACR_CLASS_LRUN(io_File);
-    return 0;
-}
-
 ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test029)(ACR_JNISTDARGS, int d)
 {
-    ldfile(_E);
-    return ACR_IoFileObjectCreate(_E, _PTEXT("/tmp/foo"), -1);
+    return NULL;
 }
 
 ACR_JNI_EXPORT_DECLARE(void, TestPrivate, test030)(ACR_JNISTDARGS, int d)

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java?rev=828955&r1=828954&r2=828955&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java (original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestPrivate.java Fri
Oct 23 08:15:02 2009
@@ -85,7 +85,7 @@
     private static native Descriptor[] test027(int size);
 
     private static native String test028(int d);
-    private static native File   test029(int d);
+    private static native Object test029(int d);
 
     private static native void   test030(int d);
     private static native String[] test031(String s);
@@ -886,14 +886,6 @@
         assertEquals("Equals", "Hello world", s);
     }
 
-    public void testIoFile()
-        throws Throwable
-    {
-        File f = test029(0);
-        assertNotNull("File", f);
-        assertNotNull("File Path", f.getPath());
-    }
-
     // Some platforms become pretty unstable even on sucessful
     // handling of the SIGSEGV. The point is that this only
     // helps in determining the cause of the fault, so that



Mime
View raw message