harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r447828 - in /incubator/harmony/enhanced/classlib/trunk/modules/beans/src: main/java/java/beans/DefaultPersistenceDelegate.java test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
Date Tue, 19 Sep 2006 12:17:28 GMT
Author: tellison
Date: Tue Sep 19 05:17:27 2006
New Revision: 447828

URL: http://svn.apache.org/viewvc?view=rev&rev=447828
Log:
Apply patch for HARMONY-1446 ([classlib][beans] another fix for DefaultPersistenceDelegateTest
failures)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
    incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java?view=diff&rev=447828&r1=447827&r2=447828
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/DefaultPersistenceDelegate.java
Tue Sep 19 05:17:27 2006
@@ -14,42 +14,41 @@
  *  limitations under the License.
  */
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.7.6.3 $
- */
 package java.beans;
 
 import java.lang.reflect.Method;
 
 import org.apache.harmony.beans.internal.nls.Messages;
 
-/**
- * @author Maxim V. Berkultsev
- * @version $Revision: 1.7.6.3 $
- */
-
 public class DefaultPersistenceDelegate extends PersistenceDelegate {
 
     private String[] constructorPropertyNames;
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public DefaultPersistenceDelegate(String[] constructorPropertyNames) {
-        this.constructorPropertyNames = constructorPropertyNames;
+        String[] arr = null;
+
+        // convert first letters of property names to lower case
+        if (constructorPropertyNames != null) {
+            arr = new String[constructorPropertyNames.length];
+            for (int i = 0; i < constructorPropertyNames.length; i++) {
+                if (constructorPropertyNames[i] != null &&
+                    constructorPropertyNames[i].length() > 0) {
+                        arr[i] = constructorPropertyNames[i].substring(0,1)
+                                 .toLowerCase() +
+                                 constructorPropertyNames[i].substring(1);
+                } else {
+                    arr[i] = constructorPropertyNames[i];
+                }
+            }
+        }
+
+        this.constructorPropertyNames = arr;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     public DefaultPersistenceDelegate() {
         this.constructorPropertyNames = null;
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     protected void initialize(Class<?> type, Object oldInstance,
             Object newInstance, Encoder out) {
         try {
@@ -96,9 +95,6 @@
         }
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     protected Expression instantiate(Object oldInstance, Encoder out) {
         Object[] args = null;
 
@@ -150,9 +146,6 @@
         return new Expression(oldInstance, oldInstance.getClass(), "new", args); //$NON-NLS-1$
     }
 
-    /**
-     * @com.intel.drl.spec_ref
-     */
     protected boolean mutatesTo(Object oldInstance, Object newInstance) {
         if (oldInstance != null) {
             try {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java?view=diff&rev=447828&r1=447827&r2=447828
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/DefaultPersistenceDelegateTest.java
Tue Sep 19 05:17:27 2006
@@ -893,7 +893,7 @@
 			return super.instantiate(oldInstance, out);
 		}
 
-		public void initialize(Class type, Object oldInstance,
+		public void initialize(Class<?> type, Object oldInstance,
 				Object newInstance, Encoder enc) {
 			super.initialize(type, oldInstance, newInstance, enc);
 		}
@@ -917,7 +917,8 @@
 			return super.getExceptionListener();
 		}
 
-		public PersistenceDelegate getPersistenceDelegate(Class type) {
+		public PersistenceDelegate getPersistenceDelegate(
+                  Class<?> type) {
 			return super.getPersistenceDelegate(type);
 		}
 
@@ -925,7 +926,7 @@
 			super.setExceptionListener(exceptionListener);
 		}
 
-		public void setPersistenceDelegate(Class type,
+		public void setPersistenceDelegate(Class<?> type,
 				PersistenceDelegate persistenceDelegate) {
 			super.setPersistenceDelegate(type, persistenceDelegate);
 		}



Mime
View raw message