You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2007/07/23 07:51:37 UTC

svn commit: r558609 [1/2] - in /harmony/enhanced/classlib/branches/java6/modules: awt/ awt/src/main/java/common/java/awt/dnd/ awt/src/main/java/common/org/apache/harmony/awt/gl/ awt/src/main/java/common/org/apache/harmony/awt/internal/nls/ awt/src/main...

Author: pyang
Date: Sun Jul 22 22:51:34 2007
New Revision: 558609

URL: http://svn.apache.org/viewvc?view=rev&rev=558609
Log:
Merge updates from classlib trunk@558482 since r557505

Added:
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.h
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/windows/FontLibExports.h
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingAbstractButtonPersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingAbstractButtonPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingBoxPersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingBoxPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingDefaultComboBoxModelPersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingDefaultComboBoxModelPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingJFramePersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingJFramePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingJTabbedPanePersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingJTabbedPanePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingToolTipManagerPersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/SwingToolTipManagerPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/UtilListPersistenceDelegate.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/UtilListPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox04.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox04.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox041.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox041.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox0411.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox0411.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSubClass.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSubClass.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSubClassBeanInfo.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSubClassBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSuperClass.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSuperClass.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSuperClassBeanInfo.java
      - copied unchanged from r558482, harmony/enhanced/classlib/trunk/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockNullSuperClassBeanInfo.java
Modified:
    harmony/enhanced/classlib/branches/java6/modules/awt/build.xml
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/GraphicsFactory.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/makefile
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/include/org_apache_harmony_awt_gl_font_NativeFont.h
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/makefile
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp
    harmony/enhanced/classlib/branches/java6/modules/beans/META-INF/MANIFEST.MF
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Encoder.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLDecoder.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLEncoder.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox01BeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031BeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03BeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockBean4StaticField.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockInterfaceBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockJavaBean.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/MockSubClassBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/GregorianCalendar.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/Hashtable.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/build.xml?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/build.xml (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/build.xml Sun Jul 22 22:51:34 2007
@@ -138,7 +138,9 @@
     </target>
 
     <target name="build-native"
-        depends="-build-native-unix,-build-native-windows">
+        depends="-build-native-common,-build-native-unix,-build-native-windows" />
+        
+    <target name="-build-native-common">
         <make dir="${hy.awt.src.main.native}/lcmm/${hy.os.family}" />
         <!-- Copy the built shared libs over to the jre/bin dir -->
         <copy todir="${hy.jdk}/jre/bin" overwrite="yes">

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/dnd/DropTarget.java Sun Jul 22 22:51:34 2007
@@ -35,6 +35,7 @@
 
 import org.apache.harmony.awt.datatransfer.DTK;
 import org.apache.harmony.awt.internal.nls.Messages;
+import org.apache.harmony.luni.util.NotImplementedException;
 
 public class DropTarget implements DropTargetListener, Serializable {
 
@@ -49,17 +50,14 @@
             point = p;
         }
 
-        protected void stop() {
-            // TODO implement
+        protected void stop() throws NotImplementedException{
         }
 
-        protected void updateLocation(Point newLocn) {
+        protected void updateLocation(Point newLocn) throws NotImplementedException {
             point = (Point)newLocn.clone();
-            // TODO implement
         }
 
-        public void actionPerformed(ActionEvent e) {
-            // TODO implement
+        public void actionPerformed(ActionEvent e) throws NotImplementedException{
         }
 
     }
@@ -112,12 +110,11 @@
         return new DropTargetAutoScroller(c, p);
     }
 
-    public void removeNotify(ComponentPeer peer) {
+    public void removeNotify(ComponentPeer peer) throws NotImplementedException{
         context.removeNotify();
-        // TODO: implement
     }
 
-    public void addNotify(ComponentPeer peer) {
+    public void addNotify(ComponentPeer peer) throws NotImplementedException {
         if(component == null) {
             return;
         }
@@ -125,7 +122,6 @@
         DTK dtk = DTK.getDTK();
         DropTargetContextPeer dtp = dtk.createDropTargetContextPeer(context);
         context.addNotify(dtp);
-        // TODO: implement
     }
 
     public synchronized void removeDropTargetListener(DropTargetListener dtl) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/CommonGraphics2DFactory.java Sun Jul 22 22:51:34 2007
@@ -24,6 +24,8 @@
 import java.awt.FontMetrics;
 import java.awt.peer.FontPeer;
 
+import java.io.IOException;
+
 import org.apache.harmony.awt.wtk.GraphicsFactory;
 
 /**
@@ -46,6 +48,6 @@
      * @param fontFilePath path to the font file 
      * @return Font object that was created from the file.
      */
-    public abstract Font embedFont(String fontFilePath);
+    public abstract Font embedFont(String fontFilePath) throws IOException;
 
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/internal/nls/messages.properties Sun Jul 22 22:51:34 2007
@@ -487,6 +487,7 @@
 awt.296=can't allocate memory on video card to create new display list
 awt.297=Invalid keyLocation
 awt.298=dataBuffer is too small
+awt.299=Font file can not be read
 
 awt.err.00=file dialog {0} error!
 awt.err.01=error: {0}

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/GraphicsFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/GraphicsFactory.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/GraphicsFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/wtk/GraphicsFactory.java Sun Jul 22 22:51:34 2007
@@ -25,6 +25,7 @@
 import java.awt.Graphics2D;
 import java.awt.GraphicsEnvironment;
 import java.awt.peer.FontPeer;
+import java.io.IOException;
 import org.apache.harmony.awt.gl.MultiRectArea;
 import org.apache.harmony.awt.gl.font.FontManager;
 
@@ -71,5 +72,5 @@
     // Font methods
     FontManager getFontManager();
     FontPeer getFontPeer(Font font);
-    Font embedFont(String fontFilePath);
+    Font embedFont(String fontFilePath) throws IOException;
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/NativeFont.java Sun Jul 22 22:51:34 2007
@@ -21,10 +21,13 @@
 package org.apache.harmony.awt.gl.font;
 
 import java.awt.Font;
+import java.io.IOException;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Hashtable;
 
+import org.apache.harmony.awt.internal.nls.Messages;
+
 public class NativeFont {
 
     /**
@@ -70,7 +73,7 @@
      *  
      * @param absolutePath String that represent absolute path to the font resource. 
      */
-    public static native boolean embedFontNative(String absolutePath);
+    public static native String embedFontNative(String absolutePath);
 
     /** 
      * Initialize native GDI font object and return font handle, also sets font 
@@ -463,9 +466,12 @@
      *  
      * @param absolutePath absolute path to the font resource file
      */
-    public static Font embedFont(String absolutePath){
-        // TODO: implement method
-        return null;
+    public static Font embedFont(String absolutePath) throws IOException {
+        String familyName = embedFontNative(absolutePath);
+        if (familyName == null)
+            throw new IOException(Messages.getString("awt.299"));
+
+        return new Font(familyName, Font.PLAIN, 1);
     }
     
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/font/WindowsFont.java Sun Jul 22 22:51:34 2007
@@ -30,6 +30,7 @@
 import java.awt.image.IndexColorModel;
 import java.awt.image.Raster;
 import java.awt.image.WritableRaster;
+import java.io.IOException;
 import java.util.Hashtable;
 import java.util.Locale;
 
@@ -340,7 +341,7 @@
     /**
      * Return Font object if it was successfully embedded in the system.
      */
-    public static Font embedFont(String absolutePath){
+    public static Font embedFont(String absolutePath) throws IOException {
         return NativeFont.embedFont(absolutePath);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGraphics2DFactory.java Sun Jul 22 22:51:34 2007
@@ -22,6 +22,8 @@
 
 import java.awt.*;
 
+import java.io.IOException;
+
 import org.apache.harmony.awt.gl.CommonGraphics2DFactory;
 import org.apache.harmony.awt.gl.MultiRectArea;
 import org.apache.harmony.awt.gl.opengl.OGLGraphics2D;
@@ -70,7 +72,7 @@
     }
 
     @Override
-    public Font embedFont(String fontFilePath) {
+    public Font embedFont(String fontFilePath) throws IOException {
         return WindowsFont.embedFont(fontFilePath);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/makefile?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/makefile Sun Jul 22 22:51:34 2007
@@ -35,7 +35,8 @@
   $(SHAREDSUB)T1Glyph.obj \
   $(SHAREDSUB)TTCurve.obj \
   $(SHAREDSUB)TTFont.obj \
-  $(SHAREDSUB)TypeDefinition.obj
+  $(SHAREDSUB)TypeDefinition.obj \
+  FontLibExports.obj
 
 VIRTFILES = $(LIBBASE).res
 SYSLIBFILES = ws2_32.lib Iphlpapi.lib

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/include/org_apache_harmony_awt_gl_font_NativeFont.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/include/org_apache_harmony_awt_gl_font_NativeFont.h?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/include/org_apache_harmony_awt_gl_font_NativeFont.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/include/org_apache_harmony_awt_gl_font_NativeFont.h Sun Jul 22 22:51:34 2007
@@ -63,7 +63,7 @@
 /*
  * Method: org.apache.harmony.awt.gl.font.NativeFont.embedFontNative(Ljava/lang/String;)Z
  */
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jstring JNICALL
 Java_org_apache_harmony_awt_gl_font_NativeFont_embedFontNative(JNIEnv *, jclass, 
     jstring);
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/makefile?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/makefile Sun Jul 22 22:51:34 2007
@@ -22,15 +22,15 @@
 LIBNAME=$(LIBPATH)$(LIBBASE).lib
 HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def
 
-HYCFLAGS = $(HYCFLAGS) /Iinclude /I..\..\gl\windows\include \
+HYCFLAGS = $(HYCFLAGS) /Iinclude /I..\..\gl\windows\include /I..\..\fontlib\shared /I..\..\fontlib\windows \
   -DUNICODE -D_UNICODE
 
 BUILDFILES = winFont.obj
 
 VIRTFILES = $(LIBBASE).res
-SYSLIBFILES = ws2_32.lib Iphlpapi.lib gdi32.lib GdiPlus.lib advapi32.lib
+SYSLIBFILES = ws2_32.lib Iphlpapi.lib gdi32.lib GdiPlus.lib advapi32.lib 
 
-MDLLIBFILES = $(MDLLIBFILES) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX)
+MDLLIBFILES = $(MDLLIBFILES) $(LIBPATH)hypool$(HY_LINKLIB_SUFFIX) $(LIBPATH)vmi$(HY_LINKLIB_SUFFIX) $(LIBPATH)FL$(HY_LINKLIB_SUFFIX)
 
 DLLBASE=0x13300000
 COMMENT=/comment:"Win32 Font native code. (c) Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable."

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp Sun Jul 22 22:51:34 2007
@@ -33,6 +33,8 @@
 #include "org_apache_harmony_awt_gl_font_WinGlyph.h"
 #include "exceptions.h"
 
+#include <FontLibExports.h> // Font file tables parsing routines for embedFontNative method
+
 static LCIDS lcidTable;
 static FontRecords fonts;           /* Cached system fonts data             */
 static int famSize = 256;           /* Size of families array               */
@@ -457,7 +459,7 @@
 * Signature: (Ljava/lang/String;)Z
 * Description: Returns TRUE if Font resource from font file added successfully to a system.
 */
-JNIEXPORT jboolean JNICALL 
+JNIEXPORT jstring JNICALL 
 Java_org_apache_harmony_awt_gl_font_NativeFont_embedFontNative(JNIEnv *env, jclass obj, jstring absPath) {
 
     jboolean iscopy;
@@ -465,12 +467,24 @@
     const TCHAR * path;
     path = (TCHAR *)(env->GetStringCritical(absPath, &iscopy));
 
-    fontAdded = AddFontResource(path);
+    fontAdded = AddFontResourceEx(path, FR_PRIVATE, 0);
+    
+    fwchar_t *familyName = 0;
+
+    if (fontAdded) {
+        getFontFamilyName((fwchar_t *)path, &familyName);
+    }    
 
-    // message to other applications about installed font
-    //  SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
     env->ReleaseStringCritical(absPath, (const jchar *)path);
-    return fontAdded;
+    
+    jstring res = 0;
+    if (fontAdded && familyName) {
+        int len = wcslen(familyName);
+        res = env->NewString((jchar *)familyName, len);
+        delete familyName;
+    }
+    
+    return res;
 }
 
 /*

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/META-INF/MANIFEST.MF?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/META-INF/MANIFEST.MF Sun Jul 22 22:51:34 2007
@@ -29,6 +29,8 @@
  java.util.regex;resolution:=optional,
  javax.accessibility;resolution:=optional,
  javax.swing,
+ javax.swing.plaf.basic,
+ javax.swing.tree,
  javax.xml.parsers,
  org.apache.harmony.kernel.vm,
  org.apache.harmony.testframework.serialization;hy_usage=test;resolution:=optional,

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Encoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Encoder.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Encoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Encoder.java Sun Jul 22 22:51:34 2007
@@ -26,6 +26,8 @@
 import java.util.Map;
 import java.util.Hashtable;
 
+import javax.swing.*;
+
 import org.apache.harmony.beans.*;
 
 /**
@@ -102,6 +104,12 @@
         delegates.put(SystemColor.class, new AwtSystemColorPersistenceDelegate());
         delegates.put(TextAttribute.class, new AwtFontTextAttributePersistenceDelegate());
         
+        delegates.put(Box.class, new SwingBoxPersistenceDelegate());
+        delegates.put(JFrame.class, new SwingJFramePersistenceDelegate());
+        delegates.put(JTabbedPane.class, new SwingJTabbedPanePersistenceDelegate());
+        delegates.put(DefaultComboBoxModel.class, new SwingDefaultComboBoxModelPersistenceDelegate());
+        delegates.put(ToolTipManager.class, new SwingToolTipManagerPersistenceDelegate());
+        
 	}
 
 	private ExceptionListener listener = defaultExListener;
@@ -188,6 +196,10 @@
 		if (registeredPD != null) {
 			return registeredPD;
 		}
+        
+        if (java.util.List.class.isAssignableFrom(type)) {
+            return new UtilListPersistenceDelegate();
+        }
 		
         if (Collection.class.isAssignableFrom(type)) {
             return new UtilCollectionPersistenceDelegate();

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventSetDescriptor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventSetDescriptor.java Sun Jul 22 22:51:34 2007
@@ -112,7 +112,7 @@
         Method method = null;
         Method[] methods = listenerType.getMethods();
         for (Method m : methods) {
-            if (m.getName().equals(listenerMethodName)) {
+            if (listenerMethodName.equals(m.getName())) {
                 Class[] paramTypes = m.getParameterTypes();
                 if (paramTypes.length == 1
                         && paramTypes[0].getName().endsWith("Event")) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyChangeSupport.java Sun Jul 22 22:51:34 2007
@@ -36,6 +36,8 @@
 
     private Object source;
 
+    @SuppressWarnings("unused")
+    // for serialization compatibility
     private int propertyChangeSupportSerializedDataVersion = 1;
 
     public PropertyChangeSupport(Object sourceBean) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLDecoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLDecoder.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLDecoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLDecoder.java Sun Jul 22 22:51:34 2007
@@ -55,7 +55,7 @@
 
         boolean inJavaElem = false;
 
-        HashMap idObjMap = new HashMap();
+        HashMap<String, Object> idObjMap = new HashMap<String, Object>();
 
         public void characters(char[] ch, int start, int length)
                 throws SAXException {
@@ -289,7 +289,7 @@
 
         private Object executeCommon(Elem elem) throws Exception {
             // pop args
-            ArrayList args = new ArrayList(5);
+            ArrayList<Object> args = new ArrayList<Object>(5);
             while (readObjs.peek() != elem) {
                 Elem argElem = (Elem) readObjs.pop();
                 args.add(0, argElem.result);
@@ -415,7 +415,7 @@
 
     private Object owner;
 
-    private Stack readObjs = new Stack();
+    private Stack<Elem> readObjs = new Stack<Elem>();
 
     private int readObjIndex = 0;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLEncoder.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLEncoder.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLEncoder.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/XMLEncoder.java Sun Jul 22 22:51:34 2007
@@ -58,7 +58,7 @@
 		int refCount = 0;
 
 		// A list of statements that execute on the object.
-		ArrayList stats = new ArrayList();
+		ArrayList<Statement> stats = new ArrayList<Statement>();
 	}
 
 	private static final int INDENT_UNIT = 1;
@@ -66,13 +66,13 @@
 	private static final boolean isStaticConstantsSupported = true;
 
 	// the main record of all root objects
-	private ArrayList flushPending = new ArrayList();
+	private ArrayList<Object> flushPending = new ArrayList<Object>();
 
 	// the record of root objects with a void tag
-	private ArrayList flushPendingStat = new ArrayList();
+	private ArrayList<Object> flushPendingStat = new ArrayList<Object>();
 
 	// keep the pre-required objects for each root object
-	private ArrayList flushPrePending = new ArrayList();
+	private ArrayList<Object> flushPrePending = new ArrayList<Object>();
 
 	private boolean hasXmlHeader = false;
 
@@ -769,10 +769,10 @@
 				Statement stat = (Statement) iter.next();
 				try {
 					if (stat instanceof Expression) {
-						Expression expr = (Expression) stat;
-						Object subObj = expr.getValue();
-						// if(expr.getTarget().getClass() ==
-						// Class.class.getClass())
+                        // Expression expr = (Expression) stat;
+                        // Object subObj = expr.getValue();
+                        // if(expr.getTarget().getClass() ==
+                        // Class.class.getClass())
 						flushPrePending.add(value);
 					}
 				} catch (Exception e) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextServicesSupport.java Sun Jul 22 22:51:34 2007
@@ -31,9 +31,9 @@
 import org.apache.harmony.beans.internal.nls.Messages;
 
 /**
- * This support class implements <code>BeanContextServices</code> interface. 
- * This class can be used directly, or be a super class of your class,
- * or be a delegate of your implementation that needs to support 
+ * This support class implements <code>BeanContextServices</code> interface.
+ * This class can be used directly, or be a super class of your class, or be a
+ * delegate of your implementation that needs to support
  * <code>BeanContextServices</code> interface.
  * 
  */
@@ -72,18 +72,19 @@
 
     /**
      * Every child of context is companied with a <code>BCSSChild</code>
-     * instance. It can hold implementation specific information about
-     * each child.
+     * instance. It can hold implementation specific information about each
+     * child.
      * <p>
-     * This class keeps records of all services requests submitted by
-     * this child.</p>
+     * This class keeps records of all services requests submitted by this
+     * child.
+     * </p>
      * 
      */
     protected class BCSSChild extends BeanContextSupport.BCSChild {
 
-    	private static final long serialVersionUID = -3263851306889194873L;
+        private static final long serialVersionUID = -3263851306889194873L;
 
-        transient ArrayList serviceRecords;
+        transient ArrayList<ServiceRecord> serviceRecords;
 
         BCSSChild(Object child, Object proxyPeer) {
             super(child, proxyPeer);
@@ -92,13 +93,14 @@
     }
 
     /**
-     * This class implements the <code>BeanContextServiceProvider</code> 
+     * This class implements the <code>BeanContextServiceProvider</code>
      * interface by wrapping a <code>BeanContextServices</code>. All services
-     * registered in the <code>BeanContextServices</code> are accessible 
-     * via this wrapper service provider.
+     * registered in the <code>BeanContextServices</code> are accessible via
+     * this wrapper service provider.
      * <p>
      * This class is used by <code>BeanContextServicesSupport</code> to access
-     * services provided by its parent context (if there is one).</p>
+     * services provided by its parent context (if there is one).
+     * </p>
      * 
      */
     protected class BCSSProxyServiceProvider implements
@@ -178,11 +180,12 @@
     }
 
     /**
-     * Every servie registered in this context is companied with a 
-     * <code>BCSSServiceProvider</code> instance. It can hold implementation 
+     * Every servie registered in this context is companied with a
+     * <code>BCSSServiceProvider</code> instance. It can hold implementation
      * specific information about each registered service.
      * <p>
-     * This class holds a reference to the service provider of the service.</p>
+     * This class holds a reference to the service provider of the service.
+     * </p>
      * 
      */
     protected static class BCSSServiceProvider implements Serializable {
@@ -212,11 +215,11 @@
     static final long serialVersionUID = -8494482757288719206L;
 
     /**
-     * A map of all registered services - key is service class, value is 
-     * <code>BCSSServiceProvider</code> object.
-     * All access to this object should be synchronized on itself.
+     * A map of all registered services - key is service class, value is
+     * <code>BCSSServiceProvider</code> object. All access to this object
+     * should be synchronized on itself.
      */
-    protected transient HashMap services;
+    protected transient HashMap<Class, BCSSServiceProvider> services;
 
     /**
      * The number of serializable service providers currently registered.
@@ -224,16 +227,16 @@
     protected transient int serializable;
 
     /**
-     * A proxy service provider that delegates service requests to the 
-     * parent context.
+     * A proxy service provider that delegates service requests to the parent
+     * context.
      */
     protected transient BCSSProxyServiceProvider proxy;
 
     /**
-     * A list of registered <code>BeanContextServicesListener</code>s.
-     * All access to this object should be synchronized on itself.
+     * A list of registered <code>BeanContextServicesListener</code>s. All
+     * access to this object should be synchronized on itself.
      */
-    protected transient ArrayList bcsListeners;
+    protected transient ArrayList<BeanContextServicesListener> bcsListeners;
 
     /**
      * Constructs a standload <code>BeanContextServicesSupport</code>.
@@ -243,33 +246,39 @@
     }
 
     /**
-     * Constructs a <code>BeanContextServicesSupport</code> which is a delegate
-     * of the given peer.
+     * Constructs a <code>BeanContextServicesSupport</code> which is a
+     * delegate of the given peer.
      * 
-     * @param peer  the peer of this context
+     * @param peer
+     *            the peer of this context
      */
     public BeanContextServicesSupport(BeanContextServices peer) {
         super(peer);
     }
 
     /**
-     * Constructs a <code>BeanContextServicesSupport</code> which is a delegate
-     * of the given peer.
+     * Constructs a <code>BeanContextServicesSupport</code> which is a
+     * delegate of the given peer.
      * 
-     * @param peer      the peer of this context
-     * @param locale    the locale of this context
+     * @param peer
+     *            the peer of this context
+     * @param locale
+     *            the locale of this context
      */
     public BeanContextServicesSupport(BeanContextServices peer, Locale locale) {
         super(peer, locale);
     }
 
     /**
-     * Constructs a <code>BeanContextServicesSupport</code> which is a delegate
-     * of the given peer.
+     * Constructs a <code>BeanContextServicesSupport</code> which is a
+     * delegate of the given peer.
      * 
-     * @param peer          the peer of this context
-     * @param locale        the locale of this context
-     * @param designTime    whether in design mode or not
+     * @param peer
+     *            the peer of this context
+     * @param locale
+     *            the locale of this context
+     * @param designTime
+     *            whether in design mode or not
      */
     public BeanContextServicesSupport(BeanContextServices peer, Locale locale,
             boolean designTime) {
@@ -277,20 +286,26 @@
     }
 
     /**
-     * Constructs a <code>BeanContextServicesSupport</code> which is a delegate
-     * of the given peer.
+     * Constructs a <code>BeanContextServicesSupport</code> which is a
+     * delegate of the given peer.
      * 
-     * @param peer          the peer of this context
-     * @param locale        the locale of this context
-     * @param designTime    whether in design mode or not
-     * @param okToUseGui    whether GUI is usable or not
+     * @param peer
+     *            the peer of this context
+     * @param locale
+     *            the locale of this context
+     * @param designTime
+     *            whether in design mode or not
+     * @param okToUseGui
+     *            whether GUI is usable or not
      */
     public BeanContextServicesSupport(BeanContextServices peer, Locale locale,
             boolean designTime, boolean okToUseGui) {
         super(peer, locale, designTime, okToUseGui);
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.beans.beancontext.BeanContextServices#addBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
      */
     public void addBeanContextServicesListener(
@@ -306,9 +321,11 @@
     /**
      * Add a service to this context.
      * <p>
-     * Delegate to <code>addService(serviceClass, provider, true)</code>.</p>
+     * Delegate to <code>addService(serviceClass, provider, true)</code>.
+     * </p>
      * 
-     * @see java.beans.beancontext.BeanContextServices#addService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider)
+     * @see java.beans.beancontext.BeanContextServices#addService(java.lang.Class,
+     *      java.beans.beancontext.BeanContextServiceProvider)
      */
     public boolean addService(Class serviceClass,
             BeanContextServiceProvider provider) {
@@ -319,12 +336,17 @@
      * Add a service to this context.
      * <p>
      * If the service already exists in the context, simply return false.
-     * Otherwise, the service is added and event is fired if required.</p>
+     * Otherwise, the service is added and event is fired if required.
+     * </p>
      * 
-     * @param serviceClass  the service class
-     * @param provider      the provider of the service
-     * @param fireEvent     the flag indicating to fire event or not
-     * @return true if the service is added; or false if the context already has this service
+     * @param serviceClass
+     *            the service class
+     * @param provider
+     *            the provider of the service
+     * @param fireEvent
+     *            the flag indicating to fire event or not
+     * @return true if the service is added; or false if the context already has
+     *         this service
      */
     protected boolean addService(Class serviceClass,
             BeanContextServiceProvider provider, boolean fireEvent) {
@@ -366,12 +388,13 @@
     }
 
     /**
-     * Deserializes all serializable services and their providers
-     * before the children of this context is deserialized.
+     * Deserializes all serializable services and their providers before the
+     * children of this context is deserialized.
      * <p>
      * First a <code>int</code> is read, indicating the number of services to
-     * read. Then pairs of service class and service provider are read one
-     * by one.</p>
+     * read. Then pairs of service class and service provider are read one by
+     * one.
+     * </p>
      * 
      * @see java.beans.beancontext.BeanContextSupport#bcsPreDeserializationHook(java.io.ObjectInputStream)
      */
@@ -385,18 +408,20 @@
             for (int i = 0; i < serializable; i++) {
                 Object serviceClass = ois.readObject();
                 Object bcssProvider = ois.readObject();
-                services.put(serviceClass, bcssProvider);
+                services.put((Class) serviceClass,
+                        (BCSSServiceProvider) bcssProvider);
             }
         }
     }
 
     /**
-     * Serializes all serializable services and their providers
-     * before the children of this context is serialized.
+     * Serializes all serializable services and their providers before the
+     * children of this context is serialized.
      * <p>
-     * First a <code>int</code> is writtern, indicating the number of 
-     * serializable services. Then pairs of service class and service 
-     * provider are writtern one by one.</p>
+     * First a <code>int</code> is writtern, indicating the number of
+     * serializable services. Then pairs of service class and service provider
+     * are writtern one by one.
+     * </p>
      * 
      * @see java.beans.beancontext.BeanContextSupport#bcsPreSerializationHook(java.io.ObjectOutputStream)
      */
@@ -421,9 +446,11 @@
     /**
      * This method is called everytime a child is removed from this context.
      * <p>
-     * The implementation releases all services requested by the child.</p>
+     * The implementation releases all services requested by the child.
+     * </p>
      * 
-     * @see java.beans.beancontext.BeanContextSupport#childJustRemovedHook(java.lang.Object, java.beans.beancontext.BeanContextSupport.BCSChild)
+     * @see java.beans.beancontext.BeanContextSupport#childJustRemovedHook(java.lang.Object,
+     *      java.beans.beancontext.BeanContextSupport.BCSChild)
      */
     protected void childJustRemovedHook(Object child, BCSChild bcsChild) {
         if (bcsChild instanceof BCSSChild) {
@@ -434,8 +461,10 @@
     /**
      * Release all services requested by the given child.
      * 
-     * @param bcssChild         a child
-     * @param delegatedServices only release services that are delegated to parent context
+     * @param bcssChild
+     *            a child
+     * @param delegatedServices
+     *            only release services that are delegated to parent context
      */
     private void releaseServicesForChild(BCSSChild bcssChild,
             boolean delegatedServices) {
@@ -463,17 +492,21 @@
     /**
      * Creates a <code>BCSSChild</code> object to company the given child.
      * 
-     * @see java.beans.beancontext.BeanContextSupport#createBCSChild(java.lang.Object, java.lang.Object)
+     * @see java.beans.beancontext.BeanContextSupport#createBCSChild(java.lang.Object,
+     *      java.lang.Object)
      */
     protected BCSChild createBCSChild(Object child, Object proxyPeer) {
         return new BCSSChild(child, proxyPeer);
     }
 
     /**
-     * Creates a <code>BCSSServiceProvider</code> to company the given service.
+     * Creates a <code>BCSSServiceProvider</code> to company the given
+     * service.
      * 
-     * @param serviceClass  the service class
-     * @param provider      the service provider
+     * @param serviceClass
+     *            the service class
+     * @param provider
+     *            the service provider
      * @return a <code>BCSSServiceProvider</code> to company the given service
      */
     protected BCSSServiceProvider createBCSSServiceProvider(Class serviceClass,
@@ -482,10 +515,11 @@
     }
 
     /**
-     * Fires a <code>BeanContextServiceAvailableEvent</code> to registered 
+     * Fires a <code>BeanContextServiceAvailableEvent</code> to registered
      * <code>BeanContextServicesListener</code>s.
      * 
-     * @param serviceClass  the service that has been added
+     * @param serviceClass
+     *            the service that has been added
      */
     protected final void fireServiceAdded(Class serviceClass) {
         fireServiceAdded(new BeanContextServiceAvailableEvent(this,
@@ -493,10 +527,11 @@
     }
 
     /**
-     * Fires a <code>BeanContextServiceAvailableEvent</code> to registered 
+     * Fires a <code>BeanContextServiceAvailableEvent</code> to registered
      * <code>BeanContextServicesListener</code>s.
      * 
-     * @param event     the event
+     * @param event
+     *            the event
      */
     protected final void fireServiceAdded(BeanContextServiceAvailableEvent event) {
         Object listeners[];
@@ -510,11 +545,13 @@
     }
 
     /**
-     * Fires a <code>BeanContextServiceRevokedEvent</code> to registered 
+     * Fires a <code>BeanContextServiceRevokedEvent</code> to registered
      * <code>BeanContextServicesListener</code>s.
      * 
-     * @param serviceClass  the service that has been revoked
-     * @param revokeNow     whether to terminate service immediately
+     * @param serviceClass
+     *            the service that has been revoked
+     * @param revokeNow
+     *            whether to terminate service immediately
      */
     protected final void fireServiceRevoked(Class serviceClass,
             boolean revokeNow) {
@@ -523,10 +560,11 @@
     }
 
     /**
-     * Fires a <code>BeanContextServiceRevokedEvent</code> to registered 
+     * Fires a <code>BeanContextServiceRevokedEvent</code> to registered
      * <code>BeanContextServicesListener</code>s.
      * 
-     * @param event     the event
+     * @param event
+     *            the event
      */
     protected final void fireServiceRevoked(BeanContextServiceRevokedEvent event) {
         Object listeners[];
@@ -540,33 +578,38 @@
     }
 
     /**
-     * Returns the peer of this context casted as <code>BeanContextServices</code>.
+     * Returns the peer of this context casted as
+     * <code>BeanContextServices</code>.
      * 
-     * @return the peer of this context casted as <code>BeanContextServices</code>
+     * @return the peer of this context casted as
+     *         <code>BeanContextServices</code>
      */
     public BeanContextServices getBeanContextServicesPeer() {
         return (BeanContextServices) beanContextChildPeer;
     }
 
     /**
-     * Returns the given child casted to <code>BeanContextServicesListener</code>,
-     * or null if it does not implements the interface.
-     * 
-     * @param child     a child
-     * @return the given child casted to <code>BeanContextServicesListener</code>,
-     * or null if it does not implements the interface
+     * Returns the given child casted to
+     * <code>BeanContextServicesListener</code>, or null if it does not
+     * implements the interface.
+     * 
+     * @param child
+     *            a child
+     * @return the given child casted to
+     *         <code>BeanContextServicesListener</code>, or null if it does
+     *         not implements the interface
      */
     protected static final BeanContextServicesListener getChildBeanContextServicesListener(
             Object child) {
         if (child instanceof BeanContextServicesListener) {
             return (BeanContextServicesListener) child;
         }
-		return null;
+        return null;
     }
 
     /**
-     * Returns an iterator of all registered service classes,
-     * with <code>removed()</code> disabled.
+     * Returns an iterator of all registered service classes, with
+     * <code>removed()</code> disabled.
      * 
      * @return an iterator of all registered service classes
      * @see java.beans.beancontext.BeanContextServices#getCurrentServiceClasses()
@@ -598,24 +641,33 @@
             if (bcssProvider != null) {
                 return bcssProvider.getServiceProvider();
             }
-			return null;
+            return null;
         }
     }
 
     /**
-     * Get a service instance on behalf of the specified child of this 
-     * context, by calling the registered service provider, or by delegating
-     * to the parent context.
+     * Get a service instance on behalf of the specified child of this context,
+     * by calling the registered service provider, or by delegating to the
+     * parent context.
      * 
-     * @param child             the child that request service
-     * @param requestor         the requestor object
-     * @param serviceClass      the service class
-     * @param serviceSelector   the service selectors
-     * @param bcsrl             the <code>BeanContextServiceRevokedListener</code>
-     * @return a service instance on behalf of the specified child of this context
-     * @throws IllegalArgumentException if <code>child</code> is not a child of this context
+     * @param child
+     *            the child that request service
+     * @param requestor
+     *            the requestor object
+     * @param serviceClass
+     *            the service class
+     * @param serviceSelector
+     *            the service selectors
+     * @param bcsrl
+     *            the <code>BeanContextServiceRevokedListener</code>
+     * @return a service instance on behalf of the specified child of this
+     *         context
+     * @throws IllegalArgumentException
+     *             if <code>child</code> is not a child of this context
      * @throws TooManyListenersException
-     * @see java.beans.beancontext.BeanContextServices#getService(java.beans.beancontext.BeanContextChild, java.lang.Object, java.lang.Class, java.lang.Object, java.beans.beancontext.BeanContextServiceRevokedListener)
+     * @see java.beans.beancontext.BeanContextServices#getService(java.beans.beancontext.BeanContextChild,
+     *      java.lang.Object, java.lang.Class, java.lang.Object,
+     *      java.beans.beancontext.BeanContextServiceRevokedListener)
      */
     public Object getService(BeanContextChild child, Object requestor,
             Class serviceClass, Object serviceSelector,
@@ -661,7 +713,7 @@
             // save record
             synchronized (child) {
                 if (bcssChild.serviceRecords == null) {
-                    bcssChild.serviceRecords = new ArrayList();
+                    bcssChild.serviceRecords = new ArrayList<ServiceRecord>();
                 }
                 bcssChild.serviceRecords.add(new ServiceRecord(provider, child,
                         requestor, serviceClass, bcsrl, service, isDelegate));
@@ -672,10 +724,11 @@
     }
 
     /**
-     * Checks whether a service is registed in this context or the
-     * parent context.
+     * Checks whether a service is registed in this context or the parent
+     * context.
      * 
-     * @param serviceClass  the service class
+     * @param serviceClass
+     *            the service class
      * @return true if the service is registered
      * @see java.beans.beancontext.BeanContextServices#hasService(java.lang.Class)
      */
@@ -695,28 +748,30 @@
         return has;
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.beans.beancontext.BeanContextSupport#initialize()
      */
     public void initialize() {
         super.initialize();
-        services = new HashMap();
+        services = new HashMap<Class, BCSSServiceProvider>();
         serializable = 0;
         proxy = null;
-        bcsListeners = new ArrayList();
+        bcsListeners = new ArrayList<BeanContextServicesListener>();
     }
 
     /**
-     * Called after the parent context is updated. The implementation 
-     * checks if the parent context is a <code>BeanContextServices</code>.
-     * If it is, then a <code>BCSSProxyServiceProvider</code> is created
-     * to delegate service requests to the parent context.
+     * Called after the parent context is updated. The implementation checks if
+     * the parent context is a <code>BeanContextServices</code>. If it is,
+     * then a <code>BCSSProxyServiceProvider</code> is created to delegate
+     * service requests to the parent context.
      * 
      * @see java.beans.beancontext.BeanContextChildSupport#initializeBeanContextResources()
      */
     protected void initializeBeanContextResources() {
         super.initializeBeanContextResources();
-        
+
         BeanContext context = getBeanContext();
         if (context instanceof BeanContextServices) {
             proxy = new BCSSProxyServiceProvider((BeanContextServices) context);
@@ -726,14 +781,14 @@
     }
 
     /**
-     * Called before the parent context is updated. The implementation
-     * releases any service that is currently provided by the parent context.
+     * Called before the parent context is updated. The implementation releases
+     * any service that is currently provided by the parent context.
      * 
      * @see java.beans.beancontext.BeanContextChildSupport#releaseBeanContextResources()
      */
     protected void releaseBeanContextResources() {
         super.releaseBeanContextResources();
-        
+
         releaseAllDelegatedServices();
         proxy = null;
     }
@@ -749,10 +804,14 @@
     /**
      * Release a service which has been requested previously.
      * 
-     * @param child     the child that request the service
-     * @param requestor the requestor object
-     * @param service   the service instance
-     * @throws IllegalArgumentException if <code>child</code> is not a child of this context
+     * @param child
+     *            the child that request the service
+     * @param requestor
+     *            the requestor object
+     * @param service
+     *            the service instance
+     * @throws IllegalArgumentException
+     *             if <code>child</code> is not a child of this context
      */
     public void releaseService(BeanContextChild child, Object requestor,
             Object service) {
@@ -805,7 +864,9 @@
         }
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.beans.beancontext.BeanContextServices#removeBeanContextServicesListener(java.beans.beancontext.BeanContextServicesListener)
      */
     public void removeBeanContextServicesListener(
@@ -821,15 +882,19 @@
     /**
      * Revokes a service in this bean context.
      * <p>
-     * The given service provider is unregistered and a 
-     * <code>BeanContextServiceRevokedEvent</code> is fired.
-     * All registered service listeners and current service users get
-     * notified.</p>
-     * 
-     * @param serviceClass      the service class
-     * @param serviceProvider   the service provider
-     * @param revokeCurrentServicesNow  true if service should be terminated immediantly
-     * @see java.beans.beancontext.BeanContextServices#revokeService(java.lang.Class, java.beans.beancontext.BeanContextServiceProvider, boolean)
+     * The given service provider is unregistered and a
+     * <code>BeanContextServiceRevokedEvent</code> is fired. All registered
+     * service listeners and current service users get notified.
+     * </p>
+     * 
+     * @param serviceClass
+     *            the service class
+     * @param serviceProvider
+     *            the service provider
+     * @param revokeCurrentServicesNow
+     *            true if service should be terminated immediantly
+     * @see java.beans.beancontext.BeanContextServices#revokeService(java.lang.Class,
+     *      java.beans.beancontext.BeanContextServiceProvider, boolean)
      */
     public void revokeService(Class serviceClass,
             BeanContextServiceProvider serviceProvider,
@@ -910,7 +975,7 @@
     }
 
     /**
-     * Notify all listeners and children that implements 
+     * Notify all listeners and children that implements
      * <code>BeanContextServices</code> of the event.
      * 
      * @see java.beans.beancontext.BeanContextServicesListener#serviceAvailable(java.beans.beancontext.BeanContextServiceAvailableEvent)
@@ -919,8 +984,8 @@
         if (null == event) {
             throw new NullPointerException(Messages.getString("beans.1C")); //$NON-NLS-1$
         }
-        if(services.containsKey(event.serviceClass)) {
-        	return;
+        if (services.containsKey(event.serviceClass)) {
+            return;
         }
         fireServiceAdded(event);
         Object childs[] = copyChildren();
@@ -932,7 +997,7 @@
     }
 
     /**
-     * Notify all listeners and children that implements 
+     * Notify all listeners and children that implements
      * <code>BeanContextServices</code> of the event.
      * 
      * @see java.beans.beancontext.BeanContextServiceRevokedListener#serviceRevoked(java.beans.beancontext.BeanContextServiceRevokedEvent)
@@ -941,8 +1006,8 @@
         if (null == event) {
             throw new NullPointerException(Messages.getString("beans.1C")); //$NON-NLS-1$
         }
-        if(services.containsKey(event.serviceClass)) {
-        	return;
+        if (services.containsKey(event.serviceClass)) {
+            return;
         }
         fireServiceRevoked(event);
         Object childs[] = copyChildren();
@@ -962,8 +1027,10 @@
      * </ol>
      * </p>
      * 
-     * @param oos   the object output stream
-     * @throws IOException if I/O exception occurs
+     * @param oos
+     *            the object output stream
+     * @throws IOException
+     *             if I/O exception occurs
      */
     private void writeObject(ObjectOutputStream oos) throws IOException {
 
@@ -983,9 +1050,12 @@
      * </ol>
      * </p>
      * 
-     * @param ois   the object input stream
-     * @throws IOException if I/O error occurs
-     * @throws ClassNotFoundException if class of read object is not found
+     * @param ois
+     *            the object input stream
+     * @throws IOException
+     *             if I/O error occurs
+     * @throws ClassNotFoundException
+     *             if class of read object is not found
      */
     private void readObject(ObjectInputStream ois) throws IOException,
             ClassNotFoundException {
@@ -998,5 +1068,3 @@
     }
 
 }
-
-

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/beancontext/BeanContextSupport.java Sun Jul 22 22:51:34 2007
@@ -103,7 +103,7 @@
      * A list of registered membership listeners.
      * All access to this object should be synchronized on itself.
      */
-    transient protected ArrayList bcmListeners;
+    transient protected ArrayList<BeanContextMembershipListener> bcmListeners;
 
     /**
      * A map of children - key is child instance, value is <code>BCSChild</code> instance.
@@ -214,6 +214,7 @@
      * @throws IllegalStateException if the child is not valid to add
      * @see java.util.Collection#add(java.lang.Object)
      */
+    @SuppressWarnings("unchecked")
     public boolean add(Object child) {
         if (child == null) {
             throw new IllegalArgumentException("null child");
@@ -460,6 +461,7 @@
      * @return true if given objects are children of this context
      * @see java.util.Collection#containsAll(java.util.Collection)
      */
+    @SuppressWarnings("unchecked")
     public boolean containsAll(Collection collection) {
         synchronized (children) {
             return children.keySet().containsAll(collection);
@@ -511,6 +513,7 @@
      * @throws IOException if I/O exception occurs
      * @throws ClassNotFoundException if class of any read object is not found
      */
+    @SuppressWarnings("unchecked")
     protected final void deserialize(ObjectInputStream ois,
             Collection collection) throws IOException, ClassNotFoundException {
         int size = ois.readInt();
@@ -726,7 +729,7 @@
      */
     protected void initialize() {
         // init transient fields
-        bcmListeners = new ArrayList();
+        bcmListeners = new ArrayList<BeanContextMembershipListener>();
         children = new HashMap();
         serializing = false;
         inNeedsGui = false;
@@ -865,6 +868,7 @@
 	 * @throws ClassNotFoundException
 	 *             if class of read object is not found
 	 */
+    @SuppressWarnings("unchecked")
     public final void readChildren(ObjectInputStream ois) throws IOException,
             ClassNotFoundException {
         synchronized (children) {
@@ -1125,6 +1129,7 @@
      * @return an array of children of this context
      * @see java.util.Collection#toArray(java.lang.Object[])
      */
+    @SuppressWarnings("unchecked")
     public Object[] toArray(Object[] array) {
         synchronized (children) {
             return children.keySet().toArray(array);

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/FontEditor.java Sun Jul 22 22:51:34 2007
@@ -29,6 +29,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+@SuppressWarnings("serial")
 public class FontEditor extends Panel implements PropertyEditor {
     
     List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/EventSetDescriptorTest.java Sun Jul 22 22:51:34 2007
@@ -275,8 +275,8 @@
                     listenerMethodName);
             fail("Should throw NullPointerException.");
         } catch (NullPointerException e) {
+            // expected
         }
-
     }
 
     /*
@@ -463,8 +463,16 @@
                     listenerMethodNames, addMethod, removeMethod);
             fail("Should throw NullPointerException.");
         } catch (NullPointerException e) {
+            // expected
+        }
+        
+        try {
+            new EventSetDescriptor(sourceClass, eventSetName, listenerType,
+                    new String[] { null }, addMethod, removeMethod);
+            fail("Should throw NullPointerException.");
+        } catch (NullPointerException e) {
+            // expected
         }
-
     }
 
     /*

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/IntrospectorTest.java Sun Jul 22 22:51:34 2007
@@ -54,6 +54,8 @@
 import org.apache.harmony.beans.tests.support.mock.FakeFox01BeanInfo;
 import org.apache.harmony.beans.tests.support.mock.FakeFox02;
 import org.apache.harmony.beans.tests.support.mock.FakeFox031;
+import org.apache.harmony.beans.tests.support.mock.FakeFox041;
+import org.apache.harmony.beans.tests.support.mock.FakeFox0411;
 import org.apache.harmony.beans.tests.support.mock.MockButton;
 import org.apache.harmony.beans.tests.support.mock.MockFoo;
 import org.apache.harmony.beans.tests.support.mock.MockFooButton;
@@ -62,6 +64,7 @@
 import org.apache.harmony.beans.tests.support.mock.MockFooSub;
 import org.apache.harmony.beans.tests.support.mock.MockFooSubSub;
 import org.apache.harmony.beans.tests.support.mock.MockJavaBean;
+import org.apache.harmony.beans.tests.support.mock.MockNullSubClass;
 import org.apache.harmony.beans.tests.support.mock.MockSubClass;
 
 /**
@@ -1317,6 +1320,17 @@
         }
         assertTrue(eventFound);
     }
+
+    public void testGetBeanInfoExplicitNull() throws Exception {
+        Introspector.flushCaches();
+        BeanInfo subinfo = Introspector.getBeanInfo(MockNullSubClass.class);
+        assertNotNull(subinfo.getPropertyDescriptors());
+        assertNotNull(subinfo.getEventSetDescriptors());
+        assertNotNull(subinfo.getMethodDescriptors());
+        assertEquals(-1, subinfo.getDefaultEventIndex());
+        assertEquals(-1, subinfo.getDefaultPropertyIndex());
+    }
+
     static class FakeFoxInfo {
 
         public int getProp6(boolean i) {
@@ -2068,6 +2082,31 @@
             assertFalse(pd.isPreferred());
         }
         assertEquals(2, info.getPropertyDescriptors().length);
+        
+        BeanInfo dummyInfo = Introspector.getBeanInfo(FakeFox041.class);
+        PropertyDescriptor[] p = dummyInfo.getPropertyDescriptors();
+        assertFalse(p[0].isBound());
+        assertFalse(p[0].isConstrained());
+        assertFalse(p[1].isBound());
+        assertFalse(p[1].isConstrained());
+        assertTrue(p[2].isBound());
+        assertTrue(p[2].isConstrained());
+        
+        dummyInfo = Introspector.getBeanInfo(FakeFox0411.class);
+        p = dummyInfo.getPropertyDescriptors();
+        assertFalse(p[0].isBound());
+        assertFalse(p[0].isConstrained());
+        assertFalse(p[1].isBound());
+        assertFalse(p[1].isConstrained());
+        assertTrue(p[2].isBound());
+        assertFalse(p[2].isConstrained());
+        assertTrue(p[3].isBound());
+        assertTrue(p[3].isConstrained());
+        
+        dummyInfo = Introspector.getBeanInfo(FakeFox0411.class, FakeFox041.class);
+        p = dummyInfo.getPropertyDescriptors();
+        assertFalse(p[0].isBound());
+        assertFalse(p[0].isConstrained());
     }
 
     public void testDefaultEvent() throws IntrospectionException {
@@ -2114,6 +2153,7 @@
             a = i;
         }
     }
+    
     static class MockClassForDefaultEvent {
         public void addPropertyChangeListener(PropertyChangeListener a) {
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java Sun Jul 22 22:51:34 2007
@@ -21,28 +21,15 @@
 import java.awt.event.*;
 import java.awt.font.TextAttribute;
 import java.awt.dnd.DropTarget;
-import java.beans.Encoder;
-import java.beans.Expression;
-import java.beans.PersistenceDelegate;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-import java.beans.Statement;
-import java.beans.XMLDecoder;
-import java.beans.XMLEncoder;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.EmptyStackException;
-import java.util.LinkedList;
-import java.util.Locale;
-import java.util.Stack;
-import java.util.TreeMap;
+import java.beans.*;
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.*;
 
 import javax.swing.*;
+import javax.swing.plaf.basic.BasicComboBoxUI;
+import javax.swing.plaf.basic.BasicComboBoxUI.ListDataHandler;
+import javax.swing.tree.DefaultMutableTreeNode;
 
 import junit.framework.TestCase;
 
@@ -659,7 +646,7 @@
         XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
             byteArrayOutputStream));
 
-        java.awt.List list = new List();
+        java.awt.List list = new java.awt.List();
         list.setBounds(0, 0, 10, 10);
         list.add(new PopupMenu("popupMenu"));
         list.add("1");
@@ -670,7 +657,7 @@
         DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
                 byteArrayOutputStream.toByteArray()));
         XMLDecoder decoder = new XMLDecoder(stream);
-        List aList = (List) decoder.readObject();
+        java.awt.List aList = (java.awt.List) decoder.readObject();
         assertEquals(list.getItem(0), aList.getItem(0));
         assertEquals(list.getHeight(), aList.getHeight());
         assertEquals(list.getBackground(), aList.getBackground());
@@ -817,6 +804,174 @@
         TreeMap aMap = (TreeMap) decoder.readObject();
         assertEquals(map.size(), aMap.size());
         assertEquals(map.get(10), aMap.get(10));
+    }
+    
+    public void test_writeObject_java_util_List() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        Vector vector = new Vector();
+        vector.add("test");
+        vector.add(1);
+
+        encoder.writeObject(vector);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        Vector aVector = (Vector) decoder.readObject();
+        assertEquals(vector, aVector);
+        assertEquals(2, aVector.size());
+        assertEquals(vector.get(0), aVector.get(0));
+        assertEquals(1, aVector.get(1));
+        
+        Vector v = new Vector();
+        v.add("The first item.");
+        v.add("The second item.");
+        Vector v2 = new Vector();
+        v2.add("A nested item.");
+        v.add(v2);
+        
+        byteArrayOutputStream = new ByteArrayOutputStream();
+        encoder = new XMLEncoder(byteArrayOutputStream);
+        encoder.writeObject(v);
+        encoder.flush();
+        encoder.close();
+        
+        stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        decoder = new XMLDecoder(stream);
+        aVector = (Vector) decoder.readObject();
+        assertEquals(v, aVector);
+        assertEquals(3, aVector.size());
+        assertEquals(v.get(0), aVector.get(0));
+        assertEquals(v.get(2), aVector.get(2));
+    }
+
+    public void test_writeObject_java_util_AbstractList(){
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        ArrayList<Integer> arrayList = new ArrayList<Integer>();
+        arrayList.add(10);
+
+        encoder.writeObject(arrayList);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        ArrayList aList = (ArrayList) decoder.readObject();
+        assertEquals(arrayList.size(), aList.size());
+        assertEquals(arrayList.get(0), arrayList.get(0));
+    }
+
+    public void test_writeObject_java_util_AbstractMap() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+
+        HashMap<Integer, String> hMap = new HashMap<Integer, String>();
+        hMap.put(1, "1");
+        hMap.put(2, "test");
+
+        encoder.writeObject(hMap);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        HashMap aHmap = (HashMap) decoder.readObject();
+        assertEquals(hMap.size(), aHmap.size());
+        assertEquals(hMap.get(1), aHmap.get(1));
+        assertEquals("test", aHmap.get(2));
+    }
+    
+    public void test_writeObject_javax_swing_JFrame() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        
+        JFrame frame = new JFrame("JFrame"); 
+        frame.setAlwaysOnTop(true);
+        frame.setBounds(1, 1, 100, 100);
+        frame.add(new JMenu("JMenu"));
+        encoder.writeObject(frame);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        JFrame aFrame = (JFrame) decoder.readObject();
+        assertEquals(frame.getTitle(), aFrame.getTitle());
+        assertEquals(frame.getBounds(), aFrame.getBounds());
+    }
+
+    public void test_writeObject_javax_swing_DefaultListModel() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+
+        DefaultListModel model = new DefaultListModel();
+        model.add(0, 1);
+        model.add(1, 2);
+        ListDataHandler listDataHandler = new BasicComboBoxUI().new ListDataHandler();
+        model.addListDataListener(listDataHandler);
+        
+        encoder.writeObject(model);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        DefaultListModel aModel = (DefaultListModel) decoder.readObject();
+        assertEquals(model.getSize(), aModel.getSize());
+    }
+
+    public void test_writeObject_javax_swing_DefaultComboBoxModel() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        Object a[] = {1, 2};
+        DefaultComboBoxModel model = new DefaultComboBoxModel(a);
+
+        encoder.writeObject(model);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        DefaultComboBoxModel aModel = (DefaultComboBoxModel) decoder.readObject();
+        assertEquals(model.getSize(), aModel.getSize());
+        assertEquals(model.getElementAt(0), aModel.getElementAt(0));
+        assertEquals(model.getElementAt(1), aModel.getElementAt(1));
+    }
+
+    public void test_writeObject_javax_swing_tree_DefaultMutableTreeNode() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        DefaultMutableTreeNode node = new DefaultMutableTreeNode(1);
+
+        encoder.writeObject(node);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        DefaultMutableTreeNode aNode = (DefaultMutableTreeNode) decoder.readObject();
+        assertEquals(node.getUserObject(), aNode.getUserObject());
+    }
+
+    public void test_writeObject_javax_swing_ToolTipManager() {
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+        XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(
+            byteArrayOutputStream));
+        ToolTipManager manager = ToolTipManager.sharedInstance();
+        manager.setDismissDelay(10);
+
+        encoder.writeObject(manager);
+        encoder.close();
+        DataInputStream stream = new DataInputStream(new ByteArrayInputStream(
+                byteArrayOutputStream.toByteArray()));
+        XMLDecoder decoder = new XMLDecoder(stream);
+        ToolTipManager aManager = (ToolTipManager) decoder.readObject();
+        assertEquals(manager, aManager);
+        assertEquals(manager.getDismissDelay(), aManager.getDismissDelay());
     }
 
     // <--

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox01BeanInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox01BeanInfo.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox01BeanInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox01BeanInfo.java Sun Jul 22 22:51:34 2007
@@ -58,7 +58,7 @@
         getDesc.setDisplayName(getDesc.getDisplayName() + suffix);
         MethodDescriptor setDesc = new MethodDescriptor(set);
         setDesc.setDisplayName(setDesc.getDisplayName() + suffix);
-        return new MethodDescriptor[] { getDesc, setDesc };
+        return new MethodDescriptor[] { setDesc, getDesc };
     }
 
     @Override

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03.java Sun Jul 22 22:51:34 2007
@@ -1,3 +1,20 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.harmony.beans.tests.support.mock;
 
 public class FakeFox03 {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031.java Sun Jul 22 22:51:34 2007
@@ -1,3 +1,20 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.harmony.beans.tests.support.mock;
 
 public class FakeFox031 {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031BeanInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031BeanInfo.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031BeanInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox031BeanInfo.java Sun Jul 22 22:51:34 2007
@@ -1,3 +1,20 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.harmony.beans.tests.support.mock;
 
 import java.beans.BeanDescriptor;

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03BeanInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03BeanInfo.java?view=diff&rev=558609&r1=558608&r2=558609
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03BeanInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/support/java/org/apache/harmony/beans/tests/support/mock/FakeFox03BeanInfo.java Sun Jul 22 22:51:34 2007
@@ -1,3 +1,20 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.harmony.beans.tests.support.mock;
 
 import java.awt.Image;