harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r583703 [1/2] - in /harmony/enhanced/classlib/branches/java6: depends/files/ depends/files/bcprov/ depends/files/bcprov/org/ depends/files/bcprov/org/bouncycastle/ depends/files/bcprov/org/bouncycastle/crypto/ depends/files/bcprov/org/bounc...
Date Thu, 11 Oct 2007 06:57:11 GMT
Author: pyang
Date: Wed Oct 10 23:57:05 2007
New Revision: 583703

URL: http://svn.apache.org/viewvc?rev=583703&view=rev
Log:
Merge updates from classlib trunk@583411 since r578483

Added:
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/
      - copied from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/
      - copied from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/bouncycastle/
      - copied from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/bouncycastle/
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/bouncycastle/crypto/
      - copied from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/bouncycastle/crypto/
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/bouncycastle/crypto/engines/
      - copied from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/bouncycastle/crypto/engines/
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/bouncycastle/crypto/engines/IDEAEngine.class
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/bouncycastle/crypto/engines/IDEAEngine.class
    harmony/enhanced/classlib/branches/java6/depends/files/bcprov/org/bouncycastle/crypto/engines/IDEAEngine.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/depends/files/bcprov/org/bouncycastle/crypto/engines/IDEAEngine.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixNumericUserPrincipal.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixNumericUserPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixPrincipal.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/UnixPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/
      - copied from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/DialogCallbackHandler.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/DialogCallbackHandler.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/TextCallbackHandler.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/callback/TextCallbackHandler.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/module/DebugUtil.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/DebugUtil.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/module/JndiLoginModule.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/JndiLoginModule.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/common/org/apache/harmony/auth/module/SharedStateManager.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/org/apache/harmony/auth/module/SharedStateManager.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BcBandsTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BcBandsTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/ServerCloneExceptionTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/ServerCloneExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/ServerNotActiveExceptionTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/ServerNotActiveExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SkeletonMismatchExceptionTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SkeletonMismatchExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SkeletonNotFoundExceptionTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SkeletonNotFoundExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SocketSecurityExceptionTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/SocketSecurityExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/ServerCloneExceptionTest.golden.ser
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/ServerCloneExceptionTest.golden.ser
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/ServerNotActiveExceptionTest.golden.ser
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/ServerNotActiveExceptionTest.golden.ser
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SkeletonMismatchExceptionTest.golden.ser
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SkeletonMismatchExceptionTest.golden.ser
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SkeletonNotFoundExceptionTest.golden.ser
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SkeletonNotFoundExceptionTest.golden.ser
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SocketSecurityExceptionTest.golden.ser
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/rmi/src/test/resources/serialization/org/apache/harmony/rmi/server/SocketSecurityExceptionTest.golden.ser
    harmony/enhanced/classlib/branches/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyStorePrivateKeyEntryTest.java
      - copied unchanged from r583411, harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/KeyStorePrivateKeyEntryTest.java
Removed:
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/unix/org/apache/harmony/auth/UnixNumericGroupPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/unix/org/apache/harmony/auth/UnixNumericUserPrincipal.java
    harmony/enhanced/classlib/branches/java6/modules/auth/src/main/java/unix/org/apache/harmony/auth/UnixPrincipal.java
Modified:
    harmony/enhanced/classlib/branches/java6/depends/files/java.policy
    harmony/enhanced/classlib/branches/java6/make/build-java.xml
    harmony/enhanced/classlib/branches/java6/make/depends.properties
    harmony/enhanced/classlib/branches/java6/make/depends.xml
    harmony/enhanced/classlib/branches/java6/make/properties.xml
    harmony/enhanced/classlib/branches/java6/modules/auth/META-INF/MANIFEST.MF
    harmony/enhanced/classlib/branches/java6/modules/auth/make/exclude.common
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Button.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Checkbox.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Choice.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Container.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Label.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/TextComponent.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ButtonRTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ChoiceTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/LabelTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java
    harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Tools.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/StandardBeanInfo.java
    harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.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/PropertyEditorManagerTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BcBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/ClassBands.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/Segment.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CodeAttribute.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/BandSetTest.java
    harmony/enhanced/classlib/branches/java6/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentTest.java
    harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hyshsem.c
    harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/port/unix/hysock.c
    harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/rasthrsup.c
    harmony/enhanced/classlib/branches/java6/modules/portlib/src/main/native/thread/unix/rasthrsup.h
    harmony/enhanced/classlib/branches/java6/modules/rmi/src/test/api/java/org/apache/harmony/rmi/server/ExportExceptionTest.java
    harmony/enhanced/classlib/branches/java6/modules/security/src/main/java/common/java/security/KeyStore.java
    harmony/enhanced/classlib/branches/java6/modules/text/src/main/java/java/text/MessageFormat.java

Modified: harmony/enhanced/classlib/branches/java6/depends/files/java.policy
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/depends/files/java.policy?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/depends/files/java.policy (original)
+++ harmony/enhanced/classlib/branches/java6/depends/files/java.policy Wed Oct 10 23:57:05 2007
@@ -19,7 +19,7 @@
 // It should be named: ${java.home}/lib/security/java.policy
 
 // by default, all system extensions get AllPermission
-grant codeBase "file:${java.home}/lib/ext/*" {
+grant codeBase "file:${java.ext.dirs}/*" {
     permission java.security.AllPermission;
 };
 

Modified: harmony/enhanced/classlib/branches/java6/make/build-java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/build-java.xml?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/build-java.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/build-java.xml Wed Oct 10 23:57:05 2007
@@ -122,15 +122,9 @@
         </fail>
         <mkdir dir="${build.output}" />
 
-        <javac compiler="${hy.javac.compiler}"
-               destdir="${build.output}"
-               source="${hy.javac.source}" 
-               target="${hy.javac.target}"
-               debug="${hy.javac.debug}"
+        <hy.javac destdir="${build.output}"
                includeAntRuntime="no">
             
-            <compilerarg line="${build.compilerarg}" />
-            
             <src path="modules/accessibility/src/main/java/" />
             <src path="modules/annotation/src/main/java/" />
             <src path="modules/applet/src/main/java" />
@@ -187,7 +181,7 @@
                     <include name="**/mx4j.jar" />
                 </fileset>
             </bootclasspath>
-        </javac>
+        </hy.javac>
 
         <call-modules target="build" />
     </target>
@@ -227,7 +221,8 @@
         </copy>
 
         <!-- Copy across the extension dependency jars -->
-        <copy todir="${hy.jdk}/jre/lib/ext" flatten="yes" overwrite="true">
+        <copy tofile="${hy.jdk}/jre/lib/ext/bcprov.jar" verbose="true"
+              flatten="yes" overwrite="true">
             <fileset file="${bcprov.jar}" />
         </copy>
 

Modified: harmony/enhanced/classlib/branches/java6/make/depends.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.properties?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.properties (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.properties Wed Oct 10 23:57:05 2007
@@ -39,7 +39,8 @@
 junit.md5=28e7eb9eeefe31a657c68755bfccc541
 
 bcprov.dir=${depends.jars}/bcprov-jdk15-137
-bcprov.jar=${bcprov.dir}/bcprov.jar
+bcprov.orig.jar=${bcprov.dir}/bcprov.jar
+bcprov.jar=${bcprov.dir}/bcprov.noidea.jar
 bcprov.url=http://www.bouncycastle.org/download/bcprov-jdk15-137.jar
 bcprov.md5=7cdb436aaa4b222db7fc02495dfcde51
 

Modified: harmony/enhanced/classlib/branches/java6/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/depends.xml?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/depends.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/depends.xml Wed Oct 10 23:57:05 2007
@@ -41,7 +41,7 @@
         <check-one-file src="${xerces.url}" dest="${xerces.zip}" />
         <check-one-file src="${xmlsec.url}" dest="${xmlsec.zip}" />
         <check-one-file src="${junit.url}" dest="${junit.jar}" />
-        <check-one-file src="${bcprov.url}" dest="${bcprov.jar}" />
+        <check-one-file src="${bcprov.url}" dest="${bcprov.orig.jar}" />
         <check-one-file src="${icu4j.url}" dest="${icu4j.jar}" />
         <check-one-file src="${mx4j.url}" dest="${mx4j.zip}" />
         <check-one-file src="${jetty.url}" dest="${jetty.jar}" />
@@ -98,7 +98,7 @@
     </target>
 
     <target name="-extract"
-         depends="-extract-props,-extract-mx4j,-extract-dejavu-fonts,-extract-xerces" />
+         depends="-extract-props,-extract-mx4j,-extract-dejavu-fonts,-extract-xerces,-extract-idea-from-bcprov" />
 
     <target name="-extract-props">
         <uptodate property="dejavu-fonts.uptodate"
@@ -110,6 +110,13 @@
         <uptodate property="xerces.uptodate"
                   srcfile="${xerces.zip}"
                   targetfile="${xerces.dir}/xercesImpl.jar" />
+        <uptodate property="bcprov.uptodate"
+                  targetfile="${bcprov.jar}">
+            <srcfiles file="${bcprov.orig.jar}" />
+            <srcfiles dir="depends/files/bcprov"
+                      includes="**/IDEAEngine.class" />
+        </uptodate>
+
     </target>
 
     <target name="-extract-dejavu-fonts" unless="dejavu-fonts.uptodate">
@@ -152,6 +159,18 @@
         <delete dir="${xerces.dir}.tmp" />
     </target>
 
+    <target name="-extract-idea-from-bcprov" unless="bcprov.uptodate">
+        <zip destfile="${bcprov.jar}">
+            <zipfileset src="${bcprov.orig.jar}">
+                <exclude name="**/BCKEY.*" />
+                <exclude name="**/IDEAEngine.class" />
+            </zipfileset>
+            <fileset dir="depends/files/bcprov">
+                <include name="**/IDEAEngine.class" />
+            </fileset>
+        </zip>
+    </target>
+
     <!-- 
        *  FIXME : the following awful little hack is because we noticed that for whatever
        *  reason, we can't link with libjpg.a et al on at least to kinds of 64-bit linux
@@ -341,16 +360,16 @@
     <download-one-file src="${xerces.url}" dest="${xerces.zip}"
                            md5="${xerces.md5}" />
 
-    <mkdir dir="${xmlsec.dir}" />
-    <download-one-file src="${xmlsec.url}" dest="${xmlsec.zip}"
-                           md5="${xmlsec.md5}" />
+     <mkdir dir="${xmlsec.dir}" />
+     <download-one-file src="${xmlsec.url}" dest="${xmlsec.zip}"
+                            md5="${xmlsec.md5}" />
 
     <mkdir dir="${junit.dir}" />
     <download-one-file src="${junit.url}" dest="${junit.jar}"
                            md5="${junit.md5}" />
 
     <mkdir dir="${bcprov.dir}" />
-    <download-one-file src="${bcprov.url}" dest="${bcprov.jar}"
+    <download-one-file src="${bcprov.url}" dest="${bcprov.orig.jar}"
                            md5="${bcprov.md5}" />
 
     <mkdir dir="${icu4j.dir}" />
@@ -437,7 +456,7 @@
     <get src="${src}" dest="${dest}" usetimestamp="true" verbose="true" />
     </target>
 
-    <target name="-remove-file-if-bad" unless="${dest}.md5.verified">
+    <target name="-remove-file-if-bad" unless="${jar}.md5.verified">
         <delete file="${dest}" />
     </target>
 

Modified: harmony/enhanced/classlib/branches/java6/make/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/make/properties.xml?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/make/properties.xml (original)
+++ harmony/enhanced/classlib/branches/java6/make/properties.xml Wed Oct 10 23:57:05 2007
@@ -41,6 +41,11 @@
         <equals arg1="${hy.cfg}" arg2="debug" />
     </condition>
 
+    <!-- Local variable tables should be available in debug, and unavailable in release modes. -->
+    <condition property="build.compilerarg" value="-warn:none -g" else="-warn:none -g:lines,source">
+        <equals arg1="${hy.cfg}" arg2="debug" />
+    </condition>
+
     <!-- During packaging, these files must be copied into the meta-inf dir -->
     <fileset id="hy.required.metainf-files" dir="${hy.hdk}">
         <include name="NOTICE" />
@@ -258,8 +263,6 @@
     </condition>
     <property name="jpeg.home" value="/usr" />
     
-    <property name="build.compilerarg" value="-warn:none" />
-
     <!-- default property for call-modules macro - i.e. all modules -->
     <property name="build.module" value="*" />
     <property name="exclude.module" value="nothing" />
@@ -313,6 +316,7 @@
   hy.javac.source = ${hy.javac.source}
   hy.javac.debug  = ${hy.javac.debug}
   hy.javac.maxmem = ${hy.javac.maxmem}
+  build.compilerarg = ${build.compilerarg}
 
 Harmony test properties:
 
@@ -509,5 +513,12 @@
            </concat>
        </sequential>
    </macrodef>
+   
+   <presetdef name="hy.javac">
+       <javac target="${hy.javac.target}" source="${hy.javac.source}" 
+                compiler="${hy.javac.compiler}" debug="${hy.javac.debug}">
+           <compilerarg line="${build.compilerarg}" />
+       </javac>
+   </presetdef>
 
 </project>

Modified: harmony/enhanced/classlib/branches/java6/modules/auth/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/META-INF/MANIFEST.MF?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/META-INF/MANIFEST.MF Wed Oct 10 23:57:05 2007
@@ -12,7 +12,10 @@
 Bundle-ClassPath: .
 Eclipse-JREBundle: true
 Eclipse-ExtensibleAPI: true
-Import-Package: java.io,
+Import-Package: java.awt,
+ java.awt.event,
+ java.beans,
+ java.io,
  java.lang,
  java.math;resolution:=optional,
  java.net,
@@ -22,8 +25,11 @@
  java.util,
  java.util.logging;resolution:=optional,
  java.util.zip,
+ javax.accessibility,
  javax.crypto,
  javax.crypto.spec,
+ javax.naming,
+ javax.naming.directory,
  org.apache.harmony.kernel.vm,
  org.apache.harmony.security,
  org.apache.harmony.security.asn1,
@@ -31,8 +37,8 @@
  org.apache.harmony.security.utils,
  org.apache.harmony.security.x501,
  org.apache.harmony.testframework.serialization;hy_usage=test;resolution:=optional,
- tests.support.resource;hy_usage=test;resolution:=optional,
- tests.support;hy_usage=test;resolution:=optional
+ tests.support;hy_usage=test;resolution:=optional,
+ tests.support.resource;hy_usage=test;resolution:=optional
 Export-Package: javax.security.auth,
  javax.security.auth.callback,
  javax.security.auth.kerberos,

Modified: harmony/enhanced/classlib/branches/java6/modules/auth/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/auth/make/exclude.common?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/auth/make/exclude.common (original)
+++ harmony/enhanced/classlib/branches/java6/modules/auth/make/exclude.common Wed Oct 10 23:57:05 2007
@@ -1,2 +1,4 @@
 # excluded to avoid random failures 
 org/apache/harmony/auth/tests/module/Krb5LoginModuleTest.java
+# jndi provider does not exist now
+org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
\ No newline at end of file

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Button.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Button.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Button.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Button.java Wed Oct 10 23:57:05 2007
@@ -166,11 +166,16 @@
     public void setLabel(String label) {
         toolkit.lockAWT();
         try {
-            this.label = label;
-            if (isDisplayable()) {
-                invalidate();
-                if (isShowing()) {
-                    repaint();
+            if (!(this.label == label ||
+                    (label != null && label.equals(this.label)))) {
+                // set new label only if it differs from the old one
+                // to avoid dead loop in repaint()
+                this.label = label;
+                if (isDisplayable()) {
+                    invalidate();
+                    if (isShowing()) {
+                        repaint();
+                    }
                 }
             }
         } finally {
@@ -296,8 +301,10 @@
 
     @Override
     void setEnabledImpl(boolean value) {
-        super.setEnabledImpl(value);
-        repaint();
+        if (isEnabled() != value) { // to avoid dead loop in repaint()
+            super.setEnabledImpl(value);
+            repaint();
+        }
     }
 
     void generateEvent(long timestamp, int modifiers) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Checkbox.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Checkbox.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Checkbox.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Checkbox.java Wed Oct 10 23:57:05 2007
@@ -351,8 +351,10 @@
     }
 
     void setChecked(boolean checked) {
-        this.checked = checked;
-        repaint();
+        if (checked != this.checked) { // avoid dead loop in repaint()
+            this.checked = checked;
+            repaint();
+        }
     }
 
     @SuppressWarnings("unchecked")
@@ -437,8 +439,10 @@
 
     @Override
     void setEnabledImpl(boolean value) {
-        super.setEnabledImpl(value);
-        repaint();
+        if (value != isEnabled()) { // avoid dead loop in repaint()
+            super.setEnabledImpl(value);
+            repaint();
+        }    
     }
 
     @Override

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Choice.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Choice.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Choice.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Choice.java Wed Oct 10 23:57:05 2007
@@ -479,12 +479,15 @@
     public void select(int pos) {
         toolkit.lockAWT();
         try {
-            if (pos >= items.size() || pos < 0) {
-                // awt.106=specified position is greater than the number of items
-                throw new IllegalArgumentException(Messages.getString("awt.106")); //$NON-NLS-1$
+            if (selectedIndex != pos) { // to avoid dead loop in repaint()
+                if (pos >= items.size() || pos < 0) {
+                    // awt.106=specified position is greater than the number of items
+                    throw new IllegalArgumentException(
+                            Messages.getString("awt.106")); //$NON-NLS-1$
+                }
+                selectedIndex = pos;
+                repaint();
             }
-            selectedIndex = pos;
-            repaint();
         } finally {
             toolkit.unlockAWT();
         }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Component.java Wed Oct 10 23:57:05 2007
@@ -2985,10 +2985,13 @@
     }
 
     void setFontImpl(Font f) {
-        font = f;
-        invalidate();
-        if (isShowing()) {
-            repaint();
+        if (!(f == font ||
+             (f != null && f.equals(font)))) {// to avoid dead loop in repaint()
+            font = f;
+            invalidate();
+            if (isShowing()) {
+                repaint();
+            }
         }
     }
 
@@ -3009,6 +3012,7 @@
 
     public void setForeground(Color c) {
         Color oldFgColor;
+
         toolkit.lockAWT();
         try {
             oldFgColor = foreColor;
@@ -3016,21 +3020,34 @@
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("foreground", oldFgColor, foreColor); //$NON-NLS-1$
-        repaint();
+        
+        // Update only if new color differs from the old one.
+        // It is needed to avoid dead loops in repaint().
+        if (!(oldFgColor == c ||
+              (c != null && c.equals(oldFgColor)))) {
+            firePropertyChange("foreground", oldFgColor, c); //$NON-NLS-1$
+            repaint();
+        }
     }
 
     public void setBackground(Color c) {
-        Color oldBkColor;
+        Color oldBgColor;
+        
         toolkit.lockAWT();
         try {
-            oldBkColor = backColor;
+            oldBgColor = backColor;
             backColor = c;
         } finally {
             toolkit.unlockAWT();
         }
-        firePropertyChange("background", oldBkColor, backColor); //$NON-NLS-1$
-        repaint();
+        
+        // update only if new color differs from the old one
+        // to avoid dead loop in repaint()
+        if (!(c == oldBgColor || 
+                 (c != null && c.equals(oldBgColor)))) {
+            firePropertyChange("background", oldBgColor, c); //$NON-NLS-1$
+            repaint();
+        }
     }
 
     public void setIgnoreRepaint(boolean value) {

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Container.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Container.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Container.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Container.java Wed Oct 10 23:57:05 2007
@@ -1321,8 +1321,8 @@
      * Determine if comp contains point pos. Comp must be showing and top-most
      * component in Z-order.
      * 
-     * @param x
-     * @param y
+     * @param comp component to look for
+     * @param pos point to look component at
      * 
      * @return
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Label.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Label.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Label.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/Label.java Wed Oct 10 23:57:05 2007
@@ -250,8 +250,10 @@
 
     @Override
     void setEnabledImpl(boolean value) {
-        super.setEnabledImpl(value);
-        repaint();
+        if (value != isEnabled()) { // to avoid dead loop in repaint()
+            super.setEnabledImpl(value);
+            repaint();
+        }
     }
 
     @Override

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/TextComponent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/TextComponent.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/TextComponent.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/main/java/common/java/awt/TextComponent.java Wed Oct 10 23:57:05 2007
@@ -774,8 +774,10 @@
     public void setEditable(boolean b) {
         toolkit.lockAWT();
         try {
-            editable = b;
-            repaint(); // background color changes
+            if (editable != b) {  // to avoid dead loop in repaint()
+                editable = b;
+                repaint(); // background color changes
+            }
         } finally {
             toolkit.unlockAWT();
         }
@@ -1094,9 +1096,11 @@
 
     @Override
     void setEnabledImpl(boolean value) {
-        super.setEnabledImpl(value);
-        if (isShowing()) {
-            repaint();
+        if (value != isEnabled()) { // to avoid dead loop in repaint()
+            super.setEnabledImpl(value);
+            if (isShowing()) {
+                repaint();
+            }
         }
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ButtonRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ButtonRTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ButtonRTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ButtonRTest.java Wed Oct 10 23:57:05 2007
@@ -28,7 +28,7 @@
 import junit.framework.TestCase;
 
 public class ButtonRTest extends TestCase {
-
+  
     public void testShowAndPack() {
         Frame frm = new Frame("Test");
         Button btnClose = new Button("MyClose");
@@ -89,6 +89,19 @@
         testHarmony2305();
     }
 
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Button b = new Button() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setEnabled(true);
+                setLabel("button1");
+            }
+        };
+        
+        Tools.checkDeadLoop(b, count);
+    }
+    
     static class AL implements ActionListener {
         ActionEvent e;
 
@@ -96,4 +109,5 @@
             this.e = e;
         }
     }
+    
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java Wed Oct 10 23:57:05 2007
@@ -208,4 +208,18 @@
         checkbox.removeItemListener(listener);
         assertEquals(0, checkbox.getListeners(cls).length);
     }
+    
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new Checkbox() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setState(true);
+                setEnabled(true);
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
+
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ChoiceTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ChoiceTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ChoiceTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ChoiceTest.java Wed Oct 10 23:57:05 2007
@@ -365,4 +365,18 @@
         assertTrue(eventProcessed);
     }
 
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new Choice() {
+            public void paint(Graphics g) {
+                count[0]++;
+                if (getItemCount() == 0) {
+                    add("item");      
+                }
+                select(0);
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java Wed Oct 10 23:57:05 2007
@@ -78,6 +78,20 @@
         // Regression test for HARMONY-2456
         new Button().transferFocusUpCycle();
     }
+    
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new Panel() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setBackground(new Color(255, 255, 255));
+                setForeground(Color.BLACK);
+                setFont(new Font("Serif", Font.PLAIN, 10));
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
 
     public static void main(String[] args) {
         junit.textui.TestRunner.run(ComponentRTest.class);

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/LabelTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/LabelTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/LabelTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/LabelTest.java Wed Oct 10 23:57:05 2007
@@ -112,4 +112,16 @@
         assertEquals(text, label.getText());
     }
 
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new Label() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setEnabled(true);
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
+    
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextComponentTest.java Wed Oct 10 23:57:05 2007
@@ -409,4 +409,16 @@
         assertTrue("text event processed", eventProcessed);
     }
 
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new TextArea() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setEditable(true);
+                setEnabled(true);
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/TextFieldTest.java Wed Oct 10 23:57:05 2007
@@ -431,5 +431,17 @@
                                         null, 0, 0));
         assertTrue(eventProcessed);
     }
+    
+    public void testDeadLoop4887() {
+        final int count[] = new int[1];
+        Component c = new TextField() {
+            public void paint(Graphics g) {
+                count[0]++;
+                setEchoChar(' ');
+            }
+        };
+        
+        Tools.checkDeadLoop(c, count);
+    }
 
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Tools.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Tools.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Tools.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/awt/src/test/api/java/common/java/awt/Tools.java Wed Oct 10 23:57:05 2007
@@ -60,6 +60,27 @@
         return name.replace('.', '/') + '/';
     }
 
+    public static void checkDeadLoop(Component c, int[] count) {
+        final int DEAD_LOOP_TIMEOUT = 1000;
+        final int VALID_NUMBER_OF_PAINT_CALLS = 5;
+        
+        Frame f = new Frame();
+        
+        f.add(c);
+        f.setSize(300,200);
+        f.setVisible(true);
+
+        try {
+            Thread.sleep(DEAD_LOOP_TIMEOUT);
+        } catch (Exception e) {}
+        
+        f.dispose();
+        
+        Assert.assertTrue("paint() called " + count[0] +
+                " times, a dead loop occurred",
+                count[0] <= VALID_NUMBER_OF_PAINT_CALLS);        
+    }
+
     public static class Shape {
 
         static int pointCount[] = {
@@ -674,4 +695,5 @@
         }
 
     }
+
 }

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?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- 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 Wed Oct 10 23:57:05 2007
@@ -17,18 +17,36 @@
 
 package java.beans;
 
-import java.awt.*;
-import java.awt.font.*;
+import java.awt.Choice;
+import java.awt.Color;
+import java.awt.Component;
+import java.awt.Container;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.Font;
+import java.awt.Insets;
+import java.awt.List;
+import java.awt.Menu;
+import java.awt.MenuBar;
+import java.awt.MenuShortcut;
+import java.awt.Point;
+import java.awt.Rectangle;
+import java.awt.ScrollPane;
+import java.awt.SystemColor;
+import java.awt.font.TextAttribute;
 import java.lang.reflect.Field;
 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 java.util.Map;
 
-import javax.swing.*;
-
+import javax.swing.Box;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JFrame;
+import javax.swing.JTabbedPane;
+import javax.swing.ToolTipManager;
 
 /**
  * The <code>Encoder</code>, together with <code>PersistenceDelegate</code>
@@ -49,44 +67,44 @@
 @SuppressWarnings("unchecked")
 public class Encoder {
 
-	private static final Hashtable delegates = new Hashtable();
+    private static final Hashtable delegates = new Hashtable();
 
-	private static final DefaultPersistenceDelegate defaultPD = new DefaultPersistenceDelegate();
+    private static final DefaultPersistenceDelegate defaultPD = new DefaultPersistenceDelegate();
 
-	private static final ArrayPersistenceDelegate arrayPD = new ArrayPersistenceDelegate();
+    private static final ArrayPersistenceDelegate arrayPD = new ArrayPersistenceDelegate();
+
+    private static final ProxyPersistenceDelegate proxyPD = new ProxyPersistenceDelegate();
 
-	private static final ProxyPersistenceDelegate proxyPD = new ProxyPersistenceDelegate();
-    
     private static final NullPersistenceDelegate nullPD = new NullPersistenceDelegate();
 
-	private static final ExceptionListener defaultExListener = new DefaultExceptionListener();
-    
-	private static class DefaultExceptionListener implements ExceptionListener {
-
-		public void exceptionThrown(Exception exception) {
-			System.err.println("Exception during encoding:" + exception); //$NON-NLS-1$
-			System.err.println("Continue..."); //$NON-NLS-1$
-		}
-
-	}
-
-	static {
-		PersistenceDelegate ppd = new PrimitiveWrapperPersistenceDelegate();
-		delegates.put(Boolean.class, ppd);
-		delegates.put(Byte.class, ppd);
-		delegates.put(Character.class, ppd);
-		delegates.put(Double.class, ppd);
-		delegates.put(Float.class, ppd);
-		delegates.put(Integer.class, ppd);
-		delegates.put(Long.class, ppd);
-		delegates.put(Short.class, ppd);
-
-		delegates.put(Class.class, new ClassPersistenceDelegate());
-		delegates.put(Field.class, new FieldPersistenceDelegate());
-		delegates.put(Method.class, new MethodPersistenceDelegate());
-		delegates.put(String.class, new StringPersistenceDelegate());
-		delegates.put(Proxy.class, new ProxyPersistenceDelegate());
-        
+    private static final ExceptionListener defaultExListener = new DefaultExceptionListener();
+
+    private static class DefaultExceptionListener implements ExceptionListener {
+
+        public void exceptionThrown(Exception exception) {
+            System.err.println("Exception during encoding:" + exception); //$NON-NLS-1$
+            System.err.println("Continue..."); //$NON-NLS-1$
+        }
+
+    }
+
+    static {
+        PersistenceDelegate ppd = new PrimitiveWrapperPersistenceDelegate();
+        delegates.put(Boolean.class, ppd);
+        delegates.put(Byte.class, ppd);
+        delegates.put(Character.class, ppd);
+        delegates.put(Double.class, ppd);
+        delegates.put(Float.class, ppd);
+        delegates.put(Integer.class, ppd);
+        delegates.put(Long.class, ppd);
+        delegates.put(Short.class, ppd);
+
+        delegates.put(Class.class, new ClassPersistenceDelegate());
+        delegates.put(Field.class, new FieldPersistenceDelegate());
+        delegates.put(Method.class, new MethodPersistenceDelegate());
+        delegates.put(String.class, new StringPersistenceDelegate());
+        delegates.put(Proxy.class, new ProxyPersistenceDelegate());
+
         delegates.put(Choice.class, new AwtChoicePersistenceDelegate());
         delegates.put(Color.class, new AwtColorPersistenceDelegate());
         delegates.put(Container.class, new AwtContainerPersistenceDelegate());
@@ -98,322 +116,328 @@
         delegates.put(List.class, new AwtListPersistenceDelegate());
         delegates.put(Menu.class, new AwtMenuPersistenceDelegate());
         delegates.put(MenuBar.class, new AwtMenuBarPersistenceDelegate());
-        delegates.put(MenuShortcut.class, new AwtMenuShortcutPersistenceDelegate());
+        delegates.put(MenuShortcut.class,
+                new AwtMenuShortcutPersistenceDelegate());
         delegates.put(Point.class, new AwtPointPersistenceDelegate());
         delegates.put(Rectangle.class, new AwtRectanglePersistenceDelegate());
-        delegates.put(SystemColor.class, new AwtSystemColorPersistenceDelegate());
-        delegates.put(TextAttribute.class, new AwtFontTextAttributePersistenceDelegate());
-        
+        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());
-        
+        delegates.put(JTabbedPane.class,
+                new SwingJTabbedPanePersistenceDelegate());
+        delegates.put(DefaultComboBoxModel.class,
+                new SwingDefaultComboBoxModelPersistenceDelegate());
+        delegates.put(ToolTipManager.class,
+                new SwingToolTipManagerPersistenceDelegate());
+        delegates.put(ScrollPane.class, new AwtScrollPanePersistenceDelegate());
+
         delegates.put(Date.class, new UtilDatePersistenceDelegate());
-        
-	}
+    }
 
-	private ExceptionListener listener = defaultExListener;
+    private ExceptionListener listener = defaultExListener;
 
-	private ReferenceMap oldNewMap = new ReferenceMap();
+    private ReferenceMap oldNewMap = new ReferenceMap();
 
-	/**
-	 * Construct a new encoder.
-	 */
-	public Encoder() {
-		super();
-	}
-
-	/**
-	 * Clear all the new objects have been created.
-	 */
-	void clear() {
-		oldNewMap.clear();
-	}
-
-	/**
-	 * Gets the new copy of the given old object.
-	 * <p>
-	 * Strings are special objects which have their new copy by default, so if
-	 * the old object is a string, it is returned directly.
-	 * </p>
-	 * 
-	 * @param old
-	 *            an old object
-	 * @return the new copy of the given old object, or null if there is not
-	 *         one.
-	 */
-	public Object get(Object old) {
-		if (old == null || old instanceof String) {
-			return old;
-		}
-		return oldNewMap.get(old);
-	}
-
-	/**
-	 * Returns the exception listener of this encoder.
-	 * <p>
-	 * An encoder always have a non-null exception listener. A default exception
-	 * listener is used when the encoder is created.
-	 * </p>
-	 * 
-	 * @return the exception listener of this encoder
-	 */
-	public ExceptionListener getExceptionListener() {
-		return listener;
-	}
-
-	/**
-	 * Returns a <code>PersistenceDelegate</code> for the given class type.
-	 * <p>
-	 * The <code>PersistenceDelegate</code> is determined as following:
-	 * <ol>
-	 * <li>If a <code>PersistenceDelegate</code> has been registered by
-	 * calling <code>setPersistenceDelegate</code> for the given type, it is
-	 * returned.</li>
-	 * <li>If the given type is an array class, a special
-	 * <code>PersistenceDelegate</code> for array types is returned.</li>
-	 * <li>If the given type is a proxy class, a special
-	 * <code>PersistenceDelegate</code> for proxy classes is returned.</li>
-	 * <li><code>Introspector</code> is used to check the bean descriptor
-	 * value "persistenceDelegate". If one is set, it is returned.</li>
-	 * <li>If none of the above applies, the
-	 * <code>DefaultPersistenceDelegate</code> is returned.</li>
-	 * </ol>
-	 * </p>
-	 * 
-	 * @param type
-	 *            a class type
-	 * @return a <code>PersistenceDelegate</code> for the given class type
-	 */
-	public PersistenceDelegate getPersistenceDelegate(Class<?> type) {
-		if (type == null) {
-			return nullPD; // may be return a special PD?
-		}
+    /**
+     * Construct a new encoder.
+     */
+    public Encoder() {
+        super();
+    }
+
+    /**
+     * Clear all the new objects have been created.
+     */
+    void clear() {
+        oldNewMap.clear();
+    }
+
+    /**
+     * Gets the new copy of the given old object.
+     * <p>
+     * Strings are special objects which have their new copy by default, so if
+     * the old object is a string, it is returned directly.
+     * </p>
+     * 
+     * @param old
+     *            an old object
+     * @return the new copy of the given old object, or null if there is not
+     *         one.
+     */
+    public Object get(Object old) {
+        if (old == null || old instanceof String) {
+            return old;
+        }
+        return oldNewMap.get(old);
+    }
+
+    /**
+     * Returns the exception listener of this encoder.
+     * <p>
+     * An encoder always have a non-null exception listener. A default exception
+     * listener is used when the encoder is created.
+     * </p>
+     * 
+     * @return the exception listener of this encoder
+     */
+    public ExceptionListener getExceptionListener() {
+        return listener;
+    }
+
+    /**
+     * Returns a <code>PersistenceDelegate</code> for the given class type.
+     * <p>
+     * The <code>PersistenceDelegate</code> is determined as following:
+     * <ol>
+     * <li>If a <code>PersistenceDelegate</code> has been registered by
+     * calling <code>setPersistenceDelegate</code> for the given type, it is
+     * returned.</li>
+     * <li>If the given type is an array class, a special
+     * <code>PersistenceDelegate</code> for array types is returned.</li>
+     * <li>If the given type is a proxy class, a special
+     * <code>PersistenceDelegate</code> for proxy classes is returned.</li>
+     * <li><code>Introspector</code> is used to check the bean descriptor
+     * value "persistenceDelegate". If one is set, it is returned.</li>
+     * <li>If none of the above applies, the
+     * <code>DefaultPersistenceDelegate</code> is returned.</li>
+     * </ol>
+     * </p>
+     * 
+     * @param type
+     *            a class type
+     * @return a <code>PersistenceDelegate</code> for the given class type
+     */
+    public PersistenceDelegate getPersistenceDelegate(Class<?> type) {
+        if (type == null) {
+            return nullPD; // may be return a special PD?
+        }
 
         // registered delegate
-		PersistenceDelegate registeredPD = (PersistenceDelegate) delegates
-				.get(type);
-		if (registeredPD != null) {
-			return registeredPD;
-		}
-        
+        PersistenceDelegate registeredPD = (PersistenceDelegate) delegates
+                .get(type);
+        if (registeredPD != null) {
+            return registeredPD;
+        }
+
         if (java.util.List.class.isAssignableFrom(type)) {
             return new UtilListPersistenceDelegate();
         }
-		
+
         if (Collection.class.isAssignableFrom(type)) {
             return new UtilCollectionPersistenceDelegate();
         }
-        
+
         if (Map.class.isAssignableFrom(type)) {
             return new UtilMapPersistenceDelegate();
         }
-        
-		if (type.isArray()) {
-			return arrayPD;
-		}
-		if (Proxy.isProxyClass(type)) {
-			return proxyPD;
-		}
-
-		// check "persistenceDelegate" property
-		try {
-			BeanInfo binfo = Introspector.getBeanInfo(type);
-			if (binfo != null) {
-				PersistenceDelegate pd = (PersistenceDelegate) binfo
-						.getBeanDescriptor().getValue("persistenceDelegate"); //$NON-NLS-1$
-				if (pd != null) {
-					return pd;
-				}
-			}
-		} catch (Exception e) {
-			// ignore
-		}
-
-		// default persistence delegate
-		return defaultPD;
-	}
-
-	private void put(Object old, Object nu) {
-		oldNewMap.put(old, nu);
-	}
-
-	/**
-	 * Remvoe the existing new copy of the given old object.
-	 * 
-	 * @param old
-	 *            an old object
-	 * @return the removed new version of the old object, or null if there is
-	 *         not one
-	 */
-	public Object remove(Object old) {
-		return oldNewMap.remove(old);
-	}
-
-	/**
-	 * Sets the exception listener of this encoder.
-	 * 
-	 * @param listener
-	 *            the exception listener to set
-	 */
-	public void setExceptionListener(ExceptionListener listener) {
-		if (listener == null) {
-			this.listener = defaultExListener;
+
+        if (type.isArray()) {
+            return arrayPD;
+        }
+        if (Proxy.isProxyClass(type)) {
+            return proxyPD;
+        }
+
+        // check "persistenceDelegate" property
+        try {
+            BeanInfo binfo = Introspector.getBeanInfo(type);
+            if (binfo != null) {
+                PersistenceDelegate pd = (PersistenceDelegate) binfo
+                        .getBeanDescriptor().getValue("persistenceDelegate"); //$NON-NLS-1$
+                if (pd != null) {
+                    return pd;
+                }
+            }
+        } catch (Exception e) {
+            // ignore
+        }
+
+        // default persistence delegate
+        return defaultPD;
+    }
+
+    private void put(Object old, Object nu) {
+        oldNewMap.put(old, nu);
+    }
+
+    /**
+     * Remvoe the existing new copy of the given old object.
+     * 
+     * @param old
+     *            an old object
+     * @return the removed new version of the old object, or null if there is
+     *         not one
+     */
+    public Object remove(Object old) {
+        return oldNewMap.remove(old);
+    }
+
+    /**
+     * Sets the exception listener of this encoder.
+     * 
+     * @param listener
+     *            the exception listener to set
+     */
+    public void setExceptionListener(ExceptionListener listener) {
+        if (listener == null) {
+            this.listener = defaultExListener;
             return;
-		}
-		this.listener = listener;
-	}
-
-	/**
-	 * Register the <code>PersistenceDelegate</code> of the specified type.
-	 * 
-	 * @param type
-	 * @param delegate
-	 */
-	public void setPersistenceDelegate(Class<?> type, PersistenceDelegate delegate) {
-		if (type == null || delegate == null) {
-			throw new NullPointerException();
-		}
-		delegates.put(type, delegate);
-	}
-
-	private Object forceNew(Object old) {
-		if (old == null) {
-			return null;
-		}
-		Object nu = get(old);
-		if (nu != null) {
-			return nu;
-		}
-		writeObject(old);
-		return get(old);
-	}
-
-	private Object[] forceNewArray(Object oldArray[]) {
-		if (oldArray == null) {
-			return null;
-		}
-		Object newArray[] = new Object[oldArray.length];
-		for (int i = 0; i < oldArray.length; i++) {
-			newArray[i] = forceNew(oldArray[i]);
-		}
-		return newArray;
-	}
-
-	/**
-	 * Write an expression of old objects.
-	 * <p>
-	 * The implementation first check the return value of the expression. If
-	 * there exists a new version of the object, simply return.
-	 * </p>
-	 * <p>
-	 * A new expression is created using the new versions of the target and the
-	 * arguments. If any of the old objects do not have its new version yet,
-	 * <code>writeObject()</code> is called to create the new version.
-	 * </p>
-	 * <p>
-	 * The new expression is then executed to obtained a new copy of the old
-	 * return value.
-	 * </p>
-	 * <p>
-	 * Call <code>writeObject()</code> with the old return value, so that more
-	 * statements will be executed on its new version to change it into the same
-	 * state as the old value.
-	 * </p>
-	 * 
-	 * @param oldExp
-	 *            the expression to write. The target, arguments, and return
-	 *            value of the expression are all old objects.
-	 */
-	public void writeExpression(Expression oldExp) {
-		if (oldExp == null) {
-			throw new NullPointerException();
-		}
-		try {
-			// if oldValue exists, noop
-			Object oldValue = oldExp.getValue();
-			if (oldValue == null || get(oldValue) != null) {
-				return;
-			}
-
-			// copy to newExp
-			Object newTarget = forceNew(oldExp.getTarget());
-			Object newArgs[] = forceNewArray(oldExp.getArguments());
-			Expression newExp = new Expression(newTarget, oldExp
-					.getMethodName(), newArgs);
-
-			// execute newExp
-			Object newValue = null;
-			try {
-				newValue = newExp.getValue();
-			} catch (IndexOutOfBoundsException ex) {
-				// Current Container does not have any component, newVal set
-				// to null
-			}
-
-			// relate oldValue to newValue
-			put(oldValue, newValue);
-
-			// force same state
-			writeObject(oldValue);
-		} catch (Exception e) {
-			listener.exceptionThrown(new Exception(
-					"failed to write expression: " + oldExp, e)); //$NON-NLS-1$
-		}
-	}
-
-	/**
-	 * Encode the given object into a series of statements and expressions.
-	 * <p>
-	 * The implementation simply finds the <code>PersistenceDelegate</code>
-	 * responsible for the object's class, and delegate the call to it.
-	 * </p>
-	 * 
-	 * @param o
-	 *            the object to encode
-	 */
-	protected void writeObject(Object o) {
-		if (o == null) {
-			return;
-		}
-		Class type = o.getClass();
-		getPersistenceDelegate(type).writeObject(o, this);
-	}
-
-	/**
-	 * Write a statement of old objects.
-	 * <p>
-	 * A new statement is created by using the new versions of the target and
-	 * arguments. If any of the objects do not have its new copy yet,
-	 * <code>writeObject()</code> is called to create one.
-	 * </p>
-	 * <p>
-	 * The new statement is then executed to change the state of the new object.
-	 * </p>
-	 * 
-	 * @param oldStat
-	 *            a statement of old objects
-	 */
-	public void writeStatement(Statement oldStat) {
-		if (oldStat == null) {
-			throw new NullPointerException();
-		}
-		try {
-			// copy to newStat
-			Object newTarget = forceNew(oldStat.getTarget());
-			Object newArgs[] = forceNewArray(oldStat.getArguments());
-			Statement newStat = new Statement(newTarget, oldStat
-					.getMethodName(), newArgs);
-
-			// execute newStat
-			newStat.execute();
-		} catch (Exception e) {
-			listener.exceptionThrown(new Exception(
-					"failed to write statement: " + oldStat, e)); //$NON-NLS-1$
-		}
-	}
+        }
+        this.listener = listener;
+    }
 
-}
+    /**
+     * Register the <code>PersistenceDelegate</code> of the specified type.
+     * 
+     * @param type
+     * @param delegate
+     */
+    public void setPersistenceDelegate(Class<?> type,
+            PersistenceDelegate delegate) {
+        if (type == null || delegate == null) {
+            throw new NullPointerException();
+        }
+        delegates.put(type, delegate);
+    }
 
+    private Object forceNew(Object old) {
+        if (old == null) {
+            return null;
+        }
+        Object nu = get(old);
+        if (nu != null) {
+            return nu;
+        }
+        writeObject(old);
+        return get(old);
+    }
+
+    private Object[] forceNewArray(Object oldArray[]) {
+        if (oldArray == null) {
+            return null;
+        }
+        Object newArray[] = new Object[oldArray.length];
+        for (int i = 0; i < oldArray.length; i++) {
+            newArray[i] = forceNew(oldArray[i]);
+        }
+        return newArray;
+    }
+
+    /**
+     * Write an expression of old objects.
+     * <p>
+     * The implementation first check the return value of the expression. If
+     * there exists a new version of the object, simply return.
+     * </p>
+     * <p>
+     * A new expression is created using the new versions of the target and the
+     * arguments. If any of the old objects do not have its new version yet,
+     * <code>writeObject()</code> is called to create the new version.
+     * </p>
+     * <p>
+     * The new expression is then executed to obtained a new copy of the old
+     * return value.
+     * </p>
+     * <p>
+     * Call <code>writeObject()</code> with the old return value, so that more
+     * statements will be executed on its new version to change it into the same
+     * state as the old value.
+     * </p>
+     * 
+     * @param oldExp
+     *            the expression to write. The target, arguments, and return
+     *            value of the expression are all old objects.
+     */
+    public void writeExpression(Expression oldExp) {
+        if (oldExp == null) {
+            throw new NullPointerException();
+        }
+        try {
+            // if oldValue exists, noop
+            Object oldValue = oldExp.getValue();
+            if (oldValue == null || get(oldValue) != null) {
+                return;
+            }
+
+            // copy to newExp
+            Object newTarget = forceNew(oldExp.getTarget());
+            Object newArgs[] = forceNewArray(oldExp.getArguments());
+            Expression newExp = new Expression(newTarget, oldExp
+                    .getMethodName(), newArgs);
+
+            // execute newExp
+            Object newValue = null;
+            try {
+                newValue = newExp.getValue();
+            } catch (IndexOutOfBoundsException ex) {
+                // Current Container does not have any component, newVal set
+                // to null
+            }
+
+            // relate oldValue to newValue
+            put(oldValue, newValue);
+
+            // force same state
+            writeObject(oldValue);
+        } catch (Exception e) {
+            listener.exceptionThrown(new Exception(
+                    "failed to write expression: " + oldExp, e)); //$NON-NLS-1$
+        }
+    }
+
+    /**
+     * Encode the given object into a series of statements and expressions.
+     * <p>
+     * The implementation simply finds the <code>PersistenceDelegate</code>
+     * responsible for the object's class, and delegate the call to it.
+     * </p>
+     * 
+     * @param o
+     *            the object to encode
+     */
+    protected void writeObject(Object o) {
+        if (o == null) {
+            return;
+        }
+        Class type = o.getClass();
+        getPersistenceDelegate(type).writeObject(o, this);
+    }
+
+    /**
+     * Write a statement of old objects.
+     * <p>
+     * A new statement is created by using the new versions of the target and
+     * arguments. If any of the objects do not have its new copy yet,
+     * <code>writeObject()</code> is called to create one.
+     * </p>
+     * <p>
+     * The new statement is then executed to change the state of the new object.
+     * </p>
+     * 
+     * @param oldStat
+     *            a statement of old objects
+     */
+    public void writeStatement(Statement oldStat) {
+        if (oldStat == null) {
+            throw new NullPointerException();
+        }
+        try {
+            // copy to newStat
+            Object newTarget = forceNew(oldStat.getTarget());
+            Object newArgs[] = forceNewArray(oldStat.getArguments());
+            Statement newStat = new Statement(newTarget, oldStat
+                    .getMethodName(), newArgs);
+
+            // execute newStat
+            newStat.execute();
+        } catch (Exception e) {
+            listener.exceptionThrown(new Exception(
+                    "failed to write statement: " + oldStat, e)); //$NON-NLS-1$
+        }
+    }
+
+}

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StandardBeanInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StandardBeanInfo.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StandardBeanInfo.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/java/beans/StandardBeanInfo.java Wed Oct 10 23:57:05 2007
@@ -658,85 +658,90 @@
 
     @SuppressWarnings("unchecked")
     private static void introspectGet(Method theMethod,
-            HashMap<String, HashMap> propertyTable) {
-        String methodName = theMethod.getName();
-        if (methodName == null) {
-            return;
-        }
-
-        int prefixLength = 0;
-        if (methodName.startsWith(PREFIX_GET)) {
-            prefixLength = PREFIX_GET.length();
-        }
-
-        if (methodName.startsWith(PREFIX_IS)) {
-            prefixLength = PREFIX_IS.length();
-        }
-
-        if (prefixLength == 0) {
-            return;
-        }
-
-        String propertyName = decapitalize(methodName.substring(prefixLength));
-        // validate property name
-        if (!isValidProperty(propertyName)) {
-            return;
-        }
-
-        Class propertyType = theMethod.getReturnType();
-
-        // check return type getMethod
-        if (propertyType.getName().equals(Void.TYPE.getName())) {
-            return;
-        }
-
-        // isXXX return boolean
-        if (prefixLength == 2) {
-            if (!propertyType.getName().equals(Boolean.TYPE.getName())) {
-                return;
-            }
-        }
-
-        // indexed get method
-        Class[] paramTypes = theMethod.getParameterTypes();
-
-        if (paramTypes.length > 1) {
-            return;
-        }
-
-        String tag = "normal"; //$NON-NLS-1$
-
-        if (paramTypes.length == 1) {
-            if (paramTypes[0].getName().equals(Integer.TYPE.getName())) {
-                tag = "indexed"; //$NON-NLS-1$
-            } else {
-                return;
-            }
-
-        }
-
-        HashMap table = propertyTable.get(propertyName);
-        if (table == null) {
-            table = new HashMap();
-        }
-
-        // the "get" propertyType is conflict with "set" propertyType
-        Class oldPropertyType = (Class) table.get(tag + "PropertyType"); //$NON-NLS-1$
-        if ((oldPropertyType != null)
-                && (!oldPropertyType.getName().equals(propertyType.getName()))) {
-            table.put(tag, "invalid"); //$NON-NLS-1$
-            table.put(tag + "get", theMethod); //$NON-NLS-1$
-            table.put(tag + "PropertyType", propertyType); //$NON-NLS-1$
-            table.remove(tag + "set"); //$NON-NLS-1$
-            return;
-        }
-
-        table.put(tag, "valid"); //$NON-NLS-1$
-        table.put(tag + "get", theMethod); //$NON-NLS-1$
-        table.put(tag + "PropertyType", propertyType); //$NON-NLS-1$
-
-        propertyTable.put(propertyName, table);
-    }
+			HashMap<String, HashMap> propertyTable) {
+		String methodName = theMethod.getName();
+		if (methodName == null) {
+			return;
+		}
+
+		int prefixLength = 0;
+		if (methodName.startsWith(PREFIX_GET)) {
+			prefixLength = PREFIX_GET.length();
+		}
+
+		if (methodName.startsWith(PREFIX_IS)) {
+			prefixLength = PREFIX_IS.length();
+		}
+
+		if (prefixLength == 0) {
+			return;
+		}
+
+		String propertyName = decapitalize(methodName.substring(prefixLength));
+		// validate property name
+		if (!isValidProperty(propertyName)) {
+			return;
+		}
+
+		Class propertyType = theMethod.getReturnType();
+
+		// check return type getMethod
+		if (propertyType.getName().equals(Void.TYPE.getName())) {
+			return;
+		}
+
+		// isXXX return boolean
+		if (prefixLength == 2) {
+			if (!propertyType.getName().equals(Boolean.TYPE.getName())) {
+				return;
+			}
+		}
+
+		// indexed get method
+		Class[] paramTypes = theMethod.getParameterTypes();
+
+		if (paramTypes.length > 1) {
+			return;
+		}
+
+		String tag = "normal"; //$NON-NLS-1$
+
+		if (paramTypes.length == 1) {
+			if (paramTypes[0].getName().equals(Integer.TYPE.getName())) {
+				tag = "indexed"; //$NON-NLS-1$
+			} else {
+				return;
+			}
+
+		}
+
+		HashMap table = propertyTable.get(propertyName);
+		if (table == null) {
+			table = new HashMap();
+			propertyTable.put(propertyName, table);
+		}
+
+		// the "get" propertyType is conflict with "set" propertyType
+		Class oldPropertyType = (Class) table.get(tag + "PropertyType"); //$NON-NLS-1$
+		if ((oldPropertyType != null)
+				&& (!oldPropertyType.getName().equals(propertyType.getName()))) {
+			table.put(tag, "invalid"); //$NON-NLS-1$
+			table.remove(tag + "set"); //$NON-NLS-1$
+		} else {
+			table.put(tag, "valid"); //$NON-NLS-1$
+		}
+		
+		table.put(tag + "PropertyType", propertyType); //$NON-NLS-1$
+
+		// According to the spec "is" method should be used prior to "get"
+		if (prefixLength == 3) {
+			if (!table.containsKey(tag + "get")) { //$NON-NLS-1$
+				table.put(tag + "get", theMethod); //$NON-NLS-1$
+			}
+		} else {
+			table.put(tag + "get", theMethod); //$NON-NLS-1$
+		}
+	}
 
     @SuppressWarnings("unchecked")
     private static void introspectSet(Method theMethod,

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/main/java/org/apache/harmony/beans/editors/ColorEditor.java Wed Oct 10 23:57:05 2007
@@ -32,14 +32,14 @@
 @SuppressWarnings("serial")
 public class ColorEditor extends Panel implements PropertyEditor {
 
-List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
-    
+    List<PropertyChangeListener> listeners = new ArrayList<PropertyChangeListener>();
+
     private Color value;
-    
+
     private Object source;
-    
+
     public ColorEditor(Object source) {
-        if(null == source) {
+        if (null == source) {
             throw new NullPointerException();
         }
         this.source = source;
@@ -74,23 +74,27 @@
     }
 
     public void setValue(Object value) {
-        if( null == value) {
+        if (null == value) {
             return;
         }
         Object oldValue = this.value;
         this.value = (Color) value;
         PropertyChangeEvent changeAllEvent = new PropertyChangeEvent(this,
                 "value", oldValue, value); //$NON-NLS-1$
-        PropertyChangeListener[] copy = new PropertyChangeListener[listeners.size()];
+        PropertyChangeListener[] copy = new PropertyChangeListener[listeners
+                .size()];
         listeners.toArray(copy);
         for (PropertyChangeListener listener : copy) {
             listener.propertyChange(changeAllEvent);
         }
     }
-    
+
     @SuppressWarnings("nls")
-    public String getAsText(){
-        Color c = (Color)getValue();
+    public String getAsText() {
+        Color c = (Color) getValue();
+        if (null == c) {
+            return "null";
+        }
         StringBuilder sb = new StringBuilder(14);
         sb.append(c.getRed());
         sb.append(",");
@@ -99,7 +103,7 @@
         sb.append(c.getBlue());
         return sb.toString();
     }
-    
+
     @SuppressWarnings("nls")
     public void setAsText(String text) {
         if (null == text) {
@@ -123,7 +127,6 @@
             throw new IllegalArgumentException(aText);
         }
     }
-    
 
     public boolean isPaintable() {
         return true;
@@ -140,7 +143,7 @@
     public Object getValue() {
         return value;
     }
-    
+
     @Override
     public synchronized void removePropertyChangeListener(
             PropertyChangeListener listener) {
@@ -154,7 +157,7 @@
             PropertyChangeListener listener) {
         listeners.add(listener);
     }
-    
+
     public void firePropertyChange() {
         if (listeners.isEmpty()) {
             return;

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?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- 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 Wed Oct 10 23:57:05 2007
@@ -1496,6 +1496,34 @@
         assertEquals("property1", pds[0].getName());
         assertEquals("property8", pds[1].getName());
     }
+    
+    public void testHarmony4861() throws IntrospectionException {
+		final PropertyDescriptor[] propertyDescriptors = Introspector
+				.getBeanInfo(TestBean.class).getPropertyDescriptors();
+
+		for (PropertyDescriptor d : propertyDescriptors) {
+			if (d.getName().equals("prop1")) { //$NON-NLS-1$
+				assertEquals("isProp1", d.getReadMethod().getName()); //$NON-NLS-1$
+				return;
+			}
+		}
+	}
+
+	public static class TestBean {
+		boolean prop1;
+
+		public void setProp1(boolean prop1) {
+			this.prop1 = prop1;
+		}
+
+		public boolean isProp1() {
+			return prop1;
+		}
+
+		public boolean getProp1() {
+			return prop1;
+		}
+	}
 
     public static TestSuite suite() {
 //        TestSuite suite = new TestSuite();

Modified: harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorManagerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorManagerTest.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorManagerTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/PropertyEditorManagerTest.java Wed Oct 10 23:57:05 2007
@@ -772,6 +772,8 @@
     }
     public void testColorEditor() throws Exception{
         PropertyEditor e2 = PropertyEditorManager.findEditor(Color.class);
+        assertNull(e2.getValue());
+        assertEquals("null", e2.getAsText());
         e2.setValue(Color.RED);
         e2.setAsText(e2.getAsText());
         assertNull(e2.getTags());

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttrDefinitionBands.java Wed Oct 10 23:57:05 2007
@@ -24,7 +24,7 @@
  *
  */
 public class AttrDefinitionBands extends BandSet {
-    
+
     private int[] attributeDefinitionHeader;
 
     private String[] attributeDefinitionLayout;    

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/AttributeLayoutMap.java Wed Oct 10 23:57:05 2007
@@ -209,7 +209,7 @@
 	}
 
 	public void add(AttributeLayout layout) {
-        layouts[layout.getContext()].put(Integer.valueOf(layout.getIndex()), layout);
+        layouts[layout.getContext()].put(new Integer(layout.getIndex()), layout);
 	}
 
 	public AttributeLayout getAttributeLayout(String name, int context)

Modified: harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java?rev=583703&r1=583702&r2=583703&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/pack200/src/main/java/org/apache/harmony/pack200/BandSet.java Wed Oct 10 23:57:05 2007
@@ -71,6 +71,24 @@
         return result;
     }
     
+    public int[][] decodeBandInt(String name, InputStream in, BHSDCodec defaultCodec, int[] counts) throws IOException, Pack200Exception {
+        int[][] result = new int[counts.length][];
+        int totalCount = 0;
+        for (int i = 0; i < counts.length; i++) {
+            totalCount += counts[i];
+        }
+        int[] twoDResult = decodeBandInt(name, in, defaultCodec, totalCount);
+        int index = 0;
+        for (int i = 0; i < result.length; i++) {
+            result[i] = new int[counts[i]];
+            for(int j = 0; j < result[i].length; j++) {
+                result[i][j] = twoDResult[index];
+                index++;
+            }
+        }
+        return result;
+    }
+    
     /**
      * Decode a band and return an array of <code>long[]</code> values
      * 
@@ -184,7 +202,7 @@
     public String[] parseReferences(String name, InputStream in,
             BHSDCodec codec, int count, String[] reference) throws IOException,
             Pack200Exception {
-        return parseReferences(name, in, codec, 1, new int[] { count },
+        return parseReferences(name, in, codec, new int[] { count },
                 reference)[0];
     }
     
@@ -214,9 +232,10 @@
      *             if a problem occurs with an unexpected value or unsupported
      *             codec
      */
-    protected String[][] parseReferences(String name, InputStream in,
-            BHSDCodec codec, int count, int counts[], String[] reference)
+    public String[][] parseReferences(String name, InputStream in,
+            BHSDCodec codec, int counts[], String[] reference)
             throws IOException, Pack200Exception {
+        int count = counts.length;
         if (count == 0) {
             return new String[][] { {} };
         }



Mime
View raw message