harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r566053 - in /harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans: BeanInfoData.java BeanInfoImpl.java BeanInfoWrapper.java EventSetDescriptor.java
Date Wed, 15 Aug 2007 08:15:07 GMT
Author: pyang
Date: Wed Aug 15 01:15:06 2007
New Revision: 566053

URL: http://svn.apache.org/viewvc?view=rev&rev=566053
Log:
Remove the redundant package private classes in java.beans, they are not referenced any more

Removed:
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoData.java
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoImpl.java
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/BeanInfoWrapper.java
Modified:
    harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java

Modified: harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java?view=diff&rev=566053&r1=566052&r2=566053
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/beans/src/main/java/java/beans/EventSetDescriptor.java
Wed Aug 15 01:15:06 2007
@@ -218,7 +218,7 @@
         String eventTypeName = prepareEventTypeName(eventSetName);
 
         if (params.length > 0) {
-            firstParamTypeName = BeanInfoImpl.extractShortClassName(params[0]
+            firstParamTypeName = extractShortClassName(params[0]
                     .getName());
         }
 
@@ -227,6 +227,17 @@
             throw new IntrospectionException(Messages.getString("beans.51", //$NON-NLS-1$
                     listenerMethod.getName(), eventTypeName));
         }
+    }
+
+    /**
+     * @param fullClassName full name of the class
+     * @return name with package and encapsulating class info omitted 
+     */
+    static String extractShortClassName(String fullClassName) {
+        int k = fullClassName.lastIndexOf('$');
+        
+        k = (k == -1 ? fullClassName.lastIndexOf('.') : k);
+        return fullClassName.substring(k + 1);
     }
 
     private static String prepareEventTypeName(String eventSetName) {



Mime
View raw message