[jboss-cvs] JBossAS SVN: r60322 - in projects/microcontainer/trunk: container/src/main/org/jboss and 8 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Feb 6 05:57:12 EST 2007


Author: alesj
Date: 2007-02-06 05:57:12 -0500 (Tue, 06 Feb 2007)
New Revision: 60322

Added:
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/Common.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConfigurationUtil.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorHandler.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorInterceptor.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanHandler.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer20.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyHandler.java
   projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyInterceptor.java
Removed:
   projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/
Modified:
   projects/microcontainer/trunk/container/build.xml
   projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfo.java
   projects/microcontainer/trunk/container/src/main/org/jboss/joinpoint/plugins/Config.java
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/support/AmbiguityBean.java
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/test/PropertyTestCase.java
Log:
Moved JavaBeans wiring to Container.

Modified: projects/microcontainer/trunk/container/build.xml
===================================================================
--- projects/microcontainer/trunk/container/build.xml	2007-02-06 06:26:22 UTC (rev 60321)
+++ projects/microcontainer/trunk/container/build.xml	2007-02-06 10:57:12 UTC (rev 60322)
@@ -74,6 +74,7 @@
       <path refid="jboss/common.logging.spi.classpath"/>
       <path refid="jboss/common.logging.log4j.classpath"/>
       <path refid="jboss.test.classpath"/>
+      <path refid="jboss.jbossxb.classpath"/>
     </path>
 
     <!-- ======= -->

Modified: projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfo.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfo.java	2007-02-06 06:26:22 UTC (rev 60321)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/beans/info/plugins/AbstractBeanInfo.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -235,7 +235,7 @@
 
    public Object invoke(Object bean, String name, String[] paramTypes, Object[] params) throws Throwable
    {
-      MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params);
+      MethodJoinpoint joinpoint = Config.getMethodJoinpoint(bean, getJoinpointFactory(), name, paramTypes, params, false);
       return joinpoint.dispatch();
    }
 

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/Common.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/Common.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/Common.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/Common.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.beans.info.spi.BeanInfo;
+
+/**
+ * Common classes and static methods
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class Common
+{
+   public static class Holder
+   {
+      private Object object;      
+      
+      public Holder()
+      {
+      }
+
+      public Object getValue()
+      {
+         return object;
+      }
+      
+      public void setValue(Object object)
+      {
+         this.object = object;
+      }
+   }
+
+   public static class Ctor extends Holder
+   {
+      private String className;
+      private boolean ctorWasDeclared;
+      private Constructor constructor = new Constructor();
+      private List<String> paramTypes = new ArrayList<String>();
+      private List<Object> argValues = new ArrayList<Object>();
+
+      public Ctor(String className)
+      {
+         this.className = className;
+      }
+
+      public boolean isCtorWasDeclared()
+      {
+         return ctorWasDeclared;
+      }
+
+      public void setCtorWasDeclared(boolean ctorWasDeclared)
+      {
+         this.ctorWasDeclared = ctorWasDeclared;
+      }
+
+      public String getClassName()
+      {
+         return className;
+      }
+      
+      public void addParam(String type, Object value)
+      {
+         paramTypes.add(type);
+         argValues.add(value);
+      }
+
+      public String[] getParamTypes()
+      {
+         String[] types = new String[paramTypes.size()];
+         paramTypes.toArray(types);
+         return types;
+      }
+
+      public Object[] getArgs()
+      {
+         Object[] args = new Object[argValues.size()];
+         argValues.toArray(args);
+         return args;
+      }
+
+      public Constructor getConstructor()
+      {
+         return constructor;
+      }
+
+      public Object newInstance()
+         throws Throwable
+      {
+         String factoryMethod = constructor.getFactoryMethod();
+         if (factoryMethod != null)
+         {
+            BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(constructor.getFactoryClass());
+            return beanInfo.invoke(null, factoryMethod, getParamTypes(), getArgs());
+         }
+         return ConfigurationUtil.newInstance(getClassName(), getParamTypes(), getArgs());
+      }
+   }
+
+   public static class Constructor
+   {
+      private String factoryClass;
+      private String factoryMethod;
+
+      public String getFactoryClass()
+      {
+         return factoryClass;
+      }
+
+      public void setFactoryClass(String value)
+      {
+         factoryClass = value;
+      }
+
+      public String getFactoryMethod()
+      {
+         return factoryMethod;
+      }
+
+      public void setFactoryMethod(String value)
+      {
+         factoryMethod = value;
+      }
+   }
+
+   public static class Property extends Holder
+   {
+      private String property;
+      
+      private String type;
+      
+      public Property()
+      {
+      }
+      
+      public String getProperty()
+      {
+         return property;
+      }
+      
+      public void setProperty(String property)
+      {
+         this.property = property;
+      }
+      
+      public String getType()
+      {
+         return type;
+      }
+      
+      public void setType(String type)
+      {
+         this.type = type;
+      }
+   }
+
+}


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/Common.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Added: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConfigurationUtil.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConfigurationUtil.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConfigurationUtil.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,135 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.javabean.plugins.xml;
+
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.config.plugins.property.PropertyConfiguration;
+import org.jboss.config.spi.Configuration;
+import org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.reflect.spi.TypeInfoFactory;
+import org.jboss.util.propertyeditor.PropertyEditors;
+
+/**
+ * Initialize the Configuration
+ *
+ * @author ales.justin at jboss.com
+ */
+public class ConfigurationUtil
+{
+   /** The kernel config */
+   private static Configuration config;
+   /** The type info factory */
+   private static final TypeInfoFactory typeInfoFactory = new IntrospectionTypeInfoFactory();
+
+   static synchronized void init()
+   {
+      if( config == null )
+      {
+         try
+         {
+            config = AccessController.doPrivileged(new PrivilegedExceptionAction<Configuration>()
+            {
+               public Configuration run() throws Exception
+               {
+                  return new PropertyConfiguration(System.getProperties());
+               }
+            });
+         }
+         catch (RuntimeException e)
+         {
+            throw e;
+         }
+         catch (Exception e)
+         {
+            throw new RuntimeException("Error getting configuration", e);
+         }
+         PropertyEditors.init();
+      }
+   }
+
+   // ----- utils
+
+   static BeanInfo getBeanInfo(Object object) throws Throwable
+   {
+      return getBeanInfo(object.getClass());
+   }
+
+   static BeanInfo getBeanInfo(Class clazz) throws Throwable
+   {
+      return config.getBeanInfo(clazz);
+   }
+
+   static BeanInfo getBeanInfo(String className) throws Throwable
+   {
+      return config.getBeanInfo(className, Thread.currentThread().getContextClassLoader());
+   }
+
+   static PropertyInfo getPropertyInfo(Object parent, String name) throws Throwable
+   {
+      BeanInfo beanInfo = getBeanInfo(parent);
+      return beanInfo.getProperty(name);
+   }
+
+   static Object newInstance(String className, String[] params, Object[] args)
+      throws Throwable
+   {
+      BeanInfo info = getBeanInfo(className);
+      return info.newInstance(params, args);
+   }
+
+   /**
+    * Convert a value
+    *
+    * @param parent parent object
+    * @param name the property name
+    * @param override the override class
+    * @param value the value
+    * @return the converted value
+    * @throws Throwable for any error
+    */
+   static Object convertValue(Object parent, String name, String override, Object value) throws Throwable
+   {
+      if (parent == null)
+         throw new IllegalArgumentException("Null parent!");
+
+      PropertyInfo property = getPropertyInfo(parent, name);
+      return convertValue(property, override, value);
+   }
+
+   static Object convertValue(PropertyInfo property, String override, Object value)
+         throws Throwable
+   {
+      if (property == null)
+         throw new IllegalArgumentException("Null property!");
+
+      TypeInfo type = property.getType();
+      if (override != null)
+         type = typeInfoFactory.getTypeInfo(override, null);
+      return type.convertValue(value);
+   }
+
+}

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorHandler.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/ConstructorHandler.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorHandler.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorHandler.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,92 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.javabean.plugins.xml.Common.Ctor;
+import org.jboss.javabean.plugins.xml.Common.Holder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * Handler for the constructor element.
+ * 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 43020 $
+ */
+public class ConstructorHandler extends DefaultElementHandler
+{
+   /** The handler */
+   public static final ConstructorHandler HANDLER = new ConstructorHandler();
+
+   public Object startElement(Object parent, QName name, ElementBinding element)
+   {
+      Holder holder = (Holder) parent;
+      Ctor ctor = (Ctor) holder.getValue();
+      ctor.setCtorWasDeclared(true);
+      return holder;
+   }
+
+   public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+   {
+      Holder holder = (Holder) o;
+      Ctor ctor = (Ctor) holder.getValue();
+      Common.Constructor constructor = ctor.getConstructor();
+      for (int i = 0; i < attrs.getLength(); ++i)
+      {
+         String localName = attrs.getLocalName(i);
+         if ("factoryClass".equals(localName))
+            constructor.setFactoryClass(attrs.getValue(i));
+         else if ("factoryMethod".equals(localName))
+            constructor.setFactoryMethod(attrs.getValue(i));
+      }
+      if( constructor.getFactoryMethod() != null && constructor.getFactoryClass() == null )
+         constructor.setFactoryClass(ctor.getClassName());
+   }
+
+   public Object endElement(Object o, QName qName, ElementBinding element)
+   {
+      Holder holder = (Holder) o;
+      Ctor ctor = (Ctor) holder.getValue();
+      try
+      {
+         return ctor.newInstance();
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Error e)
+      {
+         throw e;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error instantiating class " + ctor.getClassName(), t);
+      }
+
+   }
+}
+


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorInterceptor.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/ConstructorInterceptor.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorInterceptor.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorInterceptor.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.javabean.plugins.xml.Common.Holder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * Set the parent Holder value to the Ctor of the constructor element. 
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class ConstructorInterceptor extends DefaultElementInterceptor
+{
+   /** The interceptor */
+   public static final ConstructorInterceptor INTERCEPTOR = new ConstructorInterceptor();
+   
+   public void add(Object parent, Object child, QName name)
+   {
+      Holder holder = (Holder) parent;
+      holder.setValue(child);
+   }
+}


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/ConstructorInterceptor.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanHandler.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/JavaBeanHandler.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanHandler.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanHandler.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.javabean.plugins.xml.Common.Ctor;
+import org.jboss.javabean.plugins.xml.Common.Holder;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * Handler for the javabean element.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 43020 $
+ */
+public class JavaBeanHandler extends DefaultElementHandler
+{
+   /** The handler */
+   public static final JavaBeanHandler HANDLER = new JavaBeanHandler();
+
+   public Object startElement(Object parent, QName name, ElementBinding element)
+   {
+      return new Holder();
+   }
+
+   public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+   {
+      Holder holder = (Holder) o;
+      String className = null;
+      for (int i = 0; i < attrs.getLength(); ++i)
+      {
+         String localName = attrs.getLocalName(i);
+         if ("class".equals(localName))
+            className = attrs.getValue(i);
+      }
+      
+      if (className == null)
+         throw new IllegalArgumentException("No class attribute for " + elementName);
+      
+      try
+      {
+         Ctor ctor = new Ctor(className);
+         holder.setValue(ctor);
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Error e)
+      {
+         throw e;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error instantiating class " + className, t);
+      }
+   }
+
+   public Object endElement(Object o, QName qName, ElementBinding element)
+   {
+      Holder holder = (Holder) o;
+      Object result = holder.getValue();
+      
+      // We still have a constructor because there was no constructor element
+      if (result != null && result instanceof Ctor)
+      {
+         Ctor ctor = (Ctor) result;
+         result = ctor.getValue();
+
+         // The constructor was never run
+         if (result == null)
+         {
+            try
+            {
+               return ctor.newInstance();
+            }
+            catch (Throwable t)
+            {
+               new RuntimeException("Unable to construct object javabean", t);
+            }
+         }
+      }
+      
+      // Sanity check
+      if (result == null)
+         throw new IllegalStateException("Null object creating javabean");
+      
+      return result;
+   }
+}
+


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/JavaBeanSchemaInitializer.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,178 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.javabean.plugins.xml.Common.Holder;
+import org.jboss.javabean.plugins.xml.Common.Property;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * JavaBeanSchemaInitializer.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision$
+ */
+public class JavaBeanSchemaInitializer implements SchemaBindingInitializer
+{
+   /** The namespace */
+   private static final String JAVABEAN_NS = "urn:jboss:javabean:1.0";
+
+   /** The javabean binding */
+   private static final QName javabeanTypeQName = new QName(JAVABEAN_NS, "javabeanType");
+
+   /** The property binding */
+   private static final QName propertyTypeQName = new QName(JAVABEAN_NS, "propertyType");
+
+   /** The property element name */
+   private static final QName propertyQName = new QName(JAVABEAN_NS, "property");
+
+   static
+   {
+      ConfigurationUtil.init();
+   }
+
+   public SchemaBinding init(SchemaBinding schema)
+   {
+      // ignore XB property replacement
+      schema.setReplacePropertyRefs(false);
+
+      // javabean binding
+      TypeBinding beanType = schema.getType(javabeanTypeQName);
+      beanType.setHandler(new DefaultElementHandler()
+      {
+         
+         public Object startElement(Object parent, QName name, ElementBinding element)
+         {
+            return new Holder();
+         }
+
+         public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+         {
+            Holder holder = (Holder) o;
+            String className = null;
+            for (int i = 0; i < attrs.getLength(); ++i)
+            {
+               String localName = attrs.getLocalName(i);
+               if ("class".equals(localName))
+                  className = attrs.getValue(i);
+            }
+            
+            if (className == null)
+               throw new IllegalArgumentException("No class attribute for " + elementName);
+            
+            try
+            {
+               BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(className);
+               Object object = beanInfo.newInstance();
+               holder.setValue(object);
+            }
+            catch (RuntimeException e)
+            {
+               throw e;
+            }
+            catch (Error e)
+            {
+               throw e;
+            }
+            catch (Throwable t)
+            {
+               throw new RuntimeException("Error instantiating class " + className, t);
+            }
+         }
+
+         public Object endElement(Object o, QName qName, ElementBinding element)
+         {
+            Holder holder = (Holder) o;
+            return holder.getValue();
+         }
+      });
+
+      // bean has properties
+      beanType.pushInterceptor(propertyQName, new DefaultElementInterceptor()
+      {
+         public void add(Object parent, Object child, QName name)
+         {
+            Holder holder = (Holder) parent;
+            Object parentValue = holder.getValue();
+            
+            Property prop = (Property) child;
+            String property = prop.getProperty();
+            Object value = prop.getValue();
+            try
+            {
+               BeanInfo info = ConfigurationUtil.getBeanInfo(parentValue.getClass());
+               value = ConfigurationUtil.convertValue(parentValue, property, prop.getType(), value);
+               info.setProperty(parentValue, property, value);
+            }
+            catch (RuntimeException e)
+            {
+               throw e;
+            }
+            catch (Error e)
+            {
+               throw e;
+            }
+            catch (Throwable t)
+            {
+               throw new RuntimeException("Error setting property " + property + " on object" + parentValue + " with value " + value, t);
+            }
+         }
+      });
+
+      // property binding
+      TypeBinding propertyType = schema.getType(propertyTypeQName);
+      propertyType.setHandler(new DefaultElementHandler()
+      {
+         
+         public Object startElement(Object parent, QName name, ElementBinding element)
+         {
+            return new Property();
+         }
+
+         public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+         {
+            Property property = (Property) o;
+            for (int i = 0; i < attrs.getLength(); ++i)
+            {
+               String localName = attrs.getLocalName(i);
+               if ("name".equals(localName))
+                  property.setProperty(attrs.getValue(i));
+               else if ("class".equals(localName))
+                  property.setType(attrs.getValue(i));
+            }
+         }
+      });
+
+      return schema;
+   }
+   
+}


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer.java
___________________________________________________________________
Name: svn:keywords
   + Author Date Id Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer20.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/JavaBeanSchemaInitializer20.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer20.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer20.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,89 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingInitializer;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+
+/**
+ * JavaBeanSchemaInitializer version 2.0. This extends the
+ * urn:jboss:javabean:1.0 schema by adding a constructor element to
+ * specify the javabean constructor to use. 
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 59176 $
+ */
+public class JavaBeanSchemaInitializer20 implements SchemaBindingInitializer
+{
+   /** The namespace */
+   private static final String JAVABEAN_NS = "urn:jboss:javabean:2.0";
+
+   /** The javabean binding */
+   private static final QName javabeanTypeQName = new QName(JAVABEAN_NS, "javabeanType");
+
+   /** The constructor binding */
+   private static final QName constructorTypeQName = new QName(JAVABEAN_NS, "constructorType");
+
+   /** The property binding */
+   private static final QName propertyTypeQName = new QName(JAVABEAN_NS, "propertyType");
+
+   /** The constructor element name */
+   private static final QName constructorQName = new QName(JAVABEAN_NS, "constructor");
+
+   /** The property element name */
+   private static final QName propertyQName = new QName(JAVABEAN_NS, "property");
+
+   static
+   {
+      ConfigurationUtil.init();
+   }
+
+   public SchemaBinding init(SchemaBinding schema)
+   {
+      // ignore XB property replacement
+      schema.setReplacePropertyRefs(false);
+
+      // javabean binding
+      TypeBinding beanType = schema.getType(javabeanTypeQName);
+      beanType.setHandler(JavaBeanHandler.HANDLER);
+      // bean has constructor
+      beanType.pushInterceptor(constructorQName, ConstructorInterceptor.INTERCEPTOR);
+      // bean has properties
+      beanType.pushInterceptor(propertyQName, PropertyInterceptor.INTERCEPTOR);
+
+      // constructor binding
+      TypeBinding constructorType = schema.getType(constructorTypeQName);
+      constructorType.setHandler(ConstructorHandler.HANDLER);
+      // constructor has properties
+      constructorType.pushInterceptor(propertyQName, PropertyInterceptor.INTERCEPTOR);
+
+      // property binding
+      TypeBinding propertyType = schema.getType(propertyTypeQName);
+      propertyType.setHandler(PropertyHandler.HANDLER);
+
+      return schema;
+   }
+}


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/JavaBeanSchemaInitializer20.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyHandler.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/PropertyHandler.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyHandler.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyHandler.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.javabean.plugins.xml.Common.Property;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.xml.sax.Attributes;
+
+/**
+ * Handler for the property element.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 43020 $
+ */
+public class PropertyHandler extends DefaultElementHandler
+{
+   /** The handler */
+   public static final PropertyHandler HANDLER = new PropertyHandler();
+
+   public Object startElement(Object parent, QName name, ElementBinding element)
+   {
+      return new Property();
+   }
+
+   public void attributes(Object o, QName elementName, ElementBinding element, Attributes attrs, NamespaceContext nsCtx)
+   {
+      Property property = (Property) o;
+      for (int i = 0; i < attrs.getLength(); ++i)
+      {
+         String localName = attrs.getLocalName(i);
+         if ("name".equals(localName))
+            property.setProperty(attrs.getValue(i));
+         else if ("class".equals(localName))
+            property.setType(attrs.getValue(i));
+      }
+   }
+}
+


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyHandler.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Copied: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyInterceptor.java (from rev 60287, projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/config/xml/PropertyInterceptor.java)
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyInterceptor.java	                        (rev 0)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyInterceptor.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -0,0 +1,107 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.javabean.plugins.xml;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.javabean.plugins.xml.Common.Ctor;
+import org.jboss.javabean.plugins.xml.Common.Holder;
+import org.jboss.javabean.plugins.xml.Common.Property;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+
+/**
+ * Interceptor for the property element that adds the Property to the
+ * Holder parent.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision:$
+ */
+public class PropertyInterceptor extends DefaultElementInterceptor
+{
+   /** The interceptor */
+   public static final PropertyInterceptor INTERCEPTOR = new PropertyInterceptor();
+
+   /**
+    * Add a property to the bean. If the parent value is a Ctor the bean
+    * had no explicit contstructor element and the instance must be created by
+    * the default ctor. Otherwise, the property is added to teh Ctor as
+    * params.
+    * 
+    * If the parent value is not a Ctor the Property is a value to set on
+    * the bean.
+    * 
+    * @param parent Holder containing either a Ctor or javabean instance.
+    * @param child - the Property instance to add
+    */
+   public void add(Object parent, Object child, QName name)
+   {
+      Holder holder = (Holder) parent;
+      Object parentValue = holder.getValue();
+      Property prop = (Property) child;
+      Object value = prop.getValue();
+      String property = prop.getProperty();
+
+      try
+      {
+         if( parentValue instanceof Ctor )
+         {
+            Ctor ctor = (Ctor) parentValue;
+            if( ctor.isCtorWasDeclared() )
+            {
+               BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(ctor.getClassName());
+               PropertyInfo propertyInfo = beanInfo.getProperty(property);
+               value = ConfigurationUtil.convertValue(propertyInfo, prop.getType(), value);
+               ctor.addParam(propertyInfo.getType().getName(), value);
+            }
+            else
+            {
+               // There was no explicit ctor to create the bean and reset the parent value
+               parentValue = ctor.newInstance();
+               holder.setValue(parentValue);
+               add(parent, child, name);
+            }
+         }
+         else
+         {
+            BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(parentValue);
+            value = ConfigurationUtil.convertValue(parentValue, property, prop.getType(), value);
+            beanInfo.setProperty(parentValue, property, value);
+         }
+      }
+      catch (RuntimeException e)
+      {
+         throw e;
+      }
+      catch (Error e)
+      {
+         throw e;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error setting property " + property + " on object" + parentValue + " with value " + value, t);
+      }
+   }
+
+}


Property changes on: projects/microcontainer/trunk/container/src/main/org/jboss/javabean/plugins/xml/PropertyInterceptor.java
___________________________________________________________________
Name: svn:keywords
   + Id,Revision
Name: svn:eol-style
   + native

Modified: projects/microcontainer/trunk/container/src/main/org/jboss/joinpoint/plugins/Config.java
===================================================================
--- projects/microcontainer/trunk/container/src/main/org/jboss/joinpoint/plugins/Config.java	2007-02-06 06:26:22 UTC (rev 60321)
+++ projects/microcontainer/trunk/container/src/main/org/jboss/joinpoint/plugins/Config.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -210,6 +210,23 @@
     */
    public static MethodJoinpoint getMethodJoinpoint(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params) throws Throwable
    {
+      return getMethodJoinpoint(object, jpf, name, paramTypes, params, true);
+   }
+
+   /**
+    * Get a method joinpoint
+    *
+    * @param object the object to invoke
+    * @param jpf the join point factory
+    * @param name the name of the method
+    * @param paramTypes the parameter types
+    * @param params the parameters
+    * @param strict is strict about method modifiers
+    * @return the join point
+    * @throws Throwable for any error
+    */
+   public static MethodJoinpoint getMethodJoinpoint(Object object, JoinpointFactory jpf, String name, String[] paramTypes, Object[] params, boolean strict) throws Throwable
+   {
       boolean trace = log.isTraceEnabled();
       if (trace)
       {
@@ -219,7 +236,7 @@
             log.trace("Get method Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " paramTypes=()");
       }
 
-      MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes);
+      MethodInfo methodInfo = findMethodInfo(jpf.getClassInfo(), name, paramTypes, strict);
       MethodJoinpoint joinpoint = jpf.getMethodJoinpoint(methodInfo);
       joinpoint.setTarget(object);
       joinpoint.setArguments(params);
@@ -313,6 +330,21 @@
     * @param classInfo the class info
     * @param name the method name
     * @param paramTypes the parameter types
+    * @param strict is strict about method modifiers
+    * @return the method info
+    * @throws JoinpointException when no such method
+    */
+   public static MethodInfo findMethodInfo(ClassInfo classInfo, String name, String[] paramTypes, boolean strict) throws JoinpointException
+   {
+      return findMethodInfo(classInfo, name, paramTypes, false, true, strict);
+   }
+
+   /**
+    * Find method info
+    *
+    * @param classInfo the class info
+    * @param name the method name
+    * @param paramTypes the parameter types
     * @param isStatic must the method be static
     * @param isPublic must the method be public
     * @return the method info
@@ -320,6 +352,23 @@
     */
    public static MethodInfo findMethodInfo(ClassInfo classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic) throws JoinpointException
    {
+      return findMethodInfo(classInfo, name, paramTypes, isStatic, isPublic, true);
+   }
+
+   /**
+    * Find method info
+    *
+    * @param classInfo the class info
+    * @param name the method name
+    * @param paramTypes the parameter types
+    * @param isStatic must the method be static
+    * @param isPublic must the method be public
+    * @param strict is strict about method modifiers
+    * @return the method info
+    * @throws JoinpointException when no such method
+    */
+   public static MethodInfo findMethodInfo(ClassInfo classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic, boolean strict) throws JoinpointException
+   {
       if (classInfo == null)
          throw new IllegalArgumentException("ClassInfo cannot be null!");
 
@@ -329,7 +378,7 @@
       ClassInfo current = classInfo;
       while (current != null)
       {
-         MethodInfo result = locateMethodInfo(current, name, paramTypes, isStatic, isPublic);
+         MethodInfo result = locateMethodInfo(current, name, paramTypes, isStatic, isPublic, strict);
          if (result != null)
             return result;
          current = current.getSuperclass();
@@ -345,9 +394,10 @@
     * @param paramTypes the parameter types
     * @param isStatic must the method be static
     * @param isPublic must the method be public
+    * @param strict is strict about method modifiers
     * @return the method info or null if not found
     */
-   private static MethodInfo locateMethodInfo(ClassInfo classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic)
+   private static MethodInfo locateMethodInfo(ClassInfo classInfo, String name, String[] paramTypes, boolean isStatic, boolean isPublic, boolean strict)
    {
       MethodInfo[] methods = classInfo.getDeclaredMethods();
       if (methods != null)
@@ -356,8 +406,7 @@
          {
             if (name.equals(methods[i].getName()) &&
                 equals(paramTypes, methods[i].getParameterTypes()) &&
-                methods[i].isStatic() == isStatic &&
-                methods[i].isPublic() == isPublic)
+                (strict == false || (methods[i].isStatic() == isStatic && methods[i].isPublic() == isPublic)))
                return methods[i];
          }
       }

Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/support/AmbiguityBean.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/support/AmbiguityBean.java	2007-02-06 06:26:22 UTC (rev 60321)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/support/AmbiguityBean.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -24,8 +24,7 @@
 /**
  * SimpleBean.
  *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 46093 $
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  */
 public class AmbiguityBean
 {

Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/test/PropertyTestCase.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/test/PropertyTestCase.java	2007-02-06 06:26:22 UTC (rev 60321)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/javabean/test/PropertyTestCase.java	2007-02-06 10:57:12 UTC (rev 60322)
@@ -22,8 +22,8 @@
 package org.jboss.test.javabean.test;
 
 import java.beans.BeanInfo;
-import java.beans.PropertyDescriptor;
 import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.text.DateFormat;
@@ -31,11 +31,10 @@
 import java.util.Date;
 import java.util.HashMap;
 
+import junit.framework.Test;
 import org.jboss.test.javabean.support.SimpleBean;
 import org.jboss.util.NestedRuntimeException;
 
-import junit.framework.Test;
-
 /**
  * PropertyTestCase.
  *
@@ -104,7 +103,6 @@
       validateFields("(<all-fields>)", "SimpleBeanFactory.newInstance(<all-fields>)", bean);
    }
 
-
    /**
     * Validate the JavaBean property name introspection
     * @throws Exception




More information about the jboss-cvs-commits mailing list