You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2007/09/22 23:25:00 UTC
svn commit: r578502 [1/10] - in /harmony/enhanced/classlib/branches/java6:
depends/files/ depends/jars/ depends/manifests/xerces_2.9.0/
depends/manifests/xerces_2.9.1/ depends/manifests/xerces_2.9.1/META-INF/
make/ modules/archive/src/main/native/archi...
Author: tellison
Date: Sat Sep 22 14:24:54 2007
New Revision: 578502
URL: http://svn.apache.org/viewvc?rev=578502&view=rev
Log:
Merge updates between classlib trunk@r576177 and r578483.
Added:
harmony/enhanced/classlib/branches/java6/depends/manifests/xerces_2.9.1/
- copied from r578483, harmony/enhanced/classlib/trunk/depends/manifests/xerces_2.9.1/
harmony/enhanced/classlib/branches/java6/depends/manifests/xerces_2.9.1/META-INF/
- copied from r578483, harmony/enhanced/classlib/trunk/depends/manifests/xerces_2.9.1/META-INF/
harmony/enhanced/classlib/branches/java6/depends/manifests/xerces_2.9.1/META-INF/MANIFEST.MF
- copied unchanged from r578483, harmony/enhanced/classlib/trunk/depends/manifests/xerces_2.9.1/META-INF/MANIFEST.MF
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/InterfaceOnly.pack
- copied unchanged from r578483, harmony/enhanced/classlib/trunk/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/InterfaceOnly.pack
harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicHTML.java
- copied unchanged from r578483, harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicHTML.java
Removed:
harmony/enhanced/classlib/branches/java6/depends/manifests/xerces_2.9.0/
Modified:
harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
harmony/enhanced/classlib/branches/java6/depends/jars/ (props changed)
harmony/enhanced/classlib/branches/java6/make/build-java.xml
harmony/enhanced/classlib/branches/java6/make/depends.properties
harmony/enhanced/classlib/branches/java6/make/depends.xml
harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/archiveglob.c
harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.c
harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Color.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/EventDispatchThreadRTest.java
harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Graphics2DTest.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/file.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/harmonyglob.h
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/ois.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/process.c
harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileTest.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/Buffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferFactory.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferOverflowException.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BufferUnderflowException.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ByteOrder.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/CharArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/CharBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/CharSequenceAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/CharToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/DirectByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/DirectByteBuffers.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/DoubleArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/DoubleBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/DoubleToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/FloatArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/FloatBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/FloatToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/HeapByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/IntArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/IntBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/IntToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/InvalidMarkException.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/LongArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/LongBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/LongToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/MappedByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/MappedByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyBufferException.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyCharArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyDirectByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyDoubleArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyFloatArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyHeapByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyIntArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyLongArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadOnlyShortArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteCharArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteDirectByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteDoubleArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteFloatArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteHeapByteBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteIntArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteLongArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ReadWriteShortArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ShortArrayBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ShortBuffer.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/ShortToByteBufferAdapter.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
harmony/enhanced/classlib/branches/java6/modules/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/java/nio/charset/Charset.java
harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/java/nio/charset/CharsetEncoder.java
harmony/enhanced/classlib/branches/java6/modules/nio_char/src/main/java/org/apache/harmony/niochar/charset/ISO_8859_1.java
harmony/enhanced/classlib/branches/java6/modules/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayout.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BHSDCodec.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Codec.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentTest.java
harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hyfile.c
harmony/enhanced/classlib/branches/java6/modules/sound/src/test/java/org/apache/harmony/sound/tests/javax/sound/sampled/PortInfoTest.java
harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/JInternalFrame.java
harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/BlockView.java
harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/text/html/HTMLDocument.java
harmony/enhanced/classlib/branches/java6/modules/swing/src/test/api/java.injected/javax/swing/text/html/HTMLDocument_Reader_ActionsTest.java
Modified: harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties (original)
+++ harmony/enhanced/classlib/branches/java6/depends/files/bootclasspath.properties Sat Sep 22 14:24:54 2007
@@ -170,9 +170,9 @@
# The following JARs are from Xerces/Xalan
bootclasspath.34=xalan-j_2.7.0/xalan.jar
-bootclasspath.35=xerces_2.9.0/resolver.jar
-bootclasspath.36=xerces_2.9.0/xercesImpl.jar
-bootclasspath.37=xerces_2.9.0/xml-apis.jar
+bootclasspath.35=xerces_2.9.1/resolver.jar
+bootclasspath.36=xerces_2.9.1/xercesImpl.jar
+bootclasspath.37=xerces_2.9.1/xml-apis.jar
# The following JARs are from mx4j.sf.net
bootclasspath.38=mx4j_3.0.2/mx4j.jar
Propchange: harmony/enhanced/classlib/branches/java6/depends/jars/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Sep 22 14:24:54 2007
@@ -14,22 +14,6 @@
ecj_3.2
bcel-5.2
jetty
-bcprov-jdk14-134bcprov-jdk14-133
-ecj_3.2RC5
-icu4j_3.4.4
-junit_3.8.2
-mx4j_3.0.1
-mx4j_3.0.2
-xalan-j_2.7.0
-xerces_2.8.0
-bcprov-jdk14-132
-junit_3.8.1
-xalan-j_2.6.0
-xerces_2.6.2
-ecj_3.2MAINT
-ecj_3.2
-bcel-5.2
-jetty
bcprov-jdk14-134
yoko_M1-20061027
bcprov-jdk15-134
@@ -40,14 +24,5 @@
bcprov-jdk15-136
bcprov-jdk15-137
derby-10.3.1.4
-
-yoko_M1-20061027
-bcprov-jdk15-134
-yoko_M2-200611115
-yoko_M2-20061115
-yoko_M2-20070130
-xerces_2.9.0
-bcprov-jdk15-136
-bcprov-jdk15-137
+xerces_2.9.1
xmlsec_1.4.0
-
Modified: harmony/enhanced/classlib/branches/java6/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-java.xml?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-java.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-java.xml Sat Sep 22 14:24:54 2007
@@ -217,7 +217,7 @@
<patternset includes="icu4jni_3.4/*.jar" />
<patternset includes="mx4j_3.0.2/*.jar" />
<patternset includes="xalan-j_2.7.0/*.jar" />
- <patternset includes="xerces_2.9.0/*.jar" />
+ <patternset includes="xerces_2.9.1/*.jar" />
<patternset includes="yoko_M2-20070130/yoko-rmi-spec.jar" />
<patternset includes="yoko_M2-20070130/yoko-rmi-impl.jar" />
<patternset includes="yoko_M2-20070130/yoko.jar" />
Modified: harmony/enhanced/classlib/branches/java6/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.properties?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.properties (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.properties Sat Sep 22 14:24:54 2007
@@ -23,10 +23,10 @@
xalan.url=${maven2.base}/xalan/xalan/2.7.0/xalan-2.7.0.jar
xalan.md5=a018d032c21a873225e702b36b171a10
-xerces.dir=${depends.jars}/xerces_2.9.0
+xerces.dir=${depends.jars}/xerces_2.9.1
xerces.zip=${xerces.dir}/xerces.zip
-xerces.url=http://www.apache.org/dist/xml/xerces-j/Xerces-J-bin.2.9.0.zip
-xerces.md5=a3aece3feb68be6d319072b85ad06023
+xerces.url=http://www.apache.org/dist/xml/xerces-j/Xerces-J-bin.2.9.1.zip
+xerces.md5=a0e07ede1c3bd5231fe15eae24032b2e
xmlsec.dir=${depends.jars}/xmlsec_1.4.0
xmlsec.zip=${xmlsec.dir}/xmlsec.zip
Modified: harmony/enhanced/classlib/branches/java6/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.xml?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.xml Sat Sep 22 14:24:54 2007
@@ -143,7 +143,7 @@
<target name="-extract-xerces" unless="xerces.uptodate">
<unzip src="${xerces.zip}" dest="${xerces.dir}.tmp" />
<copy todir="${xerces.dir}" flatten="yes">
- <fileset dir="${xerces.dir}.tmp/xerces-2_9_0">
+ <fileset dir="${xerces.dir}.tmp/xerces-2_9_1">
<include name="resolver.jar" />
<include name="xercesImpl.jar" />
<include name="xml-apis.jar" />
Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/archiveglob.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/archiveglob.c?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/archiveglob.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/archiveglob.c Sat Sep 22 14:24:54 2007
@@ -123,8 +123,8 @@
jclmem_free_memory (env, jclZipFile);
jclZipFile = next;
}
- jclmem_free_memory (env, zipfileHandles);
MUTEX_DESTROY (zipfileHandles->mutex);
+ jclmem_free_memory (env, zipfileHandles);
}
/* Free any global references */
Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.c?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/main/native/archive/shared/zip.c Sat Sep 22 14:24:54 2007
@@ -300,12 +300,11 @@
jmethodID mid;
jfieldID descriptorFID;
jclass javaClass;
- jclass weakJavaClass;
JCLZipFileLink *zipfileHandles;
javaClass = (*env)->FindClass (env, "java/util/zip/ZipEntry");
- weakJavaClass = (*env)->NewGlobalRef (env, javaClass);
- if (!weakJavaClass)
+ javaClass = (*env)->NewGlobalRef (env, javaClass);
+ if (!javaClass)
return;
mid =
((*env)->
@@ -313,7 +312,7 @@
"(Ljava/lang/String;Ljava/lang/String;[BJJJJIJJ)V"));
if (!mid)
return;
- JCL_CACHE_SET (env, CLS_java_util_zip_ZipEntry, weakJavaClass);
+ JCL_CACHE_SET (env, CLS_java_util_zip_ZipEntry, javaClass);
JCL_CACHE_SET (env, MID_java_util_zip_ZipEntry_init, mid);
descriptorFID = (*env)->GetFieldID (env, cls, "descriptor", "J");
@@ -475,10 +474,6 @@
}
javaClass = JCL_CACHE_GET (env, CLS_java_util_zip_ZipEntry);
- javaClass = (*env)->NewLocalRef(env, javaClass);
- if (javaClass == NULL) {
- return NULL;
- }
mid = JCL_CACHE_GET (env, MID_java_util_zip_ZipEntry_init);
java_ZipEntry = ((*env)->NewObject (env, javaClass, mid, entryName, NULL, /* comment */
extra,
Modified: harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java Sat Sep 22 14:24:54 2007
@@ -96,10 +96,10 @@
}
Set<Principal> principals = subject.getPrincipals();
assertFalse("Should get at least one principal", principals.isEmpty());
- Set subjects = subject.getPrivateCredentials();
+ Set<Object> subjects = subject.getPrivateCredentials();
assertFalse("Should get at least one private credential", subjects
.isEmpty());
- Set subjects2 = subject.getPublicCredentials();
+ Set<Object> subjects2 = subject.getPublicCredentials();
assertFalse("Should get at least one public credential", subjects2
.isEmpty());
subject = new Subject();
@@ -164,10 +164,10 @@
}
Set<Principal> principals = subject.getPrincipals();
assertFalse("Should get at least one principal", principals.isEmpty());
- Set subjects = subject.getPrivateCredentials();
+ Set<Object> subjects = subject.getPrivateCredentials();
assertFalse("Should get at least one private credential", subjects
.isEmpty());
- Set subjects2 = subject.getPublicCredentials();
+ Set<Object> subjects2 = subject.getPublicCredentials();
assertFalse("Should get at least one public credential", subjects2
.isEmpty());
try {
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Color.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Color.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Color.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Color.java Sat Sep 22 14:24:54 2007
@@ -24,6 +24,7 @@
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.awt.image.ColorModel;
+import java.awt.image.DirectColorModel;
import java.awt.image.DataBufferInt;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
@@ -560,10 +561,16 @@
class ColorPaintContext implements PaintContext {
int rgbValue;
- WritableRaster savedRaster = null;
+ WritableRaster savedRaster;
+ ColorModel cm;
protected ColorPaintContext(int rgb) {
rgbValue = rgb;
+ if((rgb & 0xFF000000) == 0xFF000000){
+ cm = new DirectColorModel(24, 0xFF0000, 0xFF00, 0xFF);
+ } else {
+ cm = ColorModel.getRGBdefault();
+ }
}
public void dispose() {
@@ -571,7 +578,7 @@
}
public ColorModel getColorModel() {
- return ColorModel.getRGBdefault();
+ return cm;
}
public Raster getRaster(int x, int y, int w, int h) {
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java Sat Sep 22 14:24:54 2007
@@ -1884,6 +1884,9 @@
return null;
}
Graphics g = behaviour.getGraphics(0, 0, w, h);
+ if(g instanceof Graphics2D) {
+ ((Graphics2D)g).setBackground(this.getBackground());
+ }
g.setColor(foreColor);
g.setFont(font);
return g;
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/MouseDispatcher.java Sat Sep 22 14:24:54 2007
@@ -212,35 +212,25 @@
}
private void fall2Child(PointerInfo info) {
- Insets insets = info.src.getInsets();
+ final Point pos = info.position;
+ final int x = pos.x;
+ final int y = pos.y;
- final Point pos = info.position;
- final int x = pos.x;
- final int y = pos.y;
- if ((x >= insets.left) && (y >= insets.top) &&
- (x < (info.src.w - insets.right)) &&
- (y < (info.src.h - insets.bottom)))
- {
- Component[] children = ((Container) info.src).getComponents();
+ for (Component child : ((Container) info.src).getComponents()) {
+ if (child.isShowing()) {
+ if (child.contains(x - child.x, y - child.y)) {
+ info.src = child;
+ pos.translate(-child.x, -child.y);
- for (Component child : children) {
- if (child.isShowing()) {
- if (child.contains(x - child.getX(),
- y - child.getY()))
- {
- info.src = child;
- pos.translate(-child.x, -child.y);
+ if (child instanceof Container) {
+ fall2Child(info);
+ }
- if (child instanceof Container) {
- fall2Child(info);
- }
-
- return;
- }
- }
- }
- }
- }
+ return;
+ }
+ }
+ }
+ }
private void dispatchButtonEvent(PointerInfo info, NativeEvent event) {
int button = event.getMouseButton();
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/image/PixelGrabber.java Sat Sep 22 14:24:54 2007
@@ -204,32 +204,31 @@
}
int realOff = offset + (srcY - Y) * scanline + (srcX - X);
+ int mask = 0xFF;
+
switch(dataType){
case DATA_TYPE_UNDEFINED:
cm = model;
iData = new int[width * height];
dataType = DATA_TYPE_INT;
- if(cm == ColorModel.getRGBdefault()) {
- isRGB = true;
- } else {
- isRGB = false;
- }
+ isRGB = (cm == ColorModel.getRGBdefault());
case DATA_TYPE_INT:
if(cm == model){
for(int y = 0; y < srcH; y++){
- System.arraycopy(pixels, srcOff, bData, realOff, srcW);
+ System.arraycopy(pixels, srcOff, iData, realOff, srcW);
srcOff += srcScan;
realOff += scanline;
}
break;
}
+ mask = 0xFFFFFFFF;
case DATA_TYPE_BYTE:
forceToRGB();
for(int y = 0; y < srcH; y++){
for(int x = 0; x < srcW; x++){
- iData[realOff++] = cm.getRGB(pixels[srcOff++] & 0xff);
+ iData[realOff+x] = cm.getRGB(pixels[srcOff+x] & mask);
}
srcOff += srcScan;
realOff += scanline;
@@ -379,6 +378,9 @@
* Force pixels to INT RGB mode
*/
private void forceToRGB(){
+ if (isRGB)
+ return;
+
switch(dataType){
case DATA_TYPE_BYTE:
iData = new int[width * height];
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2D.java Sat Sep 22 14:24:54 2007
@@ -40,24 +40,24 @@
import java.awt.Toolkit;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Arc2D;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.Line2D;
+import java.awt.geom.PathIterator;
+import java.awt.geom.RoundRectangle2D;
import java.awt.image.AffineTransformOp;
-import java.awt.image.ImageObserver;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
+import java.awt.image.ImageObserver;
import java.awt.image.Raster;
import java.awt.image.RenderedImage;
import java.awt.image.WritableRaster;
import java.awt.image.renderable.RenderableImage;
-import java.awt.geom.AffineTransform;
-import java.awt.geom.Arc2D;
-import java.awt.geom.Ellipse2D;
-import java.awt.geom.Line2D;
-import java.awt.geom.PathIterator;
-import java.awt.geom.RoundRectangle2D;
import java.text.AttributedCharacterIterator;
+import java.util.HashMap;
import java.util.Map;
-import org.apache.harmony.awt.gl.Surface;
import org.apache.harmony.awt.gl.font.FontManager;
import org.apache.harmony.awt.gl.font.fontlib.FLTextRenderer;
import org.apache.harmony.awt.gl.image.OffscreenImage;
@@ -125,9 +125,22 @@
*
*/
public abstract class CommonGraphics2D extends Graphics2D {
+
+ private static final Map<RenderingHints.Key, Object> DEFAULT_RENDERING_HINTS;
+
+ static {
+ DEFAULT_RENDERING_HINTS = new HashMap<RenderingHints.Key, Object>();
+ DEFAULT_RENDERING_HINTS.put(RenderingHints.KEY_TEXT_ANTIALIASING,
+ RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
+ DEFAULT_RENDERING_HINTS.put(RenderingHints.KEY_ANTIALIASING,
+ RenderingHints.VALUE_ANTIALIAS_OFF);
+ DEFAULT_RENDERING_HINTS.put(RenderingHints.KEY_STROKE_CONTROL,
+ RenderingHints.VALUE_STROKE_DEFAULT);
+ }
+
protected Surface dstSurf = null;
protected Blitter blitter = NullBlitter.getInstance();
- protected RenderingHints hints = new RenderingHints(null);
+ protected RenderingHints hints = new RenderingHints(DEFAULT_RENDERING_HINTS);
// Clipping things
protected MultiRectArea clip = null;
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/wtk/windows/WinEvent.java Sat Sep 22 14:24:54 2007
@@ -584,9 +584,9 @@
modifiers |= ((win32.GetKeyState(VK_MENU) & 0x80) != 0) ?
InputEvent.ALT_DOWN_MASK : 0;
- modifiers |= (wParam & MK_LBUTTON) != 0 ? InputEvent.BUTTON1_DOWN_MASK : 0;
- modifiers |= (wParam & MK_MBUTTON) != 0 ? InputEvent.BUTTON2_DOWN_MASK : 0;
- modifiers |= (wParam & MK_RBUTTON) != 0 ? InputEvent.BUTTON3_DOWN_MASK : 0;
+ modifiers |= ((wParam & MK_LBUTTON) != 0) || (msg == WM_LBUTTONUP) ? InputEvent.BUTTON1_DOWN_MASK : 0;
+ modifiers |= ((wParam & MK_MBUTTON) != 0) || (msg == WM_MBUTTONUP) ? InputEvent.BUTTON2_DOWN_MASK : 0;
+ modifiers |= ((wParam & MK_RBUTTON) != 0) || (msg == WM_RBUTTONUP) ? InputEvent.BUTTON3_DOWN_MASK : 0;
return modifiers;
}
}
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/EventDispatchThreadRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/EventDispatchThreadRTest.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/EventDispatchThreadRTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/EventDispatchThreadRTest.java Sat Sep 22 14:24:54 2007
@@ -41,23 +41,24 @@
}
);
}
-
- public void testHarmony2116() throws InterruptedException {
- final ByteArrayOutputStream out = new ByteArrayOutputStream();
- final PrintStream err = System.err;
- final Toolkit tk;
-
- System.setErr(new PrintStream(out));
- tk = new ToolkitImpl() {
- protected EventQueue getSystemEventQueueImpl() {
- return null;
- }
- };
-
- Thread.sleep(100);
- tk.dispatchThread.shutdown();
- tk.dispatchThread.join(3000);
- System.setErr(err);
- assertEquals(0, out.size());
- }
+
+// FIXME: Test deemed to be invalid
+// public void testHarmony2116() throws InterruptedException {
+// final ByteArrayOutputStream out = new ByteArrayOutputStream();
+// final PrintStream err = System.err;
+// final Toolkit tk;
+//
+// System.setErr(new PrintStream(out));
+// tk = new ToolkitImpl() {
+// protected EventQueue getSystemEventQueueImpl() {
+// return null;
+// }
+// };
+//
+// Thread.sleep(100);
+// tk.dispatchThread.shutdown();
+// tk.dispatchThread.join(3000);
+// System.setErr(err);
+// assertEquals(0, out.size());
+// }
}
Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Graphics2DTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Graphics2DTest.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Graphics2DTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Graphics2DTest.java Sat Sep 22 14:24:54 2007
@@ -57,4 +57,16 @@
assertNotNull(g2d.getPaint());
}
+ public void testGetRenderingHint() {
+ // Regression test for HARMONY-4799
+ final Graphics2D g2d = (Graphics2D) frame.getGraphics();
+
+ assertEquals(
+ g2d.getRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING),
+ RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
+ assertEquals(g2d.getRenderingHint(RenderingHints.KEY_ANTIALIASING),
+ RenderingHints.VALUE_ANTIALIAS_OFF);
+ assertEquals(g2d.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL),
+ RenderingHints.VALUE_STROKE_DEFAULT);
+ }
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/HashMap.java Sat Sep 22 14:24:54 2007
@@ -43,28 +43,18 @@
private static final int DEFAULT_SIZE = 16;
static class Entry<K, V> extends MapEntry<K, V> {
- final int storedKeyHash;
+ final int origKeyHash;
Entry<K, V> next;
Entry(K theKey, int hash) {
super(theKey, null);
- if (theKey instanceof Integer) {
- this.storedKeyHash = hash | 0x00000001;
- } else {
- this.storedKeyHash = hash & 0xFFFFFFFE;
- }
+ this.origKeyHash = hash;
}
Entry(K theKey, V theValue) {
super(theKey, theValue);
- if (theKey == null) {
- storedKeyHash = 0;
- } else if (theKey instanceof Integer) {
- storedKeyHash = theKey.hashCode() | 0x00000001;
- } else {
- storedKeyHash = theKey.hashCode() & 0xFFFFFFFE;
- }
+ origKeyHash = (theKey == null ? 0 : theKey.hashCode());
}
@Override
@@ -261,16 +251,13 @@
}
private static final int calculateCapacity(int x) {
- if (x >= 1 << 30) {
+ if(x >= 1 << 30){
return 1 << 30;
}
- if (x == 0) {
+ if(x == 0){
return 16;
}
- if (x == 1) {
- return 2;
- }
- x = x - 1;
+ x = x -1;
x |= x >> 1;
x |= x >> 2;
x |= x >> 4;
@@ -458,25 +445,16 @@
final Entry<K,V> findNonNullKeyEntry(Object key, int index, int keyHash) {
Entry<K,V> m = elementData[index];
- if (key instanceof Integer) {
- int storedKeyHash = keyHash | 0x00000001;
- while (m != null && (m.storedKeyHash != storedKeyHash)) {
- m = m.next;
- }
- } else {
- int storedKeyHash = keyHash & 0xFFFFFFFE;
- while (m != null && (m.storedKeyHash != storedKeyHash || !key.equals(m.key))) {
- m = m.next;
- }
+ while (m != null && (m.origKeyHash != keyHash || !key.equals(m.key))) {
+ m = m.next;
}
return m;
}
final Entry<K,V> findNullKeyEntry() {
Entry<K,V> m = elementData[0];
- while (m != null && m.key != null) {
+ while (m != null && m.key != null)
m = m.next;
- }
return m;
}
@@ -591,7 +569,7 @@
}
Entry<K,V> createHashedEntry(K key, int index, int hash) {
- Entry<K,V> entry = new Entry<K,V>(key, hash);
+ Entry<K,V> entry = new Entry<K,V>(key,hash);
entry.next = elementData[index];
elementData[index] = entry;
return entry;
@@ -631,8 +609,7 @@
for (int i = 0; i < elementData.length; i++) {
Entry<K, V> entry = elementData[i];
while (entry != null) {
- int actualHash = (i & 0x00000001) | (entry.storedKeyHash & 0xFFFFFFFE);
- int index = actualHash & (length - 1);
+ int index = entry.origKeyHash & (length - 1);
Entry<K, V> next = entry.next;
entry.next = newData[index];
newData[index] = entry;
@@ -669,22 +646,12 @@
Entry<K, V> entry;
Entry<K, V> last = null;
if (key != null) {
- int keyHash = key.hashCode();
- index = keyHash & (elementData.length - 1);
+ int hash = key.hashCode();
+ index = hash & (elementData.length - 1);
entry = elementData[index];
-
- if (key instanceof Integer) {
- int storedKeyHash = keyHash | 0x00000001;
- while (entry != null && (entry.storedKeyHash != storedKeyHash)) {
- last = entry;
- entry = entry.next;
- }
- } else {
- int storedKeyHash = keyHash & 0xFFFFFFFE;
- while (entry != null && (entry.storedKeyHash != storedKeyHash || !key.equals(entry.key))) {
- last = entry;
- entry = entry.next;
- }
+ while (entry != null && !(entry.origKeyHash == hash && key.equals(entry.key))) {
+ last = entry;
+ entry = entry.next;
}
} else {
entry = elementData[0];
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/unix/jclprots.h Sat Sep 22 14:24:54 2007
@@ -28,18 +28,6 @@
** COMPONENT: NativesCommon
************************************************************/
-/* NativesCommonComm*/
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_writeImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle, jbyteArray jBuffer, jint offset, jint length));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_readImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle, jbyteArray jBuffer, jint offset, jint length));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_getBaud PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle));
-void JNICALL Java_com_ibm_oti_connection_comm_Connection_closeImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_openImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint jPortNum));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_setBaud PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle, jint baudrate));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_openImpl2 PROTOTYPE((JNIEnv *env, jobject jThis, jstring portName));
-void JNICALL Java_com_ibm_oti_connection_comm_Connection_configureImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle,
-jint baudrate, jint bitsPerChar, jint stopBits, jint parity, jboolean autoRTS, jboolean autoCTS, jint timeout));
-jint JNICALL Java_com_ibm_oti_connection_comm_Connection_availableImpl PROTOTYPE((JNIEnv *env, jobject jThis, jint osHandle));
-
/* NativesCommonPlainServerSocketImpl*/
void JNICALL Java_java_net_PlainServerSocketImpl_createServerStreamSocketImpl PROTOTYPE((
JNIEnv* env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack));
@@ -94,18 +82,6 @@
jlong JNICALL Java_java_util_zip_CRC32_updateImpl PROTOTYPE(( JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc));
/* NativesCommonAnnotationHelper*/
-jobject JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getReturnValueForEntry PROTOTYPE((JNIEnv * env, jclass unusedClazz, jclass clazz, jlong entryValue, jstring mName));
-jobjectArray JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getAnnotationEntries PROTOTYPE((JNIEnv * env, jclass unusedClazz, jclass clazz, jint type, jobject obj));
-jobject JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getAnnotationClassNameForEntry PROTOTYPE((JNIEnv * env, jclass unusedClazz, jlong entryValue));
-jobject JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getReturnValueFromEntry PROTOTYPE((JNIEnv * env, jclass unusedClazz, jclass clazz, jclass annType, jlong entryValue, jstring mName));
-jobject JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getDefaultReturnValue PROTOTYPE((JNIEnv * env, jclass unusedClazz, jclass clazz, jobject obj));
-jobject JNICALL
-Java_com_ibm_oti_reflect_AnnotationHelper_getDefaultReturnValueFromMethod PROTOTYPE((JNIEnv * env, jclass unusedClazz, jclass clazz, jclass annType, jobject obj));
/* NativesCommonSocketImpl*/
void JNICALL Java_java_net_SocketImpl_listenStreamSocketImpl PROTOTYPE(( JNIEnv *env, jclass thisClz, jobject fileDescriptor, jint backlog));
@@ -254,12 +230,6 @@
jchar JNICALL Java_java_io_ObjectOutputStream_getFieldChar PROTOTYPE((JNIEnv *env, jclass clazz, jobject targetObject, jobject declaringClass, jobject fieldName));
/* NativesCommonFileInputStream*/
-jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_readByteImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_readImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-jlong JNICALL Java_com_ibm_oti_connection_file_FileInputStream_skipImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong count, jlong descriptor));
-jlong JNICALL Java_com_ibm_oti_connection_file_FileInputStream_openImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray path));
-void JNICALL Java_com_ibm_oti_connection_file_FileInputStream_closeImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_availableImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
/* NativesCommonSocket*/
void createSocket PROTOTYPE((JNIEnv* env, jobject thisObjFD, int sockType, jboolean preferIPv4Stack));
@@ -302,12 +272,6 @@
/* NativesCommonTimeZone*/
jstring JNICALL Java_java_util_TimeZone_getCustomTimeZone PROTOTYPE((JNIEnv *env, jclass clazz, jintArray tzinfo, jbooleanArray isCustomTimeZone));
-/* NativesCommonFileOutputStream*/
-void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_writeImpl PROTOTYPE((JNIEnv *env, jobject recv, jbyteArray buffer, jint offset, jint count, jlong descriptor));
-jlong JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_openImpl PROTOTYPE((JNIEnv * env, jobject recv, jbyteArray path, jboolean append));
-void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_writeByteImpl PROTOTYPE((JNIEnv *env, jobject recv, jint c, jlong descriptor));
-void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_closeImpl PROTOTYPE((JNIEnv * env, jobject recv, jlong descriptor));
-
/* NativesCommonFloatParsing*/
JNIEXPORT jfloat JNICALL Java_org_apache_harmony_luni_util_FloatingPointParser_parseFltImpl
PROTOTYPE((JNIEnv *env, jclass clazz, jstring s, jint e));
@@ -363,46 +327,13 @@
/* NativesCommonSocket*/
void throwSocketException PROTOTYPE((JNIEnv* env, I_32 errorNumber));
-void JNICALL Java_com_ibm_oti_connection_socket_Connection_connectStreamImpl PROTOTYPE((
- JNIEnv* env, jobject socket, jint localPort, jint remotePort, jbyteArray addr));
-jint JNICALL Java_com_ibm_oti_connection_socket_Connection_sendStreamImpl PROTOTYPE(( JNIEnv *env, jobject socket, jbyteArray data, jint offset, jint count));
-void JNICALL Java_com_ibm_oti_connection_socket_Connection_connectStreamImpl2 PROTOTYPE((
- JNIEnv* env, jobject socket, jint localPort, jint remotePort, jbyteArray addr));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_sendDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject socket, jbyteArray data, jint offset, jint msgLength,
- jbyteArray addr, jint targetPort));
-jstring JNICALL Java_com_ibm_oti_connection_socket_Socket_getHostByAddrImpl PROTOTYPE((JNIEnv* env, jclass clazz, jobject addr));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_nominalDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject socket));
-jobject JNICALL Java_com_ibm_oti_connection_socket_Socket_getHostByNameImpl PROTOTYPE((
- JNIEnv* env, jclass clazz, jstring aName));
I_32 conPollSelectRead PROTOTYPE((JNIEnv * env, jobject socket, jint timeout, BOOLEAN poll, BOOLEAN accept));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_netMaxDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject recv, jobject datagramSocket));
void* getSocketDescriptor PROTOTYPE((JNIEnv *env, jobject fd));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_netNominalDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject recv, jobject datagramSocket));
void setSocketDescriptor PROTOTYPE((JNIEnv * env, jobject fd, void *value));
-jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getSocketOptionImpl PROTOTYPE((JNIEnv *env, jobject socket, jint anOption));
jstring JNICALL Java_java_lang_System_getHostnameImpl PROTOTYPE((
JNIEnv* env, jclass clazz));
-void JNICALL Java_com_ibm_oti_connection_socket_Socket_setSocketOptionImpl PROTOTYPE((JNIEnv *env, jobject socket, jint anOption, jint aValue));
-void JNICALL Java_com_ibm_oti_connection_socket_Socket_socketCloseImpl PROTOTYPE(( JNIEnv * env, jobject socket));
-jint JNICALL Java_com_ibm_oti_connection_socket_Connection_availableStreamImpl PROTOTYPE(( JNIEnv *env, jobject socket));
void conUpdateSocket PROTOTYPE((JNIEnv *env, hysockaddr_t sockaddrP, jobject socket, int remote));
-jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getIPImpl PROTOTYPE((
- JNIEnv* env, jclass clazz, jstring aName));
-void JNICALL Java_com_ibm_oti_connection_datagram_Connection_bindDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject socket, jint localPort));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_maxDatagramImpl PROTOTYPE((
- JNIEnv* env, jobject socket));
-jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getSocketFlags PROTOTYPE((JNIEnv *env, jclass thisClz));
-void JNICALL Java_com_ibm_oti_connection_socket_Connection_shutdownSideImpl PROTOTYPE(( JNIEnv * env, jobject socket, jboolean inputSide));
-jint JNICALL Java_com_ibm_oti_connection_socket_Connection_receiveStreamImpl PROTOTYPE(( JNIEnv *env, jobject socket,
- jbyteArray data, jint offset, jint count, jint timeout));
hysocket_t createAndBindSocket PROTOTYPE((JNIEnv* env, jobject socket, int sockType, int localPort));
-jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_receiveDatagramImpl PROTOTYPE(( JNIEnv *env,
- jobject socket, jbyteArray data, jint offset, jint msgLength, jint timeout));
/* NativesCommonFileDescriptor*/
void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass fdClazz));
@@ -425,14 +356,6 @@
jobjectArray arg1, jobjectArray arg2, jbyteArray dir));
void JNICALL Java_org_apache_harmony_luni_internal_process_ProcessInputStream_setFDImpl PROTOTYPE((JNIEnv *env, jobject recv, jobject arg1, jlong arg2));
void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_oneTimeInitialization PROTOTYPE((JNIEnv * env, jclass clazz));
-
-/* NativesCommonServerSocket*/
-void JNICALL Java_com_ibm_oti_connection_serversocket_Connection_acceptStreamSocketImpl PROTOTYPE((JNIEnv *env,
- jobject serversocket, jobject socket, jint timeout));
-void JNICALL Java_com_ibm_oti_connection_serversocket_Connection_listenStreamImpl PROTOTYPE((
- JNIEnv* env, jobject serversocket, jint localPort, jint backlog));
-void JNICALL Java_com_ibm_oti_connection_serversocket_Connection_acceptStreamSocketImpl2 PROTOTYPE((JNIEnv *env,
- jobject serversocket, jobject socket, jint timeout));
/* NativesCommonPlainDatagramSocketImpl*/
jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendDatagramImpl2 PROTOTYPE((
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/include/windows/jclprots.h Sat Sep 22 14:24:54 2007
@@ -24,29 +24,6 @@
#endif
#include "vmi.h"
- /* NativesCommonComm*/
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_writeImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle,
- jbyteArray jBuffer, jint offset, jint length));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_readImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle,
- jbyteArray jBuffer, jint offset, jint length));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_getBaud
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_comm_Connection_closeImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_openImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint jPortNum));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_setBaud
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle, jint baudrate));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_openImpl2
- PROTOTYPE ((JNIEnv * env, jobject jThis, jstring portName));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_comm_Connection_configureImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle, jint baudrate,
- jint bitsPerChar, jint stopBits, jint parity,
- jboolean autoRTS, jboolean autoCTS, jint timeout));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_comm_Connection_availableImpl
- PROTOTYPE ((JNIEnv * env, jobject jThis, jint osHandle));
/* NativesCommonPlainServerSocketImpl*/
JNIEXPORT void JNICALL
@@ -437,21 +414,6 @@
PROTOTYPE ((JNIEnv * env, jclass clazz, jobject targetObject,
jobject declaringClass, jobject fieldName));
- /* NativesCommonFileInputStream*/
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_readByteImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_readImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
- jint count, jlong descriptor));
- JNIEXPORT jlong JNICALL Java_com_ibm_oti_connection_file_FileInputStream_skipImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jlong count, jlong descriptor));
- JNIEXPORT jlong JNICALL Java_com_ibm_oti_connection_file_FileInputStream_openImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_file_FileInputStream_closeImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_file_FileInputStream_availableImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
-
/* NativesCommonSocket*/
void createSocket
PROTOTYPE ((JNIEnv * env, jobject thisObjFD, int sockType,
@@ -533,18 +495,6 @@
PROTOTYPE ((JNIEnv * env, jclass clazz, jintArray tzinfo,
jbooleanArray isCustomTimeZone));
- /* NativesCommonFileOutputStream*/
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_writeImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray buffer, jint offset,
- jint count, jlong descriptor));
- JNIEXPORT jlong JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_openImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray path,
- jboolean append));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_writeByteImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jint c, jlong descriptor));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_file_FileOutputStream_closeImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jlong descriptor));
-
/* NativesCommonFloatParsing*/
JNIEXPORT jfloat JNICALL
Java_org_apache_harmony_luni_util_FloatingPointParser_parseFltImpl
@@ -600,11 +550,6 @@
PROTOTYPE ((JNIEnv * env, jobject fileDescriptor, hysockaddr_t sockaddrP,
jboolean preferIPv6Addresses));
- /* NativesCommonNativeCharConv*/
- JNIEXPORT jboolean JNICALL
- Java_com_ibm_oti_io_NativeCharacterConverter_supportsNativeCharConv
- PROTOTYPE ((JNIEnv * env, jobject recv));
-
/* NativesCommonIoHelpers*/
void *getJavaIoFileDescriptorContentsAsPointer
PROTOTYPE ((JNIEnv * env, jobject fd));
@@ -636,73 +581,19 @@
/* NativesCommonSocket*/
void throwSocketException PROTOTYPE ((JNIEnv * env, I_32 errorNumber));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_socket_Connection_connectStreamImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jint localPort, jint remotePort,
- jbyteArray addr));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_socket_Connection_sendStreamImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jbyteArray data, jint offset,
- jint count));
- JNIEXPORT void JNICALL
- Java_com_ibm_oti_connection_socket_Connection_connectStreamImpl2
- PROTOTYPE ((JNIEnv * env, jobject socket, jint localPort, jint remotePort,
- jbyteArray addr));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_sendDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jbyteArray data, jint offset,
- jint msgLength, jbyteArray addr, jint targetPort));
- JNIEXPORT jstring JNICALL Java_com_ibm_oti_connection_socket_Socket_getHostByAddrImpl
- PROTOTYPE ((JNIEnv * env, jclass clazz, jobject addr));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_nominalDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject socket));
- JNIEXPORT jobject JNICALL Java_com_ibm_oti_connection_socket_Socket_getHostByNameImpl
- PROTOTYPE ((JNIEnv * env, jclass clazz, jstring aName));
I_32 conPollSelectRead
PROTOTYPE ((JNIEnv * env, jobject socket, jint timeout, BOOLEAN poll,
BOOLEAN accept));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_netMaxDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jobject datagramSocket));
void *getSocketDescriptor PROTOTYPE ((JNIEnv * env, jobject fd));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_netNominalDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jobject datagramSocket));
void setSocketDescriptor
PROTOTYPE ((JNIEnv * env, jobject fd, void *value));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getSocketOptionImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jint anOption));
JNIEXPORT jstring JNICALL Java_java_lang_System_getHostnameImpl
PROTOTYPE ((JNIEnv * env, jclass clazz));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_socket_Socket_setSocketOptionImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jint anOption, jint aValue));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_socket_Socket_socketCloseImpl
- PROTOTYPE ((JNIEnv * env, jobject socket));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_socket_Connection_availableStreamImpl
- PROTOTYPE ((JNIEnv * env, jobject socket));
void conUpdateSocket
PROTOTYPE ((JNIEnv * env, hysockaddr_t sockaddrP, jobject socket,
int remote));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getIPImpl
- PROTOTYPE ((JNIEnv * env, jclass clazz, jstring aName));
- JNIEXPORT void JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_bindDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jint localPort));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_datagram_Connection_maxDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject socket));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_socket_Socket_getSocketFlags
- PROTOTYPE ((JNIEnv * env, jclass thisClz));
- JNIEXPORT void JNICALL Java_com_ibm_oti_connection_socket_Connection_shutdownSideImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jboolean inputSide));
- JNIEXPORT jint JNICALL Java_com_ibm_oti_connection_socket_Connection_receiveStreamImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jbyteArray data, jint offset,
- jint count, jint timeout));
hysocket_t createAndBindSocket
PROTOTYPE ((JNIEnv * env, jobject socket, int sockType, int localPort));
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_connection_datagram_Connection_receiveDatagramImpl
- PROTOTYPE ((JNIEnv * env, jobject socket, jbyteArray data, jint offset,
- jint msgLength, jint timeout));
/* NativesCommonFileDescriptor*/
JNIEXPORT void JNICALL Java_java_io_FileDescriptor_oneTimeInitialization
@@ -745,20 +636,6 @@
JNIEXPORT void JNICALL Java_org_apache_harmony_luni_internal_process_SystemProcess_oneTimeInitialization
PROTOTYPE ((JNIEnv * env, jclass clazz));
- /* NativesCommonServerSocket*/
- JNIEXPORT void JNICALL
- Java_com_ibm_oti_connection_serversocket_Connection_acceptStreamSocketImpl
- PROTOTYPE ((JNIEnv * env, jobject serversocket, jobject socket,
- jint timeout));
- JNIEXPORT void JNICALL
- Java_com_ibm_oti_connection_serversocket_Connection_listenStreamImpl
- PROTOTYPE ((JNIEnv * env, jobject serversocket, jint localPort,
- jint backlog));
- JNIEXPORT void JNICALL
- Java_com_ibm_oti_connection_serversocket_Connection_acceptStreamSocketImpl2
- PROTOTYPE ((JNIEnv * env, jobject serversocket, jobject socket,
- jint timeout));
-
/* NativesCommonPlainDatagramSocketImpl*/
JNIEXPORT jint JNICALL Java_java_net_PlainDatagramSocketImpl_sendDatagramImpl2
PROTOTYPE ((JNIEnv * env, jclass thisClz, jobject fileDescriptor,
@@ -801,24 +678,6 @@
/************************************************************
** COMPONENT: NativesWin32
************************************************************/
- /* NativesWin32CharConv*/
- JNIEXPORT jint JNICALL
- Java_com_ibm_oti_io_NativeCharacterConverter_convertStreamBytesToCharsImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray srcBytes,
- jint srcOffset, jint srcCount, jcharArray dstChars,
- jint dstOffset, jint dstCount, jintArray stopPos,
- jstring codePageID, jlong osCodePage));
- JNIEXPORT jbyteArray JNICALL
- Java_com_ibm_oti_io_NativeCharacterConverter_convertCharsToBytesImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jcharArray chars, jint offset,
- jint count, jstring codePageID, jlong osCodePage));
- JNIEXPORT jboolean JNICALL
- Java_com_ibm_oti_io_NativeCharacterConverter_supportsCodePage
- PROTOTYPE ((JNIEnv * env, jobject recv, jstring javaCodePage));
- JNIEXPORT jcharArray JNICALL
- Java_com_ibm_oti_io_NativeCharacterConverter_convertBytesToCharsImpl
- PROTOTYPE ((JNIEnv * env, jobject recv, jbyteArray bytes, jint offset,
- jint count, jstring codePageID, jlong osCodePage));
/* NativesWin32Helpers*/
int platformReadLink PROTOTYPE ((char *link));
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=578502&r1=578501&r2=578502&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 Sat Sep 22 14:24:54 2007
@@ -374,7 +374,6 @@
Java_java_io_File_newFileImpl (JNIEnv * env, jobject recv, jbyteArray path)
{
PORT_ACCESS_FROM_ENV (env);
- I_32 result;
IDATA portFD;
jsize length = (*env)->GetArrayLength (env, path);
char pathCopy[HyMaxPath];
@@ -383,18 +382,17 @@
pathCopy[length] = '\0';
ioh_convertToPlatform (pathCopy);
- /* First check to see if file already exists */
- result = hyfile_attr (pathCopy);
- if (result == HyIsDir)
- return 3;
- if (result >= 0)
- return 1;
-
/* Now create the file and close it */
- portFD =
- hyfile_open (pathCopy, HyOpenCreate | HyOpenWrite | HyOpenTruncate, 0666);
- if (portFD == -1)
+ portFD = hyfile_open (pathCopy,
+ HyOpenCreateNew | HyOpenWrite | HyOpenTruncate,
+ 0666);
+
+ if (portFD == -1) {
+ if (hyerror_last_error_number() == HYPORT_ERROR_FILE_EXIST) {
+ return 1;
+ }
return 2;
+ }
hyfile_close (portFD);
return 0;
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/harmonyglob.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/harmonyglob.h?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/harmonyglob.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/harmonyglob.h Sat Sep 22 14:24:54 2007
@@ -38,7 +38,6 @@
jfieldID FID_java_net_DatagramPacket_address;
jfieldID FID_java_net_DatagramPacket_port;
jfieldID FID_java_lang_ClassLoader_vmRef;
- jfieldID FID_com_ibm_oti_vm_MemorySpace;
/* Used by ObjectStreamClass */
jmethodID MID_java_lang_reflect_Field_getSignature;
jmethodID MID_java_lang_reflect_Method_getSignature;
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/nethelp.c Sat Sep 22 14:24:54 2007
@@ -1038,6 +1038,7 @@
static jbyte IPv6ANY[16] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
U_32 i = 0;
+ jobject result = NULL;
aString = (*env)->NewStringUTF (env, hostName);
@@ -1114,9 +1115,11 @@
{
/* create using the scope id */
tempClass = HARMONY_CACHE_GET (env, CLS_java_net_InetAddress);
- return (*env)->CallStaticObjectMethod (env, tempClass,
- tempMethodWithScope, aString,
- byte_array, scope_id);
+ result = (*env)->CallStaticObjectMethod (env, tempClass,
+ tempMethodWithScope, aString,
+ byte_array, scope_id);
+ (*env)->ExceptionCheck(env);
+ return result;
}
else
{
@@ -1125,8 +1128,10 @@
HARMONY_CACHE_GET (env,
MID_java_net_InetAddress_getByAddress_Ljava_lang_String_byteArray);
- return (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
- aString, byte_array);
+ result = (*env)->CallStaticObjectMethod (env, tempClass, tempMethod,
+ aString, byte_array);
+ (*env)->ExceptionCheck(env);
+ return result;
}
}
else
@@ -1136,8 +1141,10 @@
HARMONY_CACHE_GET (env,
MID_java_net_InetAddress_init_byteArrayLjava_lang_String);
- return (*env)->NewObject (env, tempClass, tempMethod, byte_array,
- aString);
+ result = (*env)->NewObject (env, tempClass, tempMethod, byte_array,
+ aString);
+ (*env)->ExceptionCheck(env);
+ return result;
}
}
@@ -1295,17 +1302,11 @@
}
-jfieldID
-getJavaIoFileDescriptorDescriptor (JNIEnv * env)
-{
- return HARMONY_CACHE_GET (env, FID_java_io_FileDescriptor_descriptor);
-}
-
void
setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd,
void *value)
{
- jfieldID fid = getJavaIoFileDescriptorDescriptor (env);
+ jfieldID fid = HARMONY_CACHE_GET(env, FID_java_io_FileDescriptor_descriptor);
if (NULL != fid)
{
(*env)->SetLongField (env, fd, fid, (jlong) ((IDATA)value));
@@ -1315,12 +1316,12 @@
void *
getJavaIoFileDescriptorContentsAsAPointer (JNIEnv * env, jobject fd)
{
- jfieldID descriptorFID = getJavaIoFileDescriptorDescriptor (env);
- if (NULL == descriptorFID)
+ jfieldID fid = HARMONY_CACHE_GET(env, FID_java_io_FileDescriptor_descriptor);
+ if (NULL == fid)
{
return (void *) -1;
}
- return (void *) ((IDATA)((*env)->GetLongField (env, fd, descriptorFID)));
+ return (void *) ((IDATA)((*env)->GetLongField (env, fd, fid)));
}
jobject getJavaNioChannelsSocketChannelImplObj(JNIEnv * env, jclass channel_class){
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/ois.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/ois.c?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/ois.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/ois.c Sat Sep 22 14:24:54 2007
@@ -179,7 +179,7 @@
jobject obj;
obj = (*env)->AllocObject(env, instantiationClass);
if (obj != NULL) {
- (*env)->CallVoidMethod(env, obj, mid);
+ (*env)->CallNonvirtualVoidMethod(env, obj, constructorClass, mid);
}
return obj;
}
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/process.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/process.c?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/process.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/main/native/luni/shared/process.c Sat Sep 22 14:24:54 2007
@@ -32,7 +32,6 @@
jobjectArray arg2,
jbyteArray dir)
{
- jbyteArray envString;
jlongArray pVals = NULL;
jlong npVals[4];
char *envArray[256];
@@ -74,11 +73,12 @@
}
(*env)->GetByteArrayRegion (env, element, 0, len, (jbyte *)command[i]);
command[i][len] = 0;
+ (*env)->DeleteLocalRef(env, element);
}
if (envLength)
for (i = 0; i < envLength; i++)
{
- envString = (*env)->GetObjectArrayElement (env, arg2, i);
+ jbyteArray envString = (*env)->GetObjectArrayElement (env, arg2, i);
len = (*env)->GetArrayLength (env, envString);
envArray[i] = jclmem_allocate_memory (env, len + 1);
if (envArray[i] == NULL)
@@ -88,6 +88,7 @@
}
(*env)->GetByteArrayRegion (env, envString, 0, len, (jbyte *)envArray[i]);
envArray[i][len] = 0;
+ (*env)->DeleteLocalRef(env, envString);
}
/* NULL terminate for UNIX (does work on windows too; in fact, it doesn't care) */
command[commandLineLength] = NULL;
Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileTest.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/io/FileTest.java Sat Sep 22 14:24:54 2007
@@ -412,15 +412,22 @@
} catch (IOException e) {
// expected;
}
-
- // Test create an exist path
- f1 = new File(base);
- try {
- assertFalse(f1.createNewFile());
- fail("should throw IOE");
- } catch (IOException e) {
- // expected;
- }
+
+ // This test is invalid. createNewFile should return false
+ // not IOE when the file exists (in this case it exists and is
+ // a directory). TODO: We should probably replace this test
+ // with some that cover this behaviour. It might even be
+ // different on unix and windows since it directly reflects
+ // the open syscall behaviour.
+ //
+ // // Test create an exist path
+ // f1 = new File(base);
+ // try {
+ // assertFalse(f1.createNewFile());
+ // fail("should throw IOE");
+ // } catch (IOException e) {
+ // // expected;
+ // }
}
/**
Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BaseByteBuffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BaseByteBuffer.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BaseByteBuffer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/BaseByteBuffer.java Sat Sep 22 14:24:54 2007
@@ -16,55 +16,63 @@
package java.nio;
-
/**
* Serves as the root of other byte buffer impl classes, implements common
* methods that can be shared by child classes.
- *
*/
abstract class BaseByteBuffer extends ByteBuffer {
- protected BaseByteBuffer(int capacity) {
- super(capacity);
- }
-
- public final CharBuffer asCharBuffer() {
- return CharToByteBufferAdapter.wrap(this);
- }
-
- public final DoubleBuffer asDoubleBuffer() {
- return DoubleToByteBufferAdapter.wrap(this);
- }
-
- public final FloatBuffer asFloatBuffer() {
- return FloatToByteBufferAdapter.wrap(this);
- }
-
- public final IntBuffer asIntBuffer() {
- return IntToByteBufferAdapter.wrap(this);
- }
-
- public final LongBuffer asLongBuffer() {
- return LongToByteBufferAdapter.wrap(this);
- }
-
- public final ShortBuffer asShortBuffer() {
- return ShortToByteBufferAdapter.wrap(this);
- }
-
- public final char getChar() {
- return (char) getShort();
- }
-
- public final char getChar(int index) {
- return (char) getShort(index);
- }
-
- public final ByteBuffer putChar(char value) {
- return putShort((short) value);
- }
-
- public final ByteBuffer putChar(int index, char value) {
- return putShort(index, (short) value);
- }
+ protected BaseByteBuffer(int capacity) {
+ super(capacity);
+ }
+
+ @Override
+ public final CharBuffer asCharBuffer() {
+ return CharToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final DoubleBuffer asDoubleBuffer() {
+ return DoubleToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final FloatBuffer asFloatBuffer() {
+ return FloatToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final IntBuffer asIntBuffer() {
+ return IntToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final LongBuffer asLongBuffer() {
+ return LongToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final ShortBuffer asShortBuffer() {
+ return ShortToByteBufferAdapter.wrap(this);
+ }
+
+ @Override
+ public final char getChar() {
+ return (char) getShort();
+ }
+
+ @Override
+ public final char getChar(int index) {
+ return (char) getShort(index);
+ }
+
+ @Override
+ public final ByteBuffer putChar(char value) {
+ return putShort((short) value);
+ }
+
+ @Override
+ public final ByteBuffer putChar(int index, char value) {
+ return putShort(index, (short) value);
+ }
}
Modified: harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/Buffer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/Buffer.java?rev=578502&r1=578501&r2=578502&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/Buffer.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/nio/src/main/java/java/nio/Buffer.java Sat Sep 22 14:24:54 2007
@@ -16,7 +16,6 @@
package java.nio;
-
/**
* A buffer is a list of elements of a specific primitive type.
* <p>
@@ -46,52 +45,51 @@
* required, then the callers are responsible to take care of the
* synchronization issues.
* </p>
- *
*/
public abstract class Buffer {
- /**
- * <code>UNSET_MARK</code> means the mark has not been set.
- */
- final static int UNSET_MARK = -1;
-
- /**
- * The capacity of this buffer, which never change.
- */
- final int capacity;
-
- /**
- * <code>limit - 1</code> is the last element that can be read or write.
- * Limit must be no less than zero and no greater than <code>capacity</code>.
- */
- int limit;
-
- /**
- * Mark is the position will be set when <code>reset()</code> is called.
- * Mark is not set by default. Mark is always no less than zero and no
- * greater than <code>position</code>.
- */
- int mark = UNSET_MARK;
-
- /**
- * The current position of this buffer. Position is always no less than zero
- * and no greater than <code>limit</code>.
- */
- int position = 0;
-
- /**
- * Construct a buffer with the specified capacity.
- *
- * @param capacity
- * The capacity of this buffer
- */
- Buffer(int capacity) {
- super();
- if (capacity < 0) {
- throw new IllegalArgumentException();
- }
- this.capacity = this.limit = capacity;
- }
+ /**
+ * <code>UNSET_MARK</code> means the mark has not been set.
+ */
+ final static int UNSET_MARK = -1;
+
+ /**
+ * The capacity of this buffer, which never change.
+ */
+ final int capacity;
+
+ /**
+ * <code>limit - 1</code> is the last element that can be read or write.
+ * Limit must be no less than zero and no greater than <code>capacity</code>.
+ */
+ int limit;
+
+ /**
+ * Mark is the position will be set when <code>reset()</code> is called.
+ * Mark is not set by default. Mark is always no less than zero and no
+ * greater than <code>position</code>.
+ */
+ int mark = UNSET_MARK;
+
+ /**
+ * The current position of this buffer. Position is always no less than zero
+ * and no greater than <code>limit</code>.
+ */
+ int position = 0;
+
+ /**
+ * Construct a buffer with the specified capacity.
+ *
+ * @param capacity
+ * The capacity of this buffer
+ */
+ Buffer(int capacity) {
+ super();
+ if (capacity < 0) {
+ throw new IllegalArgumentException();
+ }
+ this.capacity = this.limit = capacity;
+ }
/**
* Answers the array that backs this buffer.
@@ -139,50 +137,51 @@
*/
public abstract int arrayOffset();
- /**
- * Returns the capacity of this buffer.
- *
- * @return The number of elements that are contained in this buffer.
- */
- public final int capacity() {
- return capacity;
- }
-
- /**
- * Clears this buffer.
- * <p>
- * While the content of this buffer is not changed the following internal
- * changes take place : the current position is reset back to the start of the buffer,
- * the value of the buffer limit is made equal to the capacity and mark is unset.
- * </p>
- *
- * @return This buffer
- */
- public final Buffer clear() {
- position = 0;
- mark = UNSET_MARK;
- limit = capacity;
- return this;
- }
-
- /**
- * Flips this buffer.
- * <p>
- * The limit is set to the current position, then the position is set to
- * zero, and the mark is cleared.
- * </p>
- * <p>
- * The content of this buffer is not changed.
- * </p>
- *
- * @return This buffer
- */
- public final Buffer flip() {
- limit = position;
- position = 0;
- mark = UNSET_MARK;
- return this;
- }
+ /**
+ * Returns the capacity of this buffer.
+ *
+ * @return The number of elements that are contained in this buffer.
+ */
+ public final int capacity() {
+ return capacity;
+ }
+
+ /**
+ * Clears this buffer.
+ * <p>
+ * While the content of this buffer is not changed the following internal
+ * changes take place : the current position is reset back to the start of
+ * the buffer, the value of the buffer limit is made equal to the capacity
+ * and mark is unset.
+ * </p>
+ *
+ * @return This buffer
+ */
+ public final Buffer clear() {
+ position = 0;
+ mark = UNSET_MARK;
+ limit = capacity;
+ return this;
+ }
+
+ /**
+ * Flips this buffer.
+ * <p>
+ * The limit is set to the current position, then the position is set to
+ * zero, and the mark is cleared.
+ * </p>
+ * <p>
+ * The content of this buffer is not changed.
+ * </p>
+ *
+ * @return This buffer
+ */
+ public final Buffer flip() {
+ limit = position;
+ position = 0;
+ mark = UNSET_MARK;
+ return this;
+ }
/**
* Answers if this buffer is backed by an available array.
@@ -197,17 +196,17 @@
*/
public abstract boolean hasArray();
- /**
- * Returns true if there are remaining element(s) in this buffer.
- * <p>
- * Or more precisely, returns <code>position < limit</code>.
- * </p>
- *
- * @return True if there are remaining element(s) in this buffer.
- */
- public final boolean hasRemaining() {
- return position < limit;
- }
+ /**
+ * Returns true if there are remaining element(s) in this buffer.
+ * <p>
+ * Or more precisely, returns <code>position < limit</code>.
+ * </p>
+ *
+ * @return True if there are remaining element(s) in this buffer.
+ */
+ public final boolean hasRemaining() {
+ return position < limit;
+ }
/**
* Answers if this buffer is direct.
@@ -218,140 +217,140 @@
*/
public abstract boolean isDirect();
- /**
- * Returns whether this buffer is readonly or not.
- *
- * @return Whether this buffer is readonly or not.
- */
- public abstract boolean isReadOnly();
-
- /**
- * Returns the limit of this buffer.
- *
- * @return The limit of this buffer.
- */
- public final int limit() {
- return limit;
- }
-
- /**
- * Sets the limit of this buffer.
- * <p>
- * If the current position in the buffer is in excess of
- * <code>newLimit</code> then, on returning from this call, it will have
- * been adjusted to be equivalent to <code>newLimit</code>. If the mark
- * is set and is greater than the new limit, then it is cleared.
- * </p>
- *
- * @param newLimit
- * The new limit, must be no less than zero and no greater than
- * capacity
- * @return This buffer
- * @exception IllegalArgumentException
- * If <code>newLimit</code> is invalid.
- */
- public final Buffer limit(int newLimit) {
- if (newLimit < 0 || newLimit > capacity) {
- throw new IllegalArgumentException();
- }
-
- limit = newLimit;
- if (position > newLimit) {
- position = newLimit;
- }
- if ((mark != UNSET_MARK) && (mark > newLimit)) {
- mark = UNSET_MARK;
- }
- return this;
- }
-
- /**
- * Mark the current position, so that the position may return to this point
- * later by calling <code>reset()</code>.
- *
- * @return This buffer
- */
- public final Buffer mark() {
- mark = position;
- return this;
- }
-
- /**
- * Returns the position of this buffer.
- *
- * @return The value of this buffer's current position.
- */
- public final int position() {
- return position;
- }
-
- /**
- * Sets the position of this buffer.
- * <p>
- * If the mark is set and is greater than the new position, then it is
- * cleared.
- * </p>
- *
- * @param newPosition
- * The new position, must be no less than zero and no greater
- * than limit
- * @return This buffer
- * @exception IllegalArgumentException
- * If <code>newPosition</code> is invalid
- */
- public final Buffer position(int newPosition) {
- if (newPosition < 0 || newPosition > limit) {
- throw new IllegalArgumentException();
- }
-
- position = newPosition;
- if ((mark != UNSET_MARK) && (mark > position)) {
- mark = UNSET_MARK;
- }
- return this;
- }
-
- /**
- * Returns the number of remaining elements in this buffer.
- * <p>
- * Or more precisely, returns <code>limit - position</code>.
- * </p>
- *
- * @return The number of remaining elements in this buffer.
- */
- public final int remaining() {
- return limit - position;
- }
-
- /**
- * Reset the position of this buffer to the <code>mark</code>.
- *
- * @return This buffer
- * @exception InvalidMarkException
- * If the mark is not set
- */
- public final Buffer reset() {
- if (mark == UNSET_MARK) {
- throw new InvalidMarkException();
- }
- position = mark;
- return this;
- }
-
- /**
- * Rewinds this buffer.
- * <p>
- * The position is set to zero, and the mark is cleared.
- * </p>
- * <p>
- * The content of this buffer is not changed.
- * </p>
- *
- * @return This buffer
- */
- public final Buffer rewind() {
- position = 0;
- mark = UNSET_MARK;
- return this;
- }
+ /**
+ * Returns whether this buffer is readonly or not.
+ *
+ * @return Whether this buffer is readonly or not.
+ */
+ public abstract boolean isReadOnly();
+
+ /**
+ * Returns the limit of this buffer.
+ *
+ * @return The limit of this buffer.
+ */
+ public final int limit() {
+ return limit;
+ }
+
+ /**
+ * Sets the limit of this buffer.
+ * <p>
+ * If the current position in the buffer is in excess of
+ * <code>newLimit</code> then, on returning from this call, it will have
+ * been adjusted to be equivalent to <code>newLimit</code>. If the mark
+ * is set and is greater than the new limit, then it is cleared.
+ * </p>
+ *
+ * @param newLimit
+ * The new limit, must be no less than zero and no greater than
+ * capacity
+ * @return This buffer
+ * @exception IllegalArgumentException
+ * If <code>newLimit</code> is invalid.
+ */
+ public final Buffer limit(int newLimit) {
+ if (newLimit < 0 || newLimit > capacity) {
+ throw new IllegalArgumentException();
+ }
+
+ limit = newLimit;
+ if (position > newLimit) {
+ position = newLimit;
+ }
+ if ((mark != UNSET_MARK) && (mark > newLimit)) {
+ mark = UNSET_MARK;
+ }
+ return this;
+ }
+
+ /**
+ * Mark the current position, so that the position may return to this point
+ * later by calling <code>reset()</code>.
+ *
+ * @return This buffer
+ */
+ public final Buffer mark() {
+ mark = position;
+ return this;
+ }
+
+ /**
+ * Returns the position of this buffer.
+ *
+ * @return The value of this buffer's current position.
+ */
+ public final int position() {
+ return position;
+ }
+
+ /**
+ * Sets the position of this buffer.
+ * <p>
+ * If the mark is set and is greater than the new position, then it is
+ * cleared.
+ * </p>
+ *
+ * @param newPosition
+ * The new position, must be no less than zero and no greater
+ * than limit
+ * @return This buffer
+ * @exception IllegalArgumentException
+ * If <code>newPosition</code> is invalid
+ */
+ public final Buffer position(int newPosition) {
+ if (newPosition < 0 || newPosition > limit) {
+ throw new IllegalArgumentException();
+ }
+
+ position = newPosition;
+ if ((mark != UNSET_MARK) && (mark > position)) {
+ mark = UNSET_MARK;
+ }
+ return this;
+ }
+
+ /**
+ * Returns the number of remaining elements in this buffer.
+ * <p>
+ * Or more precisely, returns <code>limit - position</code>.
+ * </p>
+ *
+ * @return The number of remaining elements in this buffer.
+ */
+ public final int remaining() {
+ return limit - position;
+ }
+
+ /**
+ * Reset the position of this buffer to the <code>mark</code>.
+ *
+ * @return This buffer
+ * @exception InvalidMarkException
+ * If the mark is not set
+ */
+ public final Buffer reset() {
+ if (mark == UNSET_MARK) {
+ throw new InvalidMarkException();
+ }
+ position = mark;
+ return this;
+ }
+
+ /**
+ * Rewinds this buffer.
+ * <p>
+ * The position is set to zero, and the mark is cleared.
+ * </p>
+ * <p>
+ * The content of this buffer is not changed.
+ * </p>
+ *
+ * @return This buffer
+ */
+ public final Buffer rewind() {
+ position = 0;
+ mark = UNSET_MARK;
+ return this;
+ }
}