harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r803102 [2/2] - in /harmony/enhanced/classlib/branches/java6: ./ depends/jars/ make/ modules/accessibility/ modules/annotation/ modules/applet/ modules/archive/ modules/archive/src/main/native/archive/shared/ modules/auth/ modules/auth/src/...
Date Tue, 11 Aug 2009 13:07:59 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c Tue Aug 11 13:07:55 2009
@@ -19,7 +19,6 @@
 #include "vmi.h"
 #include "nethelp.h"
 #include "helpers.h"
-#include "jclprots.h"
 #include "hysock.h"
 #include "socket.h"
 #include "harmonyglob.h"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/file.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/file.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/file.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/file.c Tue Aug 11 13:07:55 2009
@@ -21,7 +21,6 @@
 #include "exceptions.h"
 #include "harmonyglob.h"
 #include "helpers.h"
-#include "jclprots.h"
 
 void
 throwPathTooLongIOException(JNIEnv *env, jsize length)

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/inetadds.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/inetadds.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/inetadds.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/inetadds.c Tue Aug 11 13:07:55 2009
@@ -16,7 +16,6 @@
  */
 
 #include <stdlib.h>
-#include "jclprots.h"
 #include "nethelp.h"
 #include "hysock.h"
 #include "harmonyglob.h"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/luniglob.c Tue Aug 11 13:07:55 2009
@@ -29,6 +29,7 @@
 #include "hyport.h"
 #include "strhelp.h"
 #include "hycomp.h"
+#include "helpers.h"
 
 static UDATA keyInitCount = 0;
 
@@ -52,6 +53,8 @@
   VMInterface *vmInterface;
   char *bootPath = NULL;
   char *propVal = NULL;
+#define CHARSETBUFF 64
+  char charset[CHARSETBUFF];
   vmiError propRes;
 
   /* Query the VM interface */
@@ -156,7 +159,8 @@
        (*vmInterface)->GetSystemProperty (vmInterface, "file.encoding", &propVal);
        if (propVal == NULL) {
            /* FIXME provide appropriate non-dummy value */
-           propRes = (*vmInterface)->SetSystemProperty (vmInterface, "file.encoding", "8859_1");
+           getOSCharset(charset, CHARSETBUFF);
+           propRes = (*vmInterface)->SetSystemProperty (vmInterface, "file.encoding", charset);
            if (VMI_ERROR_NONE != propRes) {
                /* goto fail2; */
            }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/netif.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/netif.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/netif.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/netif.c Tue Aug 11 13:07:55 2009
@@ -16,7 +16,6 @@
 */
 
 #include "nethelp.h"
-#include "jclprots.h"
 #include "helpers.h"
 #include "harmonyglob.h"
 #include "hysock.h"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/socket.c Tue Aug 11 13:07:55 2009
@@ -16,7 +16,6 @@
  */
 
 #include "nethelp.h"
-#include "jclprots.h"
 #include "helpers.h"
 #include "harmonyglob.h"
 #include "hysock.h"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.c Tue Aug 11 13:07:55 2009
@@ -993,3 +993,41 @@
       mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
   return chmod (path, mode) == 0;
 }
+
+/* Get charset from the OS */
+void getOSCharset(char *locale, const size_t size) {
+  char * codec = NULL;
+  size_t cur = 0;
+  short flag = 0;
+  setlocale(LC_CTYPE, "");
+  codec = setlocale(LC_CTYPE, NULL);
+  // get codeset from language[_territory][.codeset][@modifier]
+  while (*codec) {
+    if (!flag) {
+      if (*codec != '.') {
+        codec++;
+        continue;
+      } else {
+        flag = 1;
+        codec++;
+      }
+    } else {
+      if (*codec == '@') {
+        break;
+      } else {
+        locale[cur++] = (*codec);
+        codec++;
+        if (cur >= size) {
+          // Not enough size
+          cur = 0;
+          break;
+        }
+      }
+    }
+  }
+  locale[cur] = '\0';
+  if (!strlen(locale)) {
+    strcpy(locale, "8859_1");
+  }
+  return;
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.h?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/helpers.h Tue Aug 11 13:07:55 2009
@@ -70,5 +70,6 @@
 I_32 getPlatformIsExecutable (JNIEnv * env, char *path);
 I_32 setPlatformExecutable (JNIEnv * env, char *path, jboolean executable, jboolean ownerOnly);
 I_32 hasPrivilegeInOtherGroups(JNIEnv * env, struct stat * buffer, mode_t attr);
+void getOSCharset(char *locale, const size_t size);
 #endif /* helpers_h */
 

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/procimpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/procimpl.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/procimpl.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/unix/procimpl.c Tue Aug 11 13:07:55 2009
@@ -33,6 +33,13 @@
 extern char **environ;
 #endif
 
+#ifdef ZOS
+#define FD_BIAS 1000
+#include <sys/socket.h>
+#else
+#define FD_BIAS 0
+#endif /* ZOS */
+
 #include <sys/wait.h>
 
 #include "procimpl.h"
@@ -131,14 +138,25 @@
   int error = 0;
   int writeRC = 0;
 
-  /* Build the new io pipes (in/out/err) */
-  if (pipe(newFD[0]) == -1) goto error;
-  if (pipe(newFD[1]) == -1) goto error;
-  if (pipe(newFD[2]) == -1) goto error;
-
-  /* pipes for synchronization */
-  if (pipe(forkedChildIsRunning) == -1) goto error;
-  if (pipe(execvFailure) == -1) goto error;
+  #ifdef ZOS
+    /* Build the new io pipes (in/out/err) */
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[0]) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[1]) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,newFD[2]) == -1) goto error;
+
+    /* pipes for synchronization */
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,forkedChildIsRunning) == -1) goto error;
+    if(socketpair(AF_UNIX,SOCK_STREAM,0,execvFailure) == -1) goto error;       
+  #else
+     /* Build the new io pipes (in/out/err) */
+    if (pipe(newFD[0]) == -1) goto error;
+    if (pipe(newFD[1]) == -1) goto error;
+    if (pipe(newFD[2]) == -1) goto error;
+
+    /* pipes for synchronization */
+    if (pipe(forkedChildIsRunning) == -1) goto error;
+    if (pipe(execvFailure) == -1) goto error;  
+  #endif /* ZOS */
 
   cmd = command[0];
 
@@ -151,7 +169,8 @@
   if (grdpid == -1) goto error;
 
   if (grdpid == 0) {
-#ifndef ZOS
+    char dummy = '\0';
+
     /* Close file descriptors that are not used */
     close(newFD[0][1]);
     close(newFD[1][0]);
@@ -165,10 +184,8 @@
     setCloseOnExec(newFD[2][1]);
     setCloseOnExec(forkedChildIsRunning[1]);
     setCloseOnExec(execvFailure[1]);
-#endif /* ZOS */
 
     /* Redirect pipes so grand-child inherits new pipes */
-    char dummy = '\0';
     dup2(newFD[0][0], 0);
     dup2(newFD[1][1], 1);
     dup2(newFD[2][1], 2);
@@ -211,9 +228,9 @@
     close(newFD[1][1]);
     close(newFD[2][1]);
     /* Store the rw handles to the childs io */
-    *(inHandle) = (IDATA) newFD[0][1];
-    *(outHandle) = (IDATA) newFD[1][0];
-    *(errHandle) = (IDATA) newFD[2][0];
+    *(inHandle) = (IDATA) newFD[0][1] + FD_BIAS;
+    *(outHandle) = (IDATA) newFD[1][0] + FD_BIAS;
+    *(errHandle) = (IDATA) newFD[2][0] + FD_BIAS;
     *(procHandle) = (IDATA) grdpid;
 
     /* let the forked child start. */
@@ -327,7 +344,7 @@
 getAvailable(IDATA sHandle)
 {
   int avail, rc;
-  rc = ioctl((int) sHandle, FIONREAD, &avail);
+  rc = ioctl((int) sHandle - FD_BIAS, FIONREAD, &avail);
   if (rc == -1)
     return -2;
   return avail;

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/OSNetworkSystemWin32.c Tue Aug 11 13:07:55 2009
@@ -17,7 +17,6 @@
 
 #include "vmi.h"
 #include "helpers.h"
-#include "jclprots.h"
 #include "socket.h"
 #include "harmonyglob.h"
 #include "OSNetworkSystem.h"

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.c Tue Aug 11 13:07:55 2009
@@ -29,8 +29,8 @@
 #include <direct.h>
 
 #include "vmi.h"
-#include "jclprots.h"
 #include "harmonyglob.h"
+#include "charsetmap.h"
 
 #include "helpers.h"
 #include "hysock.h"
@@ -1048,3 +1048,21 @@
 	return 0;
 }
 
+/* Get charset from the OS */
+void getOSCharset(char *locale, const size_t size) {
+  size_t cp;
+  DWORD holder;
+#if defined(_WIN32_WCE)
+  LCID localeId = GetUserDefaultLCID();
+#else
+  LCID localeId = GetThreadLocale();
+#endif
+  if (0 < GetLocaleInfo(localeId, LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
+                        (LPTSTR)&holder, sizeof(holder) / sizeof(TCHAR))) {
+    cp = (size_t)holder;
+  } else {
+    cp = (size_t)GetACP();
+  }
+  getCharset(cp, locale, size);
+  return;
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.h?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/windows/helpers.h Tue Aug 11 13:07:55 2009
@@ -64,4 +64,5 @@
 jbyteArray getPlatformHardwareAddress(JNIEnv * env, jstring ifname, jint index);
 I_32 getPlatformInterfaceAddresses(JNIEnv * env, jstring ifname, jint index, interfaceAddressArray_struct* interfaceAddressArray);
 I_32 freeInterfaceAddressArray(JNIEnv * env, struct interfaceAddressArray_struct * array);
+void getOSCharset(char *locale, const size_t size);
 #endif /* helpers_h */

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedReaderTest.java Tue Aug 11 13:07:55 2009
@@ -35,6 +35,38 @@
 
 	String testString = "Test_All_Tests\nTest_java_io_BufferedInputStream\nTest_java_io_BufferedOutputStream\nTest_java_io_ByteArrayInputStream\nTest_java_io_ByteArrayOutputStream\nTest_java_io_DataInputStream\nTest_java_io_File\nTest_java_io_FileDescriptor\nTest_java_io_FileInputStream\nTest_java_io_FileNotFoundException\nTest_java_io_FileOutputStream\nTest_java_io_FilterInputStream\nTest_java_io_FilterOutputStream\nTest_java_io_InputStream\nTest_java_io_IOException\nTest_java_io_OutputStream\nTest_java_io_PrintStream\nTest_java_io_RandomAccessFile\nTest_java_io_SyncFailedException\nTest_java_lang_AbstractMethodError\nTest_java_lang_ArithmeticException\nTest_java_lang_ArrayIndexOutOfBoundsException\nTest_java_lang_ArrayStoreException\nTest_java_lang_Boolean\nTest_java_lang_Byte\nTest_java_lang_Character\nTest_java_lang_Class\nTest_java_lang_ClassCastException\nTest_java_lang_ClassCircularityError\nTest_java_lang_ClassFormatError\nTest_java_lang_ClassLoader\nTest_java_lang_Clas
 sNotFoundException\nTest_java_lang_CloneNotSupportedException\nTest_java_lang_Double\nTest_java_lang_Error\nTest_java_lang_Exception\nTest_java_lang_ExceptionInInitializerError\nTest_java_lang_Float\nTest_java_lang_IllegalAccessError\nTest_java_lang_IllegalAccessException\nTest_java_lang_IllegalArgumentException\nTest_java_lang_IllegalMonitorStateException\nTest_java_lang_IllegalThreadStateException\nTest_java_lang_IncompatibleClassChangeError\nTest_java_lang_IndexOutOfBoundsException\nTest_java_lang_InstantiationError\nTest_java_lang_InstantiationException\nTest_java_lang_Integer\nTest_java_lang_InternalError\nTest_java_lang_InterruptedException\nTest_java_lang_LinkageError\nTest_java_lang_Long\nTest_java_lang_Math\nTest_java_lang_NegativeArraySizeException\nTest_java_lang_NoClassDefFoundError\nTest_java_lang_NoSuchFieldError\nTest_java_lang_NoSuchMethodError\nTest_java_lang_NullPointerException\nTest_java_lang_Number\nTest_java_lang_NumberFormatException\nTest_java_lang_Ob
 ject\nTest_java_lang_OutOfMemoryError\nTest_java_lang_RuntimeException\nTest_java_lang_SecurityManager\nTest_java_lang_Short\nTest_java_lang_StackOverflowError\nTest_java_lang_String\nTest_java_lang_StringBuffer\nTest_java_lang_StringIndexOutOfBoundsException\nTest_java_lang_System\nTest_java_lang_Thread\nTest_java_lang_ThreadDeath\nTest_java_lang_ThreadGroup\nTest_java_lang_Throwable\nTest_java_lang_UnknownError\nTest_java_lang_UnsatisfiedLinkError\nTest_java_lang_VerifyError\nTest_java_lang_VirtualMachineError\nTest_java_lang_vm_Image\nTest_java_lang_vm_MemorySegment\nTest_java_lang_vm_ROMStoreException\nTest_java_lang_vm_VM\nTest_java_lang_Void\nTest_java_net_BindException\nTest_java_net_ConnectException\nTest_java_net_DatagramPacket\nTest_java_net_DatagramSocket\nTest_java_net_DatagramSocketImpl\nTest_java_net_InetAddress\nTest_java_net_NoRouteToHostException\nTest_java_net_PlainDatagramSocketImpl\nTest_java_net_PlainSocketImpl\nTest_java_net_Socket\nTest_java_net_Socket
 Exception\nTest_java_net_SocketImpl\nTest_java_net_SocketInputStream\nTest_java_net_SocketOutputStream\nTest_java_net_UnknownHostException\nTest_java_util_ArrayEnumerator\nTest_java_util_Date\nTest_java_util_EventObject\nTest_java_util_HashEnumerator\nTest_java_util_Hashtable\nTest_java_util_Properties\nTest_java_util_ResourceBundle\nTest_java_util_tm\nTest_java_util_Vector\n";
 
+        /**
+         * The spec says that BufferedReader.readLine() considers only "\r", "\n"
+         * and "\r\n" to be line separators. We must not permit additional separator
+         * characters.
+        */
+        public void test_readLine_IgnoresEbcdic85Characters() throws IOException {
+            assertLines("A\u0085B", "A\u0085B");
+        }
+
+        public void test_readLine_Separators() throws IOException {
+            assertLines("A\nB\nC", "A", "B", "C");
+            assertLines("A\rB\rC", "A", "B", "C");
+            assertLines("A\r\nB\r\nC", "A", "B", "C");
+            assertLines("A\n\rB\n\rC", "A", "", "B", "", "C");
+            assertLines("A\n\nB\n\nC", "A", "", "B", "", "C");
+            assertLines("A\r\rB\r\rC", "A", "", "B", "", "C");
+            assertLines("A\n\n", "A", "");
+            assertLines("A\n\r", "A", "");
+            assertLines("A\r\r", "A", "");
+            assertLines("A\r\n", "A");
+            assertLines("A\r\n\r\n", "A", "");
+        }
+
+        private void assertLines(String in, String... lines) throws IOException {
+            BufferedReader bufferedReader
+                = new BufferedReader(new Support_StringReader(in));
+            for (String line : lines) {
+                assertEquals(line, bufferedReader.readLine());
+            }
+            assertNull(bufferedReader.readLine());
+        }
+
 	/**
 	 * @tests java.io.BufferedReader#BufferedReader(java.io.Reader)
 	 */

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/net/SocketTest.java Tue Aug 11 13:07:55 2009
@@ -35,6 +35,7 @@
 import java.net.SocketTimeoutException;
 import java.net.UnknownHostException;
 import java.security.Permission;
+import java.util.Arrays;
 import java.util.Locale;
 
 import org.apache.harmony.luni.net.PlainSocketImpl;
@@ -1506,13 +1507,13 @@
         OutputStream theOutput = worker.getOutputStream();
 
         // Send the regular data
-        String sendString = new String("Test");
-        theOutput.write(sendString.getBytes());
+        byte[] sendBytes = new String("Test").getBytes();
+        theOutput.write(sendBytes);
         theOutput.flush();
 
         // Send the urgent data byte which should not be received
         worker.sendUrgentData("UrgentData".getBytes()[0]);
-        theOutput.write(sendString.getBytes());
+        theOutput.write(sendBytes);
         worker.shutdownOutput();
         worker.close();
 
@@ -1532,9 +1533,16 @@
         client.close();
         server.close();
 
-        String receivedString = new String(myBytes, 0, totalBytesRead);
-        assertEquals("Urgent data was received", sendString + sendString,
-                receivedString);
+        byte[] expectBytes = new byte[2 * sendBytes.length];
+        System.arraycopy(sendBytes, 0, expectBytes, 0, sendBytes.length);
+        System.arraycopy(sendBytes, 0, expectBytes, sendBytes.length,
+                sendBytes.length);
+
+        byte[] resultBytes = new byte[totalBytesRead];
+        System.arraycopy(myBytes, 0, resultBytes, 0, totalBytesRead);
+
+        assertTrue("Urgent data was received", Arrays.equals(expectBytes,
+                resultBytes));
 
         /*
          * Test 2: Now validate that urgent data is received as expected. Expect
@@ -1552,8 +1560,8 @@
         theOutput = worker.getOutputStream();
 
         // Send the regular data
-        sendString = new String("Test - Urgent Data");
-        theOutput.write(sendString.getBytes());
+        sendBytes = new String("Test - Urgent Data").getBytes();
+        theOutput.write(sendBytes);
 
         // Send the urgent data (one byte) which should be received
         client.setOOBInline(true);
@@ -1561,7 +1569,7 @@
         worker.sendUrgentData(urgentByte);
 
         // Send more data, the urgent byte must stay in position
-        theOutput.write(sendString.getBytes());
+        theOutput.write(sendBytes);
         worker.shutdownOutput();
         worker.close();
 
@@ -1581,9 +1589,17 @@
         client.close();
         server.close();
 
-        receivedString = new String(myBytes, 0, totalBytesRead);
-        assertEquals("Urgent data was not received with one urgent byte",
-                sendString + (char) urgentByte + sendString, receivedString);
+        expectBytes = new byte[2 * sendBytes.length + 1];
+        System.arraycopy(sendBytes, 0, expectBytes, 0, sendBytes.length);
+        expectBytes[sendBytes.length] = urgentByte;
+        System.arraycopy(sendBytes, 0, expectBytes, sendBytes.length + 1,
+                sendBytes.length);
+
+        resultBytes = new byte[totalBytesRead];
+        System.arraycopy(myBytes, 0, resultBytes, 0, totalBytesRead);
+
+        assertTrue("Urgent data was not received with one urgent byte", Arrays
+                .equals(expectBytes, resultBytes));
 
         /*
          * Test 3: Now validate that urgent data is received as expected. Expect
@@ -1601,8 +1617,8 @@
         theOutput = worker.getOutputStream();
 
         // Send the regular data
-        sendString = new String("Test - Urgent Data");
-        theOutput.write(sendString.getBytes());
+        sendBytes = new String("Test - Urgent Data").getBytes();
+        theOutput.write(sendBytes);
 
         // Send the urgent data (one byte) which should be received
         client.setOOBInline(true);
@@ -1612,7 +1628,7 @@
         worker.sendUrgentData(urgentByte2);
 
         // Send more data, the urgent byte must stay in position
-        theOutput.write(sendString.getBytes());
+        theOutput.write(sendBytes);
         worker.shutdownOutput();
         worker.close();
 
@@ -1632,10 +1648,18 @@
         client.close();
         server.close();
 
-        receivedString = new String(myBytes, 0, totalBytesRead);
-        assertEquals("Urgent data was not received with two urgent bytes",
-                sendString + (char) urgentByte1 + (char) urgentByte2
-                        + sendString, receivedString);
+        expectBytes = new byte[2 * sendBytes.length + 2];
+        System.arraycopy(sendBytes, 0, expectBytes, 0, sendBytes.length);
+        expectBytes[sendBytes.length] = urgentByte1;
+        expectBytes[sendBytes.length + 1] = urgentByte2;
+        System.arraycopy(sendBytes, 0, expectBytes, sendBytes.length + 2,
+                sendBytes.length);
+
+        resultBytes = new byte[totalBytesRead];
+        System.arraycopy(myBytes, 0, resultBytes, 0, totalBytesRead);
+
+        assertTrue("Urgent data was not received with two urgent bytes", Arrays
+                .equals(expectBytes, resultBytes));
 
         /*
          * Test 4: Now test the case where there is only urgent data.
@@ -1663,8 +1687,8 @@
         client.close();
         server.close();
 
-        assertEquals("Sole urgent data was not received", (int) urgentByte,
-                byteRead);
+        assertEquals("Sole urgent data was not received",
+                (int) (urgentByte & 0xff), byteRead);
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractListTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractListTest.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractListTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/AbstractListTest.java Tue Aug 11 13:07:55 2009
@@ -345,4 +345,89 @@
     		//Excepted to catch IllegalStateException here
     	}
     }
+
+    public void test_subListII2() {
+        List<Integer> holder = new ArrayList<Integer>(16);
+        for (int i=0; i<10; i++) {
+            holder.add(i);
+        }
+
+        // parent change should cause sublist concurrentmodification fail
+        List<Integer> sub = holder.subList(0, holder.size());
+        holder.add(11);
+        try {
+            sub.size();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.add(12);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.add(0, 11);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.clear();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.contains(11);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.get(9);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.indexOf(10);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.isEmpty();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.iterator();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.lastIndexOf(10);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.listIterator();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.listIterator(0);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.remove(0);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.remove(9);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.set(0, 0);
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.size();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.toArray();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+        try {
+            sub.toString();
+            fail("Should throw ConcurrentModificationException.");
+        } catch (ConcurrentModificationException e) {}
+
+        holder.clear();
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TreeMapTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TreeMapTest.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TreeMapTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/TreeMapTest.java Tue Aug 11 13:07:55 2009
@@ -578,6 +578,48 @@
         	// expected
         }
     }
+    
+    
+    /**
+     * @tests java.util.TreeMap#subMap(java.lang.Object, java.lang.Object)
+     */
+    public void test_subMap_Iterator() {
+        TreeMap<String, String> map = new TreeMap<String, String>();
+
+        String[] keys = { "1", "2", "3" };
+        String[] values = { "one", "two", "three" };
+        for (int i = 0; i < keys.length; i++) {
+            map.put(keys[i], values[i]);
+        }
+
+        assertEquals(3, map.size());
+
+        Map subMap = map.subMap("", "test");
+        assertEquals(3, subMap.size());
+
+        Set entrySet = subMap.entrySet();
+        Iterator iter = entrySet.iterator();
+        int size = 0;
+        while (iter.hasNext()) {
+            Map.Entry<String, String> entry = (Map.Entry<String, String>) iter
+                    .next();
+            assertTrue(map.containsKey(entry.getKey()));
+            assertTrue(map.containsValue(entry.getValue()));
+            size++;
+        }
+        assertEquals(map.size(), size);
+
+        Set<String> keySet = subMap.keySet();
+        iter = keySet.iterator();
+        size = 0;
+        while (iter.hasNext()) {
+            String key = (String) iter.next();
+            assertTrue(map.containsKey(key));
+            size++;
+        }
+        assertEquals(map.size(), size);
+    }
+
 
     /**
      * @tests java.util.TreeMap#tailMap(java.lang.Object)

Propchange: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/resources/net.resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/net.resources:790472-798021
+/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/net.resources:790472-803061

Modified: harmony/enhanced/classlib/branches/java6/modules/math/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/build.xml Tue Aug 11 13:07:55 2009
@@ -129,7 +129,8 @@
             </filterchain>
         </copy>
         
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BigInteger.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BigInteger.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BigInteger.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BigInteger.java Tue Aug 11 13:07:55 2009
@@ -47,7 +47,17 @@
 
     /* Fields used for the internal representation. */
 
-    /** The magnitude of this in the little-endian representation. */
+    /**
+     * The magnitude of this big integer. This array holds unsigned little
+     * endian digits. For example:
+     *   {@code 13} is represented as [ 13 ]
+     *   {@code -13} is represented as [ 13 ]
+     *   {@code 2^32 + 13} is represented as [ 13, 1 ]
+     *   {@code 2^64 + 13} is represented as [ 13, 0, 1 ]
+     *   {@code 2^31} is represented as [ Integer.MIN_VALUE ]
+     * The magnitude array may be longer than strictly necessary, which results
+     * in additional trailing zeros.
+     */
     transient int digits[];
 
     /** The length of this in measured in ints. Can be less than digits.length(). */

Modified: harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BitLevel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BitLevel.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BitLevel.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/BitLevel.java Tue Aug 11 13:07:55 2009
@@ -165,14 +165,26 @@
         }
     }
 
+    /**
+     * Shifts the source digits left one bit, creating a value whose magnitude
+     * is doubled.
+     *
+     * @param result an array of digits that will hold the computed result when
+     *      this method returns. The size of this array is {@code srcLen + 1},
+     *      and the format is the same as {@link BigInteger#digits}.
+     * @param source the array of digits to shift left, in the same format as
+     *      {@link BigInteger#digits}.
+     * @param srcLen the length of {@code source}; may be less than {@code
+     *      source.length}
+     */
     static void shiftLeftOneBit(int result[], int source[], int srcLen) {
         int carry = 0;
-        for(int i = 0; i < srcLen; i++) {
+        for (int i = 0; i < srcLen; i++) {
             int val = source[i];
             result[i] = (val << 1) | carry;
             carry = val >>> 31;
         }
-        if(carry != 0) {
+        if (carry != 0) {
             result[srcLen] = carry;
         }
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/Multiplication.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/Multiplication.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/Multiplication.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/src/main/java/java/math/Multiplication.java Tue Aug 11 13:07:55 2009
@@ -440,7 +440,7 @@
         
         if (byteArraySize > Runtime.getRuntime().freeMemory()) {
             // math.01=power of ten too big
-            throw new OutOfMemoryError(Messages.getString("math.01")); //$NON-NLS-1$
+            throw new ArithmeticException(Messages.getString("math.01")); //$NON-NLS-1$
         }
         if (exp <= Integer.MAX_VALUE) {
             // To calculate:    5^exp * 2^exp

Modified: harmony/enhanced/classlib/branches/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java Tue Aug 11 13:07:55 2009
@@ -1287,6 +1287,24 @@
         assertEquals("incorrect scale", resScale, result.scale());
     }
 
+
+    /**
+     * BigDecimal.divide with a scale that's too large
+     * 
+     * Regression test for HARMONY-6271
+     */
+    public void testDivideLargeScale() {
+    	BigDecimal arg1 = new BigDecimal("320.0E+2147483647");
+		BigDecimal arg2 = new BigDecimal("6E-2147483647");
+    	try {
+    		BigDecimal result = arg1.divide(arg2, Integer.MAX_VALUE, 
+    				java.math.RoundingMode.CEILING);
+    		fail("Expected ArithmeticException when dividing with a scale that's too large");
+    	} catch (ArithmeticException e) {
+    		// expected behaviour
+    	}
+    }
+
     /**
      * divideToIntegralValue(BigDecimal)
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/misc/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/misc/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/misc/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/misc/build.xml Tue Aug 11 13:07:55 2009
@@ -155,7 +155,8 @@
             </filterchain>
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/nio/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/build.xml Tue Aug 11 13:07:55 2009
@@ -164,7 +164,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/build.xml Tue Aug 11 13:07:55 2009
@@ -103,7 +103,6 @@
         <copy todir="../../build/classes" includeemptydirs="false">
             <fileset dir="src/main/java">
                 <exclude name="**/*.java" />
-                <exclude name="**/java.nio.charset.spi.CharsetProvider" />
             </fileset>
         </copy>
     </target>
@@ -112,9 +111,7 @@
         <jar destfile="${hy.jdk}/jre/lib/boot/nio_char.jar"
              manifest="META-INF/MANIFEST.MF"
              compress="${hy.jar.compress}">
-            <metainf prefix="META-INF/services"
-                dir="src/main/java/org/apache/harmony/niochar"
-                includes="java.nio.charset.spi.CharsetProvider"/>
+            <service type="java.nio.charset.spi.CharsetProvider" provider="org.apache.harmony.niochar.CharsetProviderImpl" />
             <fileset refid="classes" />
             <manifest>
                 <attribute name="Implementation-Version" value="${svn.info}"/> 
@@ -124,9 +121,7 @@
         </jar>
 
         <jar destfile="${hy.jdk}/jre/lib/boot/nio_char-src.jar">
-            <metainf prefix="META-INF/services"
-                dir="src/main/java/org/apache/harmony/niochar"
-                includes="java.nio.charset.spi.CharsetProvider"/>
+            <service type="java.nio.charset.spi.CharsetProvider" provider="org.apache.harmony.niochar.CharsetProviderImpl" />
             <fileset dir="src/main/java">
                 <excludesfile name="${basedir}/make/excludesfile"/>
             </fileset>
@@ -166,7 +161,8 @@
             <fileset dir="META-INF" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM1047.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM1047.java?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM1047.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/additional/IBM1047.java Tue Aug 11 13:07:55 2009
@@ -110,9 +110,9 @@
 		final static char[] arr = {
                 0x009C,0x0009,0x0086,0x007F,
                 0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F,
-                0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087,
+                0x0010,0x0011,0x0012,0x0013,0x009D,0x000A,0x0008,0x0087,
                 0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F,
-                0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B,
+                0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0017,0x001B,
                 0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007,
                 0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004,
                 0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A,
@@ -282,7 +282,7 @@
 
                 final static char arr[] = {
                  
-                0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x25,0x0B,0x0C,0x0D,0x0E,0x0F,
+                0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x15,0x0B,0x0C,0x0D,0x0E,0x0F,
                 0x10,0x11,0x12,0x13,0x3C,0x3D,0x32,0x26,0x18,0x19,0x3F,0x27,0x1C,0x1D,0x1E,0x1F,
                 0x40,0x5A,0x7F,0x7B,0x5B,0x6C,0x50,0x7D,0x4D,0x5D,0x5C,0x4E,0x6B,0x60,0x4B,0x61,
                 0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0x7A,0x5E,0x4C,0x7E,0x6E,0x6F,
@@ -290,7 +290,7 @@
                 0xD7,0xD8,0xD9,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xAD,0xE0,0xBD,0x5F,0x6D,
                 0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
                 0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xC0,0x4F,0xD0,0xA1,0x07,
-                0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
+                0x20,0x21,0x22,0x23,0x24,0x25,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
                 0x30,0x31,0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,
                 0x41,0xAA,0x4A,0xB1,0x9F,0xB2,0x6A,0xB5,0xBB,0xB4,0x9A,0x8A,0xB0,0xCA,0xAF,0xBC,
                 0x90,0x8F,0xEA,0xFA,0xBE,0xA0,0xB6,0xB3,0x9D,0xDA,0x9B,0x8B,0xB7,0xB8,0xB9,0xAB,

Modified: harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM1047.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM1047.c?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM1047.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/native/niochar/shared/additional/IBM1047.c Tue Aug 11 13:07:55 2009
@@ -24,7 +24,7 @@
 
     static jboolean table[] = {
       
-     0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x25,0x0B,0x0C,0x0D,0x0E,0x0F,
+     0x00,0x01,0x02,0x03,0x37,0x2D,0x2E,0x2F,0x16,0x05,0x15,0x0B,0x0C,0x0D,0x0E,0x0F,
      0x10,0x11,0x12,0x13,0x3C,0x3D,0x32,0x26,0x18,0x19,0x3F,0x27,0x1C,0x1D,0x1E,0x1F,
      0x40,0x5A,0x7F,0x7B,0x5B,0x6C,0x50,0x7D,0x4D,0x5D,0x5C,0x4E,0x6B,0x60,0x4B,0x61,
      0xF0,0xF1,0xF2,0xF3,0xF4,0xF5,0xF6,0xF7,0xF8,0xF9,0x7A,0x5E,0x4C,0x7E,0x6E,0x6F,
@@ -32,7 +32,7 @@
      0xD7,0xD8,0xD9,0xE2,0xE3,0xE4,0xE5,0xE6,0xE7,0xE8,0xE9,0xAD,0xE0,0xBD,0x5F,0x6D,
      0x79,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x91,0x92,0x93,0x94,0x95,0x96,
      0x97,0x98,0x99,0xA2,0xA3,0xA4,0xA5,0xA6,0xA7,0xA8,0xA9,0xC0,0x4F,0xD0,0xA1,0x07,
-     0x20,0x21,0x22,0x23,0x24,0x15,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
+     0x20,0x21,0x22,0x23,0x24,0x25,0x06,0x17,0x28,0x29,0x2A,0x2B,0x2C,0x09,0x0A,0x1B,
      0x30,0x31,0x1A,0x33,0x34,0x35,0x36,0x08,0x38,0x39,0x3A,0x3B,0x04,0x14,0x3E,0xFF,
      0x41,0xAA,0x4A,0xB1,0x9F,0xB2,0x6A,0xB5,0xBB,0xB4,0x9A,0x8A,0xB0,0xCA,0xAF,0xBC,
      0x90,0x8F,0xEA,0xFA,0xBE,0xA0,0xB6,0xB3,0x9D,0xDA,0x9B,0x8B,0xB7,0xB8,0xB9,0xAB,
@@ -122,9 +122,9 @@
     unsigned int table[] = {
      0x009C,0x0009,0x0086,0x007F,
      0x0097,0x008D,0x008E,0x000B,0x000C,0x000D,0x000E,0x000F,
-     0x0010,0x0011,0x0012,0x0013,0x009D,0x0085,0x0008,0x0087,
+     0x0010,0x0011,0x0012,0x0013,0x009D,0x000A,0x0008,0x0087,
      0x0018,0x0019,0x0092,0x008F,0x001C,0x001D,0x001E,0x001F,
-     0x0080,0x0081,0x0082,0x0083,0x0084,0x000A,0x0017,0x001B,
+     0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0017,0x001B,
      0x0088,0x0089,0x008A,0x008B,0x008C,0x0005,0x0006,0x0007,
      0x0090,0x0091,0x0016,0x0093,0x0094,0x0095,0x0096,0x0004,
      0x0098,0x0099,0x009A,0x009B,0x0014,0x0015,0x009E,0x001A,

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/depends/manifests/asm-3.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-798021
+/harmony/enhanced/classlib/trunk/modules/pack200/depends/manifests/asm-3.1:785554-803061

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java:782694-798021
+/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200Adapter.java:782694-803061

Propchange: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java:782694-798021
+/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java5/org/apache/harmony/pack200/Pack200PackerAdapter.java:782694-803061

Modified: harmony/enhanced/classlib/branches/java6/modules/portlib/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/portlib/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/portlib/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/portlib/build.xml Tue Aug 11 13:07:55 2009
@@ -285,16 +285,41 @@
         <sequential>
             <property name="@{test}.name"
                       value="native.portlib.@{test}" />
-            <exec executable="src/test/native/@{test}/@{test}${exe.suffix}"
+            
+            <!--
+              The following three conditions are a way of working around Ant's
+              environment variable handling on Windows. Windows environment variables
+              are NOT case-sensitive, but Ant's 'env.XXX' variables are case-sensitive.
+              -->
+            <condition property="exec.env.path.name" value="path">
+                <isset property="env.path" />
+            </condition>
+            <condition property="exec.env.path.value" value="${env.path}">
+                <isset property="env.path" />
+            </condition>
+            
+            <condition property="exec.env.path.name" value="Path">
+                <isset property="env.Path" />
+            </condition>
+            <condition property="exec.env.path.value" value="${env.Path}">
+                <isset property="env.Path" />
+            </condition>
+            
+            <condition property="exec.env.path.name" value="PATH">
+                <isset property="env.PATH" />
+            </condition>
+            <condition property="exec.env.path.value" value="${env.PATH}">
+                <isset property="env.PATH" />
+            </condition>
+            
+            <exec executable="${basedir}/src/test/native/@{test}/@{test}${exe.suffix}"
                   failonerror="false"
                   outputproperty="@{test}.output"
                   resultproperty="@{test}.resultcode" >
-                <env key="PATH"
-                     path="${env.Path}${path.separator}${env.PATH}${path.separator}${hy.jdk}/jre/bin${hy.thr.libpath}" />
-                <env key="Path"
-                     path="${env.Path}${path.separator}${env.PATH}${path.separator}${hy.jdk}/jre/bin${hy.thr.libpath}" />
+                <env key="${exec.env.path.name}"
+                     path="${exec.env.path.value}:${hy.jdk}/jre/bin${hy.thr.libpath}" />
                 <env key="LD_LIBRARY_PATH"
-                     path="${env.LD_LIBRARY_PATH}${path.separator}${hy.jdk}/jre/bin${hy.thr.libpath}" />
+                     path="${hy.jdk}/jre/bin${hy.thr.libpath}" />
             </exec>
             <condition property="@{test}.result" value="passed" else="FAILED">
                 <equals arg1="${@{test}.resultcode}" arg2="0" />

Modified: harmony/enhanced/classlib/branches/java6/modules/prefs/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/prefs/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/prefs/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/prefs/build.xml Tue Aug 11 13:07:55 2009
@@ -161,7 +161,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/print/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/print/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/print/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/print/build.xml Tue Aug 11 13:07:55 2009
@@ -168,7 +168,8 @@
             </filterchain>
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/regex/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/regex/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/regex/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/regex/build.xml Tue Aug 11 13:07:55 2009
@@ -133,7 +133,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/rmi/build.xml Tue Aug 11 13:07:55 2009
@@ -134,7 +134,8 @@
         </copy>
         <copy file="make/all.policy" todir="${tests.resources.hdk.dir}" />
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/security/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/security/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/security/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/security/build.xml Tue Aug 11 13:07:55 2009
@@ -192,7 +192,8 @@
             </filterchain>
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/sound/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sound/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sound/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sound/build.xml Tue Aug 11 13:07:55 2009
@@ -129,7 +129,8 @@
             </filterchain>
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="copy-test-resources">

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/build.xml Tue Aug 11 13:07:55 2009
@@ -21,11 +21,25 @@
 
     <property name="hy.module" value="sql" />
     <property name="hy.hdk" location="${basedir}/../../deploy" />
+    <property name="depends.dir" location="${basedir}/../../depends" />
+
     <import file="${hy.hdk}/build/ant/properties.xml" />
+    <import file="${hy.hdk}/build/ant/depends.xml" />
 
     <property file="../../make/depends.properties" />
 
-    <target name="build" depends="compile-java, copy-resources, build-jar" />
+    <target name="build"
+            depends="check-depends, compile-java, copy-resources, build-jar" />
+
+    <target name="check-depends">
+        <check-one-file src="${derby.url}" dest="${derby.jar}" />
+    </target>
+
+    <target name="fetch-depends">
+        <mkdir dir="${derby.dir}" />
+        <download-one-file src="${derby.url}" dest="${derby.jar}"
+                           md5="${derby.md5}" />
+    </target>
 
     <target name="test" depends="-test-module">
         <fail message="Some tests failed">
@@ -45,6 +59,7 @@
         <delete file="${hy.jdk}/jre/lib/boot/sql.jar" />
         <delete file="${hy.jdk}/jre/lib/boot/sql-src.jar" />
         <delete dir="${tests.hdk.dir}" failonerror="false" />
+        <delete dir="${hy.hdk}/build/test/derby" /> 
         <delete failonerror="false">
             <fileset refid="classes" />
         </delete>
@@ -54,6 +69,8 @@
     <target name="compile-java">
         <echo message="Compiling SQL classes" />
 
+        <mkdir dir="../../build/classes" />
+
         <javac sourcepath=""
                srcdir="src/main/java"
                destdir="../../build/classes"
@@ -131,8 +148,13 @@
             <fileset dir="src/test/resources" />
         </copy>
         
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
-        <copy file="../../${derby.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="${junit.jar}" todir="${hy.hdk}/build/test" />
+
+        <copy todir="${hy.hdk}/build/test/derby"> 
+            <fileset dir="${derby.dir}">
+                <include name="*.jar" />
+            </fileset>
+        </copy>
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/make/run-test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/make/run-test.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/make/run-test.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/make/run-test.xml Tue Aug 11 13:07:55 2009
@@ -35,7 +35,7 @@
         <convert-test-as-class from="test.case" to="converted.tc.class" />
         <run-hdk-tests module="sql" jar="sql_tests.jar">
             <junit-elements>
-                <classpath location="../derby.jar" />
+                <classpath location="../derby/derby.jar" />
                 <classpath location="resources" />
             </junit-elements>
         </run-hdk-tests>

Modified: harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/suncompat/build.xml Tue Aug 11 13:07:55 2009
@@ -54,6 +54,8 @@
     <target name="compile-java" depends="copy-resources">
         <echo message="Compiling Sun Compat classes" />
 
+        <mkdir dir="../../build/classes" />
+
         <javac sourcepath=""
                srcdir="src/main/java"
                destdir="../../build/classes"
@@ -127,7 +129,8 @@
             </filterchain>
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/swing/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/swing/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/swing/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/swing/build.xml Tue Aug 11 13:07:55 2009
@@ -147,7 +147,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
 
     </target>
 

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-798021
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/BasicSwingTestCase.java:768152-803061

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-798021
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/SwingTestCase.java:768152-803061

Propchange: harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 11 13:07:55 2009
@@ -1 +1 @@
-/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-798021
+/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java.injected/javax/swing/text/parser:768152-803061

Modified: harmony/enhanced/classlib/branches/java6/modules/text/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/build.xml Tue Aug 11 13:07:55 2009
@@ -133,7 +133,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">

Modified: harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml?rev=803102&r1=803101&r2=803102&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/x-net/build.xml Tue Aug 11 13:07:55 2009
@@ -156,7 +156,8 @@
             <fileset dir="src/test/resources" />
         </copy>
 
-        <copy file="../../${junit.jar}" todir="${hy.hdk}/build/test" />
+        <copy file="../../${junit.jar}"
+              tofile="${hy.hdk}/build/test/junit.jar" />
     </target>
 
     <target name="compile-tests">



Mime
View raw message