Index: modules/concurrent/build.xml =================================================================== --- modules/concurrent/build.xml (revision 597289) +++ modules/concurrent/build.xml (working copy) @@ -99,7 +99,7 @@ + manifest="${hy.concurrent}/META-INF/MANIFEST.MF" compress="false"> @@ -108,7 +108,7 @@ - + Index: modules/text/build.xml =================================================================== --- modules/text/build.xml (revision 597289) +++ modules/text/build.xml (working copy) @@ -99,7 +99,7 @@ + manifest="${hy.text}/META-INF/MANIFEST.MF" compress="false"> @@ -108,7 +108,7 @@ - + Index: modules/applet/build.xml =================================================================== --- modules/applet/build.xml (revision 597289) +++ modules/applet/build.xml (working copy) @@ -97,7 +97,7 @@ + manifest="${hy.applet}/META-INF/MANIFEST.MF" compress="false"> @@ -106,8 +106,8 @@ - - + + Index: modules/accessibility/build.xml =================================================================== --- modules/accessibility/build.xml (revision 597289) +++ modules/accessibility/build.xml (working copy) @@ -105,7 +105,7 @@ + manifest="${hy.accessibility}/META-INF/MANIFEST.MF" compress="false"> @@ -114,7 +114,7 @@ - + @@ -127,7 +127,7 @@ - + Index: modules/swing/build.xml =================================================================== --- modules/swing/build.xml (revision 597289) +++ modules/swing/build.xml (working copy) @@ -126,7 +126,7 @@ + manifest="${hy.swing}/META-INF/MANIFEST.MF" compress="false"> @@ -136,7 +136,7 @@ - + Index: modules/sound/build.xml =================================================================== --- modules/sound/build.xml (revision 597289) +++ modules/sound/build.xml (working copy) @@ -102,7 +102,7 @@ + manifest="${hy.sound}/META-INF/MANIFEST.MF" compress="false"> @@ -111,7 +111,7 @@ - + Index: modules/math/build.xml =================================================================== --- modules/math/build.xml (revision 597289) +++ modules/math/build.xml (working copy) @@ -99,7 +99,7 @@ + manifest="${hy.math}/META-INF/MANIFEST.MF" compress="false"> @@ -108,7 +108,7 @@ - + Index: modules/lang-management/build.xml =================================================================== --- modules/lang-management/build.xml (revision 597289) +++ modules/lang-management/build.xml (working copy) @@ -88,7 +88,7 @@ + manifest="${hy.lang-management}/META-INF/MANIFEST.MF" compress="false"> @@ -96,7 +96,7 @@ - + Index: modules/auth/build.xml =================================================================== --- modules/auth/build.xml (revision 597289) +++ modules/auth/build.xml (working copy) @@ -141,7 +141,7 @@ + manifest="${hy.auth}/META-INF/MANIFEST.MF" compress="false"> @@ -150,7 +150,7 @@ - + Index: modules/suncompat/build.xml =================================================================== --- modules/suncompat/build.xml (revision 597289) +++ modules/suncompat/build.xml (working copy) @@ -97,7 +97,7 @@ + manifest="${hy.suncompat}/META-INF/MANIFEST.MF" compress="false"> @@ -106,7 +106,7 @@ - + Index: modules/regex/build.xml =================================================================== --- modules/regex/build.xml (revision 597289) +++ modules/regex/build.xml (working copy) @@ -100,7 +100,7 @@ + manifest="${hy.regex}/META-INF/MANIFEST.MF" compress="false"> @@ -109,7 +109,7 @@ - + Index: modules/prefs/build.xml =================================================================== --- modules/prefs/build.xml (revision 597289) +++ modules/prefs/build.xml (working copy) @@ -127,7 +127,7 @@ + manifest="${hy.prefs}/META-INF/MANIFEST.MF" compress="false"> @@ -136,7 +136,7 @@ - + Index: modules/crypto/build.xml =================================================================== --- modules/crypto/build.xml (revision 597289) +++ modules/crypto/build.xml (working copy) @@ -101,7 +101,7 @@ + manifest="${hy.crypto}/META-INF/MANIFEST.MF" compress="false"> @@ -110,7 +110,7 @@ - + Index: modules/archive/build.xml =================================================================== --- modules/archive/build.xml (revision 597289) +++ modules/archive/build.xml (working copy) @@ -219,7 +219,7 @@ + manifest="${hy.archive}/META-INF/MANIFEST.MF" compress="false"> @@ -228,7 +228,7 @@ - + Index: modules/nio_char/build.xml =================================================================== --- modules/nio_char/build.xml (revision 597289) +++ modules/nio_char/build.xml (working copy) @@ -121,7 +121,7 @@ + manifest="${hy.nio_char}/META-INF/MANIFEST.MF" compress="false"> @@ -133,7 +133,7 @@ - + Index: modules/jndi/build.xml =================================================================== --- modules/jndi/build.xml (revision 597289) +++ modules/jndi/build.xml (working copy) @@ -99,7 +99,7 @@ + manifest="${hy.jndi}/META-INF/MANIFEST.MF" compress="false"> @@ -108,7 +108,7 @@ - + Index: modules/security-kernel/build.xml =================================================================== --- modules/security-kernel/build.xml (revision 597289) +++ modules/security-kernel/build.xml (working copy) @@ -51,7 +51,7 @@ - + Index: modules/nio/build.xml =================================================================== --- modules/nio/build.xml (revision 597289) +++ modules/nio/build.xml (working copy) @@ -142,7 +142,7 @@ + manifest="${hy.nio}/META-INF/MANIFEST.MF" compress="false"> @@ -151,7 +151,7 @@ - + Index: modules/luni-kernel/build.xml =================================================================== --- modules/luni-kernel/build.xml (revision 597289) +++ modules/luni-kernel/build.xml (working copy) @@ -51,7 +51,7 @@ - + Index: modules/logging/build.xml =================================================================== --- modules/logging/build.xml (revision 597289) +++ modules/logging/build.xml (working copy) @@ -90,7 +90,7 @@ + manifest="${hy.logging}/META-INF/MANIFEST.MF" compress="false"> @@ -99,7 +99,7 @@ - + Index: modules/rmi/build.xml =================================================================== --- modules/rmi/build.xml (revision 597289) +++ modules/rmi/build.xml (working copy) @@ -101,7 +101,7 @@ + manifest="${hy.rmi}/META-INF/MANIFEST.MF" compress="false"> @@ -110,7 +110,7 @@ - + Index: modules/beans/build.xml =================================================================== --- modules/beans/build.xml (revision 597289) +++ modules/beans/build.xml (working copy) @@ -101,7 +101,7 @@ + manifest="${hy.beans}/META-INF/MANIFEST.MF" compress="false"> @@ -110,7 +110,7 @@ - + Index: modules/misc/build.xml =================================================================== --- modules/misc/build.xml (revision 597289) +++ modules/misc/build.xml (working copy) @@ -101,7 +101,7 @@ + manifest="${hy.misc}/META-INF/MANIFEST.MF" compress="false"> @@ -110,7 +110,7 @@ - + Index: modules/awt/src/main/java/common/java/awt/Component.java =================================================================== --- modules/awt/src/main/java/common/java/awt/Component.java (revision 597289) +++ modules/awt/src/main/java/common/java/awt/Component.java (working copy) @@ -1520,7 +1520,7 @@ toolkit.unlockAWT(); } } - +/* protected AWTEvent coalesceEvents(AWTEvent existingEvent, AWTEvent newEvent) { toolkit.lockAWT(); try { @@ -1537,7 +1537,7 @@ boolean isCoalescer() { return coalescer; } - +*/ AWTEvent getRelativeEvent(int id) { Integer idWrapper = new Integer(id); eventsList = eventsTable.get(idWrapper); Index: modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java =================================================================== --- modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java (revision 597289) +++ modules/awt/src/main/java/common/org/apache/harmony/awt/gl/font/FontManager.java (working copy) @@ -33,6 +33,7 @@ import java.util.Locale; import java.util.Properties; import java.util.Vector; +import java.util.ArrayList; import org.apache.harmony.awt.gl.CommonGraphics2DFactory; import org.apache.harmony.awt.gl.font.fontlib.FLFontManager; @@ -605,18 +606,20 @@ for (i = 0; i < FP_FILE_NAMES.length; i++){ pathname = FP_FILE_NAMES[i]; + + int curPos; + StringBuilder result = new StringBuilder(pathname); if (os != null){ - pathname = pathname.replaceFirst("OS", os); //$NON-NLS-1$ + curPos = result.indexOf("OS"); //$NON-NLS-1$ + if (curPos >= 0) { + result.replace( curPos, curPos+2, os); + } } - - pathname = javaHome + pathname; - + // pathname = pathname.replaceAll("Language", language). //$NON-NLS-1$ // replaceAll("Country", country). //$NON-NLS-1$ // replaceAll("Encoding", fileEncoding). //$NON-NLS-1$ // replaceAll("Version", version); //$NON-NLS-1$ - int curPos; - StringBuilder result = new StringBuilder(pathname); curPos = result.indexOf("Language"); //$NON-NLS-1$ if (curPos >= 0) { @@ -635,8 +638,8 @@ result.replace( curPos, curPos+7, version); } pathname = result.toString(); + pathname = javaHome + pathname; - file = new File(pathname); if (file.exists()){ @@ -668,25 +671,41 @@ if (exclusionString == null){ return null; - } + } - String[] intervals = exclusionString.split(","); //$NON-NLS-1$ + String[] intervals = splitSB(exclusionString,","); //$NON-NLS-1$ if (intervals != null){ int num = intervals.length; if (num > 0){ results = new int[intervals.length << 1]; for (int i = 0; i < intervals.length; i++){ - String ranges[] = intervals[i].split("-"); //$NON-NLS-1$ + String ranges[] = splitSB(intervals[i],"-"); //$NON-NLS-1$ results[i*2] = Integer.parseInt(ranges[0], 16); results[i*2+1] = Integer.parseInt(ranges[1], 16); - } } } return results; } + private static String[] splitSB(String str, String ch) { + StringBuilder result = new StringBuilder(str); + ArrayList res = new ArrayList(); + int curPos = 0; + int index = 0; + while ((curPos = result.indexOf(ch)) != -1) { //$NON-NLS-1$ + res.add(result.substring(0,curPos)); + result = result.delete(0,curPos+1); + index++; + } + res.add(result.toString()); + index++; + + return (String[]) res.toArray(new String[index]); + } + + /** * Returns Properties from the properties file or null if * there is an error with FileInputStream processing. Index: modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java =================================================================== --- modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java (revision 597289) +++ modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/Synchronizer.java (working copy) @@ -79,6 +79,7 @@ * Supposed to be used in Toolkit.lockAWT() only. */ public void lock() { + final Thread curThread = Thread.currentThread(); synchronized (lock) { @@ -102,6 +103,7 @@ * Supposed to be used in Toolkit.unlockAWT() only. */ public void unlock() { + synchronized (lock) { if (owner == null) { // awt.20=Can't unlock not locked resource. Index: modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DTK.java =================================================================== --- modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DTK.java (revision 597289) +++ modules/awt/src/main/java/common/org/apache/harmony/awt/datatransfer/DTK.java (working copy) @@ -47,7 +47,7 @@ protected DTK() { dataTransferThread = new DataTransferThread(this); - dataTransferThread.start(); + //dataTransferThread.start(); } /** * Returns data transfer toolkit for current application context. Index: modules/awt/build.xml =================================================================== --- modules/awt/build.xml (revision 597289) +++ modules/awt/build.xml (working copy) @@ -129,7 +129,7 @@ + manifest="${hy.awt}/META-INF/MANIFEST.MF" compress="false"> @@ -138,7 +138,7 @@ - + Index: modules/x-net/build.xml =================================================================== --- modules/x-net/build.xml (revision 597289) +++ modules/x-net/build.xml (working copy) @@ -101,7 +101,7 @@ + manifest="${hy.x-net}/META-INF/MANIFEST.MF" compress="false"> Index: modules/print/build.xml =================================================================== --- modules/print/build.xml (revision 597289) +++ modules/print/build.xml (working copy) @@ -133,7 +133,7 @@ + manifest="${hy.print}/META-INF/MANIFEST.MF" compress="false"> @@ -148,7 +148,7 @@ - + Index: modules/sql/build.xml =================================================================== --- modules/sql/build.xml (revision 597289) +++ modules/sql/build.xml (working copy) @@ -98,7 +98,7 @@ + manifest="${hy.sql}/META-INF/MANIFEST.MF" compress="false"> @@ -107,7 +107,7 @@ - + Index: modules/pack200/build.xml =================================================================== --- modules/pack200/build.xml (revision 597289) +++ modules/pack200/build.xml (working copy) @@ -126,7 +126,7 @@ + manifest="${hy.pack200}/META-INF/MANIFEST.MF" compress="false"> @@ -135,7 +135,7 @@ - + Index: modules/security/build.xml =================================================================== --- modules/security/build.xml (revision 597289) +++ modules/security/build.xml (working copy) @@ -159,7 +159,7 @@ + manifest="${hy.security}/META-INF/MANIFEST.MF" compress="false"> @@ -168,7 +168,7 @@ - + Index: modules/luni/src/main/java/java/io/DataOutputStream.java =================================================================== --- modules/luni/src/main/java/java/io/DataOutputStream.java (revision 597289) +++ modules/luni/src/main/java/java/io/DataOutputStream.java (working copy) @@ -341,6 +341,7 @@ */ public final void writeUTF(String str) throws IOException { long utfCount = countUTFBytes(str); + if (utfCount > 65535) { throw new UTFDataFormatException(Msg.getString("K0068")); //$NON-NLS-1$ } Index: modules/luni/build.xml =================================================================== --- modules/luni/build.xml (revision 597289) +++ modules/luni/build.xml (working copy) @@ -281,7 +281,7 @@ + manifest="${hy.luni}/META-INF/MANIFEST.MF" compress="false"> @@ -290,7 +290,7 @@ - + Index: modules/instrument/build.xml =================================================================== --- modules/instrument/build.xml (revision 597289) +++ modules/instrument/build.xml (working copy) @@ -143,7 +143,7 @@ + manifest="${hy.instrument}/META-INF/MANIFEST.MF" compress="false"> @@ -152,7 +152,7 @@ - + Index: modules/annotation/build.xml =================================================================== --- modules/annotation/build.xml (revision 597289) +++ modules/annotation/build.xml (working copy) @@ -98,7 +98,7 @@ + manifest="${hy.annotation}/META-INF/MANIFEST.MF" compress="false"> @@ -107,7 +107,7 @@ - + Index: modules/imageio/build.xml =================================================================== --- modules/imageio/build.xml (revision 597289) +++ modules/imageio/build.xml (working copy) @@ -145,7 +145,7 @@ + manifest="${hy.imageio}/META-INF/MANIFEST.MF" compress="false"> @@ -154,7 +154,7 @@ - +