harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r559312 [1/2] - in /harmony/enhanced/classlib/branches/java6: depends/ depends/build/ depends/jars/ modules/awt/src/main/java/common/java/awt/ modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/ modules/awt/src/main/java/unix/org...
Date Wed, 25 Jul 2007 04:40:30 GMT
Author: pyang
Date: Tue Jul 24 21:40:21 2007
New Revision: 559312

URL: http://svn.apache.org/viewvc?view=rev&rev=559312
Log:
Merge updates from classlib trunk@559308 since r558482

Added:
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/FontLibExports.cpp
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/unix/FontLibExports.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/FontLibExports.h
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/awt/src/main/native/fontlib/unix/FontLibExports.h
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/ArrayPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/ArrayPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/NullPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/NullPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PrimitiveWrapperPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/PrimitiveWrapperPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/UtilDatePersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/UtilDatePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/java_lang_ClassPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/java_lang_ClassPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/java_lang_StringPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/java_lang_StringPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/java_lang_reflect_FieldPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/java_lang_reflect_FieldPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/java_lang_reflect_MethodPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/java_lang_reflect_MethodPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/java_lang_reflect_ProxyPersistenceDelegate.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/java_lang_reflect_ProxyPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java-internal/java/beans/AllTests.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/test/java-internal/java/beans/AllTests.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java-internal/java/beans/ArrayPersistenceDelegateTest.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/test/java-internal/java/beans/ArrayPersistenceDelegateTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java-internal/java/beans/ClassPersistenceDelegateTest.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/test/java-internal/java/beans/ClassPersistenceDelegateTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java-internal/java/beans/StringPersistenceDelegateTest.java
      - copied unchanged from r559308, harmony/enhanced/classlib/trunk/modules/beans/src/test/java-internal/java/beans/StringPersistenceDelegateTest.java
Removed:
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/ArrayPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/DefaultPersistenceDelegatesFactory.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/NullPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/ObjectNode.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/PrimitiveWrapperPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_BooleanPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_BytePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_CharacterPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_ClassPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_DoublePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_FloatPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_IntegerPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_LongPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_ShortPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_StringPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_reflect_FieldPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_reflect_MethodPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/java_lang_reflect_ProxyPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java-internal/org/
Modified:
    harmony/enhanced/classlib/branches/java6/depends/   (props changed)
    harmony/enhanced/classlib/branches/java6/depends/build/defines.mak
    harmony/enhanced/classlib/branches/java6/depends/build/defines.mk
    harmony/enhanced/classlib/branches/java6/depends/jars/   (props changed)
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Toolkit.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFont.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFontManager.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/exports.txt
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/cmmio.c
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/include/org_apache_harmony_awt_gl_font_LinuxNativeFont.h
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/winfont/windows/winFont.cpp
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ToolkitTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtChoicePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtColorPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtComponentPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtContainerPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtCursorPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtDimensionPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtFontPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtInsetsPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtListPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuBarPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuShortcutPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtPointPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtRectanglePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtScrollPanePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanDescriptor.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Beans.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/CustomizedObjectInputStream.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
    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/EventHandler.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/IndexedPropertyDescriptor.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Introspector.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/ParameterDescriptor.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PersistenceDelegate.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/PropertyEditorManager.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/PropertyEditorSupport.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SimpleBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Statement.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StaticFieldPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingAbstractButtonPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingBoxPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingDefaultComboBoxModelPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingJFramePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingJTabbedPanePersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/SwingToolTipManagerPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/UtilCollectionPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/UtilListPersistenceDelegate.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/VetoableChangeSupport.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/test/java/org/apache/harmony/beans/tests/java/beans/PersistenceDelegateTest.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/VetoableChangeSupportTest.java
    harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/NameParser.java
    harmony/enhanced/classlib/branches/java6/modules/jndi/src/main/java/javax/naming/spi/DirectoryManager.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/io/InputStreamReader.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/main/java/java/util/GregorianCalendar.java
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/api/common/tests/api/java/util/GregorianCalendarTest.java
    harmony/enhanced/classlib/branches/java6/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicSplitPaneUI.java

Propchange: harmony/enhanced/classlib/branches/java6/depends/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Jul 24 21:40:21 2007
@@ -0,0 +1,2 @@
+dejavu-fonts
+

Modified: harmony/enhanced/classlib/branches/java6/depends/build/defines.mak
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/build/defines.mak?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/build/defines.mak (original)
+++ harmony/enhanced/classlib/branches/java6/depends/build/defines.mak Tue Jul 24 21:40:21 2007
@@ -49,7 +49,7 @@
 
 !ifndef HYRELEASECFLAGS  
 HYRELEASECFLAGS = \
-  -Ogityb1
+  -Ogityb1 -DNDEBUG
 !endif
 
 !IF "$(HY_CFG)" == "debug"

Modified: harmony/enhanced/classlib/branches/java6/depends/build/defines.mk
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/build/defines.mk?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/build/defines.mk (original)
+++ harmony/enhanced/classlib/branches/java6/depends/build/defines.mk Tue Jul 24 21:40:21 2007
@@ -58,7 +58,7 @@
 endif
 
 ifndef HYRELEASECFLAGS  
-HYRELEASECFLAGS = -O1
+HYRELEASECFLAGS = -O1 -DNDEBUG
 endif
 
 ifeq ($(HY_CFG),release)

Propchange: harmony/enhanced/classlib/branches/java6/depends/jars/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jul 24 21:40:21 2007
@@ -22,4 +22,6 @@
 yoko_M2-20070130
 xerces_2.9.0
 bcprov-jdk15-136
+bcprov-jdk15-137
 xmlsec_1.4.0
+

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Toolkit.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Toolkit.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Toolkit.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Toolkit.java Tue Jul 24 21:40:21 2007
@@ -733,9 +733,15 @@
             throws IndexOutOfBoundsException, HeadlessException {
         lockAWT();
         try {
-            int w = img.getWidth(null), x = hotSpot.x;
-            int h = img.getHeight(null), y = hotSpot.y;
-            if (x < 0 || x >= w || y < 0 || y >= h) {
+            int w = img.getWidth(null);
+            int h = img.getHeight(null);
+
+            if (w < 0 || h < 0) {
+                // Fix for HARMONY-4491
+                hotSpot.x = 0;
+                hotSpot.y = 0;
+            } else if (hotSpot.x < 0 || hotSpot.x >= w
+                    || hotSpot.y < 0 || hotSpot.y >= h) {
                 // awt.7E=invalid hotSpot
                 throw new IndexOutOfBoundsException(Messages.getString("awt.7E")); //$NON-NLS-1$
             }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFont.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFont.java Tue Jul 24 21:40:21 2007
@@ -26,6 +26,7 @@
 import java.awt.font.LineMetrics;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Rectangle2D;
+import java.io.IOException;
 import java.io.File;
 import java.util.Hashtable;
 import java.util.Locale;
@@ -290,7 +291,7 @@
     /**
      * Return Font object if it was successfully embedded in System
      */
-    public static Font embedFont(String absolutePath){
+    public static Font embedFont(String absolutePath) throws IOException {
         return LinuxNativeFont.embedFont(absolutePath);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFontManager.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFontManager.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFontManager.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxFontManager.java Tue Jul 24 21:40:21 2007
@@ -66,7 +66,7 @@
      * font files should be installed.
      */
     public File getTempFontFile()throws IOException{
-        File fontFile = File.createTempFile("jFont", ".ttf", new File(System.getProperty("user.home") +"/.fonts")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+        File fontFile = File.createTempFile("jFont", ".ttf"); //$NON-NLS-1$ //$NON-NLS-2$
         fontFile.deleteOnExit();
 
         return fontFile;

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/font/LinuxNativeFont.java Tue Jul 24 21:40:21 2007
@@ -21,10 +21,12 @@
 package org.apache.harmony.awt.gl.font;
 
 import java.awt.Font;
+import java.io.IOException;
 
 import java.util.*;
 
 import org.apache.harmony.awt.gl.font.FontPeerImpl;
+import org.apache.harmony.awt.internal.nls.Messages;
 
 /**
  *
@@ -50,7 +52,7 @@
      *   
      * @param absolutePath absolute path to the font.
      */
-    public synchronized static native boolean embedFontNative(String absolutePath);
+    public synchronized static native String embedFontNative(String absolutePath);
 
     /**
      * Initiailzes native Xft font object from specified parameters and returns 
@@ -690,9 +692,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);
     }
 
     /** flag, returns true if native linuxfont was loaded */

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/unix/org/apache/harmony/awt/gl/linux/LinuxGraphics2DFactory.java Tue Jul 24 21:40:21 2007
@@ -23,6 +23,7 @@
 import java.awt.Font;
 import java.awt.Graphics2D;
 import java.awt.GraphicsEnvironment;
+import java.io.IOException;
 
 import org.apache.harmony.awt.gl.CommonGraphics2DFactory;
 import org.apache.harmony.awt.gl.MultiRectArea;
@@ -67,7 +68,7 @@
         return LinuxFontManager.inst;
     }
 
-    public Font embedFont(String fontFilePath) {
+    public Font embedFont(String fontFilePath) throws IOException {
         return LinuxFont.embedFont(fontFilePath);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/windows/org/apache/harmony/awt/gl/windows/WinGDIPGraphics2D.java Tue Jul 24 21:40:21 2007
@@ -274,31 +274,6 @@
 
     @Override
     public void drawString(String str, float x, float y) {
-//        XXX: GDITextRenderer provide faster text drawing,
-//             but there still conflict between GDI and GDI+ hdc usage.
-//             This problem is to be investigated.
-//        
-//        AffineTransform at = this.getTransform();
-//        AffineTransform fAT = this.getFont().getTransform();
-//        if (((at == null) || at.isIdentity() || 
-//             (at.getType() == AffineTransform.TYPE_TRANSLATION)) 
-//             && (fAT.isIdentity() || (fAT.getType() == AffineTransform.TYPE_TRANSLATION))){
-//
-//            // Set graphics hdc clip
-//            long hOldGDIRgn = 0;
-//            long gi = getGraphicsInfo();
-//
-//            if (clip != null && clip.rect[0] != 0 ){
-//                hOldGDIRgn = WinThemeGraphics.setGdiClip(gi, clip.rect, clip.rect[0]-1);
-//            } else {
-//                WinThemeGraphics.restoreGdiClip(gi, hOldGDIRgn);
-//            }
-//            gtr.drawString(this, str, (float)(x + fAT.getTranslateX()), (float)(y + fAT.getTranslateY()));
-//            
-//            // Restore graphics hdc clip
-//            WinThemeGraphics.restoreGdiClip(gi, hOldGDIRgn);
-//            return;
-//        }    
         jtr.drawString(this, str, x, y);
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/exports.txt?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/exports.txt (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/exports.txt Tue Jul 24 21:40:21 2007
@@ -1,3 +1,4 @@
+getFontFamilyName
 Java_org_apache_harmony_awt_gl_font_fontlib_FLFontManager_initManager
 Java_org_apache_harmony_awt_gl_font_fontlib_FLFontManager_getAllFontsNative
 Java_org_apache_harmony_awt_gl_font_fontlib_FLFontManager_dispose

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/unix/makefile Tue Jul 24 21:40:21 2007
@@ -30,6 +30,7 @@
   $(SHAREDSUB)T1Glyph.o \
   $(SHAREDSUB)TTCurve.o \
   $(SHAREDSUB)TTFont.o \
+  FontLibExports.o \
   $(SHAREDSUB)TypeDefinition.o
 
 ifneq ($(HY_ZIP_API),true)

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/fontlib/windows/FontLibExports.cpp Tue Jul 24 21:40:21 2007
@@ -20,7 +20,7 @@
 #include <stdio.h>
 
 JNIEXPORT void JNICALL getFontFamilyName(fwchar_t *path, fwchar_t **familyName) {
-    FILE *f = _wfopen(path, L"rb");
+    FILE *f = _wfopen((wchar_t*)path, L"rb");
     if (!f)
         return;
         

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/cmmio.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/cmmio.c?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/cmmio.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/lcmm/shared/cmmio.c Tue Jul 24 21:40:21 2007
@@ -148,7 +148,7 @@
 static BOOL updateHeader(LPLCMSICCPROFILE Icc) {
   icHeader head;
 
-  Icc -> Read(&head, sizeof(icHeader), 1, Icc -> stream);
+  readMemBuffer(&head, sizeof(icHeader), 1, Icc -> stream);
 
   // Stop processing if data are corrupted
   if (swapBytes32(head.magic) != icMagicNumber) return FALSE;
@@ -295,17 +295,17 @@
 
   allocMemBuffer(Icc->stream, profileSize);
 
-  Icc->Seek(Icc->stream, 0);
+  seekMemBuffer(Icc->stream, 0);
 
   tmp = swapBytes32((icInt32Number) profileSize);
 
-  Icc->Write(Icc->stream, sizeof(icInt32Number), &tmp);
+  writeMemBuffer(Icc->stream, sizeof(icInt32Number), (LPBYTE) &tmp);
 
   
 
   // Copy the rest of the header from the old buffer
 
-  Icc->Write(Icc->stream, 
+  writeMemBuffer(Icc->stream, 
 
              sizeof(icHeader) - sizeof(icInt32Number), 
 
@@ -317,7 +317,7 @@
 
   tmp = swapBytes32(getValidTagCount(Icc));
 
-  Icc->Write(Icc->stream, sizeof(icInt32Number), &tmp);
+  writeMemBuffer(Icc->stream, sizeof(icInt32Number), (LPBYTE) &tmp);
 
 
 
@@ -335,7 +335,7 @@
 
 
 
-      Icc->Write(Icc->stream, sizeof(icTag), &tag);
+      writeMemBuffer(Icc->stream, sizeof(icTag), (LPBYTE) &tag);
 
     }
 
@@ -349,13 +349,13 @@
 
     if(Icc->TagNames[i]) {
 
-      Icc->Seek(Icc->stream, Icc->TagOffsets[i]);
+      seekMemBuffer(Icc->stream, Icc->TagOffsets[i]);
 
 
 
       if(Icc->TagPtrs[i]) {
 
-        Icc->Write(Icc->stream, Icc->TagSizes[i], Icc->TagPtrs[i]);
+        writeMemBuffer(Icc->stream, Icc->TagSizes[i], Icc->TagPtrs[i]);
 
         free(Icc->TagPtrs[i]);
 
@@ -363,7 +363,7 @@
 
       } else {
 
-        Icc->Write(Icc->stream, Icc->TagSizes[i], oldBasePtr + oldTagOffsets[i]);
+        writeMemBuffer(Icc->stream, Icc->TagSizes[i], oldBasePtr + oldTagOffsets[i]);
 
       }
 
@@ -468,22 +468,7 @@
 
   // Get rid of LCMS IO
 
-  Icc->Close(Icc->stream); 
-
-
-
-  Icc->Read = readMemBuffer;
-
-  Icc->Write = writeMemBuffer;
-
-  Icc->Close = closeMemBuffer;
-
-  Icc->Seek = seekMemBuffer;
-
-  Icc->Tell = tellMemBuffer;
-
-
-
+  closeMemBuffer(Icc->stream);
   Icc->stream = openMemBuffer(dataPtr, dwSize);
 
   return Icc;
@@ -555,9 +540,9 @@
 
   } else {
 
-    hProfile->Seek(hProfile->stream, hProfile->TagOffsets[idx]);
+    seekMemBuffer(hProfile->stream, hProfile->TagOffsets[idx]);
 
-    hProfile->Read(data, 1, *dataSize, hProfile->stream);
+    readMemBuffer(data, 1, *dataSize, hProfile->stream);
 
   }
 
@@ -591,9 +576,9 @@
 
   size_t bytesToRead = MIN(size, sizeof(icHeader));
 
-  hProfile->Seek(hProfile->stream, 0);
+  seekMemBuffer(hProfile->stream, 0);
 
-  hProfile->Read(data, 1, bytesToRead, hProfile->stream);
+  readMemBuffer(data, 1, bytesToRead, hProfile->stream);
 
   return TRUE;
 
@@ -603,9 +588,9 @@
 
 BOOL cmmSetProfileHeader(LPLCMSICCPROFILE hProfile, LPBYTE data) {
 
-  hProfile->Seek(hProfile->stream, 0);
+  seekMemBuffer(hProfile->stream, 0);
 
-  hProfile->Write(hProfile->stream, sizeof(icHeader), data);
+  writeMemBuffer(hProfile->stream, sizeof(icHeader), data);
 
   
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/LinuxNativeFont.c Tue Jul 24 21:40:21 2007
@@ -23,6 +23,10 @@
 #include <freetype/tttables.h>
 #include <freetype/t1tables.h>
 
+#include <jni.h>
+
+#include "FontLibExports.h"
+
 #if (FREETYPE_MAJOR >= 2 && FREETYPE_MINOR >= 2)
 
 #undef HAS_FREETYPE_INTERNAL
@@ -173,36 +177,37 @@
  * Methods checks if the number of system fonts changed after font configutation
  * was rebuilded.
  */
-JNIEXPORT jboolean JNICALL 
+JNIEXPORT jstring JNICALL 
     Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_embedFontNative(JNIEnv *env, jclass obj, jstring fName){
 
     int fontAdded = FALSE;
     FcConfig *config;
-    FcFontSet *set;
-    int numFonts;
 
     config = FcConfigGetCurrent();
     if (!config){
-        return fontAdded;
+        return 0;
     }
 
-    set = FcConfigGetFonts(config, FcSetSystem);
-    if (!set){
-        return fontAdded;
-    }
+    char *path = (char *)(*env)->GetStringUTFChars(env, fName, 0);
+    fontAdded = FcConfigAppFontAddFile(config, path);
 
-    numFonts = set->nfont;
+    unsigned short *familyName = 0;
 
-    fontAdded = FcConfigBuildFonts(config);
+    if (fontAdded) {
+        getFontFamilyName(path, &familyName);
+    }    
+
+    (*env)->ReleaseStringUTFChars(env, fName, path);    
     
-    set = FcConfigGetFonts(config, FcSetSystem);
-    if (!set){
-        return fontAdded;
+    jstring res = 0;
+    if (fontAdded && familyName) {
+        int len = 0;
+        for (; familyName[len] != 0; len++);
+        res = (*env)->NewString(env, (jchar *)familyName, len);
+        free(familyName);
     }
 
-    fontAdded = fontAdded && (numFonts < set->nfont);
-
-    return fontAdded;
+    return res;
 }
 
 /*

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/include/org_apache_harmony_awt_gl_font_LinuxNativeFont.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/include/org_apache_harmony_awt_gl_font_LinuxNativeFont.h?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/include/org_apache_harmony_awt_gl_font_LinuxNativeFont.h (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/include/org_apache_harmony_awt_gl_font_LinuxNativeFont.h Tue Jul 24 21:40:21 2007
@@ -63,7 +63,7 @@
 /*
  * Method: org.apache.harmony.awt.gl.font.LinuxNativeFont.embedFontNative(Ljava/lang/String;)Z
  */
-JNIEXPORT jboolean JNICALL
+JNIEXPORT jstring JNICALL
 Java_org_apache_harmony_awt_gl_font_LinuxNativeFont_embedFontNative(JNIEnv *, jclass, 
     jstring);
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/native/linuxfont/unix/makefile Tue Jul 24 21:40:21 2007
@@ -17,7 +17,7 @@
 
 CFLAGS += -fpic
 INCLUDES += -I$(SHARED)common -I/usr/X11R6/include -I/usr/include/freetype2 \
-            -Iinclude # TOFIX move includes
+            -Iinclude -I../../fontlib/unix -I../../fontlib/shared # TOFIX move includes
 ifeq ($(HY_OS),freebsd)
 INCLUDES += -I/usr/local/include -I/usr/local/include/freetype2
 endif
@@ -32,7 +32,7 @@
 endif
 
 MDLLIBFILES += $(LIBPATH)libhypool.a $(LIBPATH)libhyfdlibm.a \
-	$(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX)
+	$(LIBPATH)libvmi$(HY_LINKLIB_SUFFIX) ../../fontlib/libFL.so
 
 OSLIBS += $(XLIBS)
 

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=559312&r1=559311&r2=559312
==============================================================================
--- 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 Tue Jul 24 21:40:21 2007
@@ -479,7 +479,7 @@
     
     jstring res = 0;
     if (fontAdded && familyName) {
-        int len = wcslen(familyName);
+        int len = wcslen((wchar_t*)familyName);
         res = env->NewString((jchar *)familyName, len);
         delete familyName;
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ToolkitTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ToolkitTest.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ToolkitTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ToolkitTest.java Tue Jul 24 21:40:21 2007
@@ -40,4 +40,14 @@
         }
     }
 
+    public void testCreateCustomCursor() {
+        try {
+            // Regression for HARMONY-4491
+            Toolkit tk = Toolkit.getDefaultToolkit();            
+            Image img = tk.createImage(new byte[] { 0 } );
+            Cursor cursor = tk.createCustomCursor(img, new Point(0, 0), "");
+        } catch (IndexOutOfBoundsException e) {
+            fail("Unexpected IndexOutOfBoundsException");            
+        }
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtChoicePersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtChoicePersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtChoicePersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtChoicePersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Choice;
 
 class AwtChoicePersistenceDelegate extends DefaultPersistenceDelegate {
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings({ "nls", "boxing" })
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		super.initialize(type, oldInstance, newInstance, enc);
 		if (type != oldInstance.getClass()) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtColorPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtColorPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtColorPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtColorPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Color;
 
 class AwtColorPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Color color = (Color) oldInstance;
 		return new Expression(oldInstance, oldInstance.getClass(),
                 Statement.CONSTRUCTOR_NAME, new Object[] { color.getRed(),

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtComponentPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtComponentPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtComponentPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtComponentPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -19,7 +19,9 @@
 
 class AwtComponentPersistenceDelegate extends DefaultPersistenceDelegate {
 
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings("nls")
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		// Call the initialization of the super type
 		super.initialize(type, oldInstance, newInstance, enc);
@@ -41,7 +43,8 @@
 
 	}
 
-	static void writeProperty(Object oldInstance, Object newInstance,
+	@SuppressWarnings("nls")
+    static void writeProperty(Object oldInstance, Object newInstance,
 			Encoder enc, String property) {
 		StringBuilder builder = new StringBuilder();
 		Expression getterExp = new Expression(oldInstance, builder

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtContainerPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtContainerPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtContainerPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtContainerPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Container;
 
 class AwtContainerPersistenceDelegate extends AwtComponentPersistenceDelegate {
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings({ "nls", "boxing" })
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		// Call the initialization of the super type
 		super.initialize(type, oldInstance, newInstance, enc);

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtCursorPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtCursorPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtCursorPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtCursorPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Cursor;
 
 class AwtCursorPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Cursor cursor = (Cursor) oldInstance;
 		return new Expression(oldInstance, oldInstance.getClass(),
                 Statement.CONSTRUCTOR_NAME, new Object[] { cursor.getType() });

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtDimensionPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtDimensionPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtDimensionPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtDimensionPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -21,7 +21,9 @@
 
 class AwtDimensionPersistenceDelegate extends DefaultPersistenceDelegate {
 	
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Dimension dimesion = (Dimension) oldInstance;
 
         return new Expression(dimesion, dimesion.getClass(), Statement.CONSTRUCTOR_NAME,

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtFontPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtFontPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtFontPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtFontPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Font;
 
 class AwtFontPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Font font = (Font) oldInstance;
 		return new Expression(oldInstance, oldInstance.getClass(),
                 Statement.CONSTRUCTOR_NAME, new Object[] { font.getFontName(),

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtInsetsPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtInsetsPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtInsetsPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtInsetsPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.Insets;
 
 class AwtInsetsPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Insets inset = (Insets) oldInstance;
 		return new Expression(oldInstance, oldInstance.getClass(),
 				Statement.CONSTRUCTOR_NAME, new Object[] { inset.top, inset.left, inset.bottom,

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtListPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtListPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtListPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtListPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 import java.awt.List;
 
 class AwtListPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings({ "nls", "boxing" })
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		super.initialize(type, oldInstance, newInstance, enc);
 

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuBarPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuBarPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuBarPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuBarPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -21,7 +21,9 @@
 import java.awt.MenuBar;
 
 class AwtMenuBarPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings({ "nls", "boxing" })
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		super.initialize(type, oldInstance, newInstance, enc);
 		if (type != oldInstance.getClass()) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -21,7 +21,9 @@
 import java.awt.MenuItem;
 
 class AwtMenuPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected void initialize(Class<?> type, Object oldInstance,
+    @Override
+	@SuppressWarnings({ "nls", "boxing" })
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		super.initialize(type, oldInstance, newInstance, enc);
 		if (type != oldInstance.getClass()) {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuShortcutPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuShortcutPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuShortcutPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtMenuShortcutPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -21,7 +21,8 @@
 
 class AwtMenuShortcutPersistenceDelegate extends PersistenceDelegate {
 
-	@Override
+    @Override
+	@SuppressWarnings("boxing")
 	protected Expression instantiate(Object oldInstance, Encoder enc) {
 		MenuShortcut shortcut = (MenuShortcut) oldInstance;
 		int keyCode = shortcut.getKey();

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtPointPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtPointPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtPointPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtPointPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -19,7 +19,9 @@
 import java.awt.Point;
 
 class AwtPointPersistenceDelegate extends DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+    @Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Point point = (Point) oldInstance;
 		return new Expression(oldInstance, oldInstance.getClass(),
 				Statement.CONSTRUCTOR_NAME, new Object[] { point.x, point.y });

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtRectanglePersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtRectanglePersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtRectanglePersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtRectanglePersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -21,16 +21,20 @@
 
 class AwtRectanglePersistenceDelegate extends DefaultPersistenceDelegate {
 
-	protected boolean mutatesTo(Object o1, Object o2) {
+	@Override
+    protected boolean mutatesTo(Object o1, Object o2) {
 		return o1.equals(o2);
 	}
 
-	protected void initialize(Class<?> type, Object oldInstance,
+	@Override
+    protected void initialize(Class<?> type, Object oldInstance,
 			Object newInstance, Encoder enc) {
 		return;
 	}
 	
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+	@Override
+	@SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		Rectangle rect = (Rectangle) oldInstance;
 
         return new Expression(rect, rect.getClass(), Statement.CONSTRUCTOR_NAME,

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtScrollPanePersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtScrollPanePersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtScrollPanePersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/AwtScrollPanePersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,9 @@
 
 class AwtScrollPanePersistenceDelegate extends
 		DefaultPersistenceDelegate {
-	protected Expression instantiate(Object oldInstance, Encoder enc) {
+	@Override
+    @SuppressWarnings("boxing")
+    protected Expression instantiate(Object oldInstance, Encoder enc) {
 		return new Expression(oldInstance, oldInstance.getClass(),
 				Statement.CONSTRUCTOR_NAME,
 				new Object[] { ((ScrollPane) oldInstance)

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanDescriptor.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanDescriptor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanDescriptor.java Tue Jul 24 21:40:21 2007
@@ -95,15 +95,15 @@
      * Utility method for getting the unqualified name of a {@link Class}.
      * </p>
      * 
-     * @param beanClass
+     * @param leguminaClass
      *            The Class to get the name from.
      * @return A String instance or <code>null</code>.
      */
-    private String getShortClassName(Class<?> beanClass) {
+    private String getShortClassName(Class<?> leguminaClass) {
         String result = null;
 
-        if (beanClass != null) {
-            String beanClassName = beanClass.getName();
+        if (leguminaClass != null) {
+            String beanClassName = leguminaClass.getName();
             int idx = beanClassName.lastIndexOf("."); //$NON-NLS-1$
 
             result = (idx == -1) ? beanClassName : beanClassName

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoImpl.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoImpl.java Tue Jul 24 21:40:21 2007
@@ -97,6 +97,7 @@
                     addPropertyDescriptorsFromMethods(result, setters,
                             MT_SETTER);
                 } catch (Exception e) {
+                    // empty
                 }
 
                 values = result.values().toArray();
@@ -249,18 +250,13 @@
                                 // in event set descriptor pattern
                             }
 
-                            try {
-                                listenerCoreName = Introspector
-                                        .decapitalize(listenerCoreName);
-                                EventSetDescriptor esd = new EventSetDescriptor(
-                                        listenerCoreName, listenerType,
-                                        listenerMethods, addListenerMethod,
-                                        removeListenerMethod, getListenerMethod);
-                                result.put(listenerCoreName, esd);
-                            } catch (IntrospectionException ie) {
-                                System.out.println(Messages.getString(
-                                        "beans.39", listenerCoreName)); //$NON-NLS-1$
-                            }
+                            listenerCoreName = Introspector
+                                    .decapitalize(listenerCoreName);
+                            EventSetDescriptor esd = new EventSetDescriptor(
+                                    listenerCoreName, listenerType,
+                                    listenerMethods, addListenerMethod,
+                                    removeListenerMethod, getListenerMethod);
+                            result.put(listenerCoreName, esd);
 
                         } // if length of parameters list equals to 1
                     } // if no descriptors for given listener name yet
@@ -351,7 +347,7 @@
         String result = null;
 
         if (methodName.startsWith("set") //$NON-NLS-1$ 
-                || methodName.startsWith("get")) { //$NON-NLS-2$
+                || methodName.startsWith("get")) {  //$NON-NLS-1$
             result = methodName.substring(3);
             result = Introspector.decapitalize(result);
         } else if (methodName.startsWith("is")) { //$NON-NLS-1$

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java Tue Jul 24 21:40:21 2007
@@ -20,7 +20,6 @@
 import java.awt.Image;
 import java.lang.reflect.Method;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
@@ -191,7 +190,6 @@
                 EventSetDescriptor[] parentResult = parentBeanInfoWrapper
                         .getEventSetDescriptors();
                 Map<String, FeatureDescriptor> hm;
-                Collection<FeatureDescriptor> values;
 
                 if (defaultEventName == null) {
                 	int parentDefaultIdx = parentBeanInfoWrapper.getDefaultEventIndex();
@@ -417,6 +415,7 @@
         return null;
     }
 
+    @SuppressWarnings("null")
     private static MethodDescriptor[] concatArraysToOneArray(
             MethodDescriptor[] childs, MethodDescriptor[] parents) {
 
@@ -552,7 +551,7 @@
     }
     
     private static void copy(PropertyDescriptor target, 
-            PropertyDescriptor source) throws IntrospectionException {
+            PropertyDescriptor source) {
         target.setBound(source.isBound());
         target.setConstrained(source.isConstrained());
         target.setDisplayName(source.getDisplayName());

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Beans.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Beans.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Beans.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/Beans.java Tue Jul 24 21:40:21 2007
@@ -52,6 +52,7 @@
      * Constructs a Beans instance.
      */
     public Beans() {
+        // expected
     }
 
     /**
@@ -218,7 +219,8 @@
      *            the specified view type.
      * @return a type view of the given bean.
      */
-    public static Object getInstanceOf(Object bean, Class<?> targetType) {
+    public static Object getInstanceOf(Object bean, @SuppressWarnings("unused")
+    Class<?> targetType) {
         return bean;
     }
 
@@ -344,7 +346,7 @@
         // If we can't get to the applet itself, the codebase and doc base are
         // left as null.
         if (objectUrl == null) {
-            applet.setStub(getAppletStub(applet, getStubAppletContext(applet),
+            applet.setStub(getAppletStub(getStubAppletContext(applet),
                     null, null));
             return;
         }
@@ -360,13 +362,12 @@
         int docURLlength = urlString.lastIndexOf('/');
         URL docBase = safeURL(urlString.substring(0, docURLlength + 1));
 
-        applet.setStub(getAppletStub(applet, getStubAppletContext(applet),
+        applet.setStub(getAppletStub(getStubAppletContext(applet),
                 codeBase, docBase));
     }
     
     
-    private static AppletStub getAppletStub(final Applet target,
-            final AppletContext context, final URL codeBase, final URL docBase) {
+    private static AppletStub getAppletStub(final AppletContext context, final URL codeBase, final URL docBase) {
 
         return new AppletStub() {
             public boolean isActive() {

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/CustomizedObjectInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/CustomizedObjectInputStream.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/CustomizedObjectInputStream.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/CustomizedObjectInputStream.java Tue Jul 24 21:40:21 2007
@@ -73,7 +73,7 @@
             } else if (postfix.equals("S")) { //$NON-NLS-1$
                 componentType = short.class;
             } else if (postfix.equals("V")) { //$NON-NLS-1$
-                componentType = null;
+                // expected, componentType is already null
             } else if (postfix.startsWith("L")) { //$NON-NLS-1$
                 componentType = cls.loadClass(postfix.substring(1, postfix
                         .length() - 1));

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java Tue Jul 24 21:40:21 2007
@@ -94,6 +94,7 @@
      * @param enc
      *            the encoder to write the outputs to
      */
+    @Override
     protected void initialize(Class<?> type, Object oldInstance,
             Object newInstance, Encoder enc) {
         // Call the initialization of the super type
@@ -169,12 +170,11 @@
     /*
      * Get the field value of an object using privileged code.
      */
-    @SuppressWarnings("unchecked")
     private Object getFieldValue(Object oldInstance, String fieldName)
             throws NoSuchFieldException, IllegalAccessException {
-        Class c = oldInstance.getClass();
+        Class<? extends Object> c = oldInstance.getClass();
         final Field f = c.getDeclaredField(fieldName);
-        AccessController.doPrivileged(new PrivilegedAction() {
+        AccessController.doPrivileged(new PrivilegedAction<Object>() {
             public Object run() {
                 f.setAccessible(true);
                 return null;
@@ -186,12 +186,12 @@
     /*
      * Get the value for the specified property of the given bean instance.
      */
-    private Object getPropertyValue(HashMap proDscMap, Object oldInstance,
+    private Object getPropertyValue(HashMap<String, PropertyDescriptor> proDscMap, Object oldInstance,
             String propName) throws Exception {
         // Try to get the read method for the property
         Method getter = null;
         if (null != proDscMap) {
-            PropertyDescriptor pd = (PropertyDescriptor) proDscMap
+            PropertyDescriptor pd = proDscMap
                     .get(Introspector.decapitalize(propName));
             if (null != pd) {
                 getter = pd.getReadMethod();
@@ -227,6 +227,7 @@
      * @return an expression for instantiating an object of the same type as the
      *         old instance
      */
+    @Override
     protected Expression instantiate(Object oldInstance, Encoder enc) {
         Object[] args = null;
 
@@ -234,7 +235,7 @@
         if (this.propertyNames.length > 0) {
             // Prepare the property descriptors for finding getter method later
             BeanInfo info = null;
-            HashMap proDscMap = null;
+            HashMap<String, PropertyDescriptor> proDscMap = null;
             try {
                 info = Introspector.getBeanInfo(oldInstance.getClass(),
                         Introspector.IGNORE_ALL_BEANINFO);
@@ -291,11 +292,12 @@
      * @return true if second object mutates to the first object, otherwise
      *         false
      */
+    @Override
     protected boolean mutatesTo(Object o1, Object o2) {
         if (null == o1 || null == o2) {
             return false;
         }
-        Class c = o1.getClass();
+        Class<? extends Object> c = o1.getClass();
         if (this.propertyNames.length > 0) {
             // Check the "equals" method has been declared
             Method equalMethod = null;

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=559312&r1=559311&r2=559312
==============================================================================
--- 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 Tue Jul 24 21:40:21 2007
@@ -23,12 +23,12 @@
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.util.Collection;
+import java.util.Date;
 import java.util.Map;
 import java.util.Hashtable;
 
 import javax.swing.*;
 
-import org.apache.harmony.beans.*;
 
 /**
  * The <code>Encoder</code>, together with <code>PersistenceDelegate</code>
@@ -65,7 +65,7 @@
 
 		public void exceptionThrown(Exception exception) {
 			System.err.println("Exception during encoding:" + exception); //$NON-NLS-1$
-			System.err.println("Continue...");
+			System.err.println("Continue..."); //$NON-NLS-1$
 		}
 
 	}
@@ -110,6 +110,8 @@
         delegates.put(DefaultComboBoxModel.class, new SwingDefaultComboBoxModelPersistenceDelegate());
         delegates.put(ToolTipManager.class, new SwingToolTipManagerPersistenceDelegate());
         
+        delegates.put(Date.class, new UtilDatePersistenceDelegate());
+        
 	}
 
 	private ExceptionListener listener = defaultExListener;
@@ -258,7 +260,8 @@
 	 */
 	public void setExceptionListener(ExceptionListener listener) {
 		if (listener == null) {
-			listener = defaultExListener;
+			this.listener = defaultExListener;
+            return;
 		}
 		this.listener = listener;
 	}

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventHandler.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventHandler.java?view=diff&rev=559312&r1=559311&r2=559312
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventHandler.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/EventHandler.java Tue Jul 24 21:40:21 2007
@@ -37,7 +37,7 @@
 
     public EventHandler(Object target, String action, String eventPropertyName,
             String listenerMethodName) {
-        if(target == null || action  == null){
+        if (target == null || action == null) {
             throw new NullPointerException();
         }
         this.target = target;
@@ -50,9 +50,10 @@
         Class<?> proxyClass;
         Object result = null;
 
+        Object[] theArguments = arguments;
         // XXX
         if (arguments == null) {
-            arguments = new Object[0];
+            theArguments = new Object[0];
         }
 
         proxyClass = proxy.getClass();
@@ -66,24 +67,24 @@
                 // if the method from the Object class is called
                 if (method.getDeclaringClass().equals(Object.class)) {
                     if (method.getName().equals("hashCode") && //$NON-NLS-1$
-                            arguments.length == 0) {
+                            theArguments.length == 0) {
                         result = Integer.valueOf(hashCode());
                     } else if (method.getName().equals("equals") && //$NON-NLS-1$
-                            arguments.length == 1 && arguments[0] != null) {
-                        result = Boolean.valueOf(proxy == arguments[0]);
+                            theArguments.length == 1 && theArguments[0] != null) {
+                        result = Boolean.valueOf(proxy == theArguments[0]);
                     } else if (method.getName().equals("toString") && //$NON-NLS-1$
-                            arguments.length == 0) {
+                            theArguments.length == 0) {
                         result = proxy.getClass().getSimpleName()
                                 + toString().substring(
                                         getClass().getName().length());
                     }
-                } else if (isValidInvocation(method, arguments)) {
+                } else if (isValidInvocation(method, theArguments)) {
                     // if listener method
                     try {
                         // extract value from event property name
-                        Object[] args = getArgs(arguments);
+                        Object[] args = getArgs(theArguments);
                         // extract method to be invoked on target
-                        Method m = getMethod(proxy, method, arguments, args);
+                        Method m = getMethod(proxy, method, theArguments, args);
 
                         // we have a valid listener method at this point
                         result = m.invoke(target, args);
@@ -96,16 +97,15 @@
                 } else {
                     // in order to be compatible with RI
                     if (listenerMethodName.equals(method.getName())) {
-                        throw new IllegalArgumentException(Messages.getString(
-                                "beans.4D"));
+                        throw new IllegalArgumentException(Messages
+                                .getString("beans.4D")); //$NON-NLS-1$
                     }
                 }
             }
         } else {
-            //HARMONY-2495
+            // HARMONY-2495
             if (null == method) {
-                throw new NullPointerException(Messages.getString(
-                        "beans.55")); //$NON-NLS-1$
+                throw new NullPointerException(Messages.getString("beans.55")); //$NON-NLS-1$
             }
         }
 
@@ -131,7 +131,7 @@
     @SuppressWarnings("unchecked")
     public static <T> T create(Class<T> listenerInterface, Object target,
             String action, String eventPropertyName, String listenerMethodName) {
-        if(action == null || target == null || listenerInterface == null){
+        if (action == null || target == null || listenerInterface == null) {
             throw new NullPointerException();
         }
         return (T) Proxy.newProxyInstance(target.getClass().getClassLoader(),
@@ -142,7 +142,8 @@
     @SuppressWarnings("unchecked")
     public static <T> T create(Class<T> listenerInterface, Object target,
             String action, String eventPropertyName) {
-        return create(listenerInterface, target, action, eventPropertyName, null);
+        return create(listenerInterface, target, action, eventPropertyName,
+                null);
     }
 
     @SuppressWarnings("unchecked")
@@ -162,7 +163,7 @@
             if (eventPropertyName == null
                     && (arguments == null || arguments.length == 0)) {
                 result = true;
-            // one-argument call is also valid
+                // one-argument call is also valid
             } else if (arguments != null && arguments.length == 1) {
                 result = true;
             } else {
@@ -179,7 +180,7 @@
         if (eventPropertyName == null) {
             return new Object[] {};
         } else if ((arguments == null) || (arguments.length == 0)) {
-//                || (arguments[0] == null)) {
+            // || (arguments[0] == null)) {
             return arguments;
         } else {
             Object arg = arguments[0];
@@ -188,7 +189,7 @@
             while (st.hasMoreTokens()) {
                 String propertyName = st.nextToken();
                 PropertyDescriptor pd = findPropertyDescriptor(arg.getClass(),
-                        propertyName);;
+                        propertyName);
 
                 if (pd != null) {
                     Method getter = pd.getReadMethod();
@@ -269,15 +270,14 @@
                                 "beans.13", action)); //$NON-NLS-1$
                     }
                 } else {
-                    throw new IndexOutOfBoundsException(
-                            Messages.getString("beans.14")); //$NON-NLS-1$
+                    throw new IndexOutOfBoundsException(Messages
+                            .getString("beans.14")); //$NON-NLS-1$
                 }
             } else {
                 return result;
             }
         } catch (IntrospectionException ie) {
-            throw new IndexOutOfBoundsException(
-                    Messages.getString("beans.14")); //$NON-NLS-1$
+            throw new IndexOutOfBoundsException(Messages.getString("beans.14")); //$NON-NLS-1$
         }
 
         return result;
@@ -298,8 +298,7 @@
         return result;
     }
 
-    private Method findStaticGetter(Class<?> theClass, String propertyName)
-            throws IntrospectionException {
+    private Method findStaticGetter(Class<?> theClass, String propertyName) {
         Method result = null;
         Method[] methods = theClass.getMethods();
 

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=559312&r1=559311&r2=559312
==============================================================================
--- 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 Tue Jul 24 21:40:21 2007
@@ -115,7 +115,7 @@
             if (listenerMethodName.equals(m.getName())) {
                 Class[] paramTypes = m.getParameterTypes();
                 if (paramTypes.length == 1
-                        && paramTypes[0].getName().endsWith("Event")) {
+                        && paramTypes[0].getName().endsWith("Event")) { //$NON-NLS-1$
                     method = m;
                     break;
                 }
@@ -131,15 +131,14 @@
 
     public EventSetDescriptor(String eventSetName, Class<?> listenerType,
             Method[] listenerMethods, Method addListenerMethod,
-            Method removeListenerMethod) throws IntrospectionException {
+            Method removeListenerMethod) {
         this(eventSetName, listenerType, listenerMethods, addListenerMethod,
                 removeListenerMethod, null);
     }
 
     public EventSetDescriptor(String eventSetName, Class<?> listenerType,
             Method[] listenerMethods, Method addListenerMethod,
-            Method removeListenerMethod, Method getListenerMethod)
-            throws IntrospectionException {
+            Method removeListenerMethod, Method getListenerMethod) {
 
         setName(eventSetName);
         this.listenerType = listenerType;
@@ -166,8 +165,7 @@
 
     public EventSetDescriptor(String eventSetName, Class<?> listenerType,
             MethodDescriptor[] listenerMethodDescriptors,
-            Method addListenerMethod, Method removeListenerMethod)
-            throws IntrospectionException {
+            Method addListenerMethod, Method removeListenerMethod) {
         this(eventSetName, listenerType, null, addListenerMethod,
                 removeListenerMethod, null);
 
@@ -182,15 +180,16 @@
     }
 
     // ensures that there is no nulls
+    @SuppressWarnings("nls")
     private void checkNotNull(Object sourceClass, Object eventSetName,
-            Object listenerType, Object listenerMethodName) {
+            Object alistenerType, Object listenerMethodName) {
         if (sourceClass == null) {
             throw new NullPointerException(Messages.getString("beans.0C"));
         }
         if (eventSetName == null) {
             throw new NullPointerException(Messages.getString("beans.53"));
         }
-        if (listenerType == null) {
+        if (alistenerType == null) {
             throw new NullPointerException(Messages.getString("beans.54"));
         }
         if (listenerMethodName == null) {
@@ -316,7 +315,7 @@
             return sourceClass.getMethod(methodName, listenerType);
         } catch (NoSuchMethodException e) {
             return findAddRemoveListnerMethodWithLessCheck(sourceClass,
-                    methodName, listenerType);
+                    methodName);
         } catch (Exception e) {
             throw new IntrospectionException(Messages.getString("beans.31", //$NON-NLS-1$
                     methodName, listenerType.getName()));
@@ -324,28 +323,19 @@
     }
 
     private Method findAddRemoveListnerMethodWithLessCheck(
-            Class<?> sourceClass, String methodName, Class listenerTYpe)
+            Class<?> sourceClass, String methodName)
             throws IntrospectionException {
         String expectedListenerTypeName = listenerType.getName();
         expectedListenerTypeName = expectedListenerTypeName
-                .substring(expectedListenerTypeName.lastIndexOf(".") + 1);
+                .substring(expectedListenerTypeName.lastIndexOf(".") + 1); //$NON-NLS-1$
         Method method = null;
         Method[] methods = sourceClass.getMethods();
         for (Method m : methods) {
             if (m.getName().equals(methodName)) {
                 Class[] paramTypes = m.getParameterTypes();
                 if (paramTypes.length == 1) {
-                    // String paramTypeName = paramTypes[0].getName();
-                    // paramTypeName = paramTypeName.substring(paramTypeName
-                    // .lastIndexOf(".") + 1);
-                    // if (paramTypeName.endsWith("Listener")) {
-                    // paramTypeName = paramTypeName.substring(0,
-                    // paramTypeName.length() - "Listener".length());
-                    // if (expectedListenerTypeName.startsWith(paramTypeName)) {
                     method = m;
                     break;
-                    // }
-                    // }
                 }
             }
         }



Mime
View raw message