[webbeans-commits] Webbeans SVN: r1190 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean and 2 other directories.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Thu Jan 22 21:15:25 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-22 21:15:25 -0500 (Thu, 22 Jan 2009)
New Revision: 1190

Modified:
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
   ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
   ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
   tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java
Log:
fix breakages

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -546,11 +546,11 @@
       }
       else if (MetaDataCache.instance().getScopeModel(bean.getScopeType()).isNormal())
       {
-         return (T) proxyPool.getClientProxy(bean, true);
+         return (T) proxyPool.getClientProxy(bean, create);
       }
       else
       {
-         return getContext(bean.getScopeType()).get(bean, true);
+         return getContext(bean.getScopeType()).get(bean, create);
       }
    }
 

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -350,5 +350,19 @@
    {
       return dependentInstancesStore;
    }
+   
+   @Override
+   public boolean equals(Object other)
+   {
+      if (other instanceof AbstractClassBean)
+      {
+         AbstractClassBean<?> that = (AbstractClassBean<?>) other;
+         return super.equals(other) && that.getType().equals(this.getType());
+      }
+      else
+      {
+         return false;
+      }
+   }
 
 }

Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -327,5 +327,19 @@
       buffer.append("   API types " + getTypes() + ", binding types " + getBindings() + "\n");
       return buffer.toString();
    }
+   
+   @Override
+   public boolean equals(Object other)
+   {
+      if (other instanceof AbstractProducerBean)
+      {
+         AbstractProducerBean that = (AbstractProducerBean) other;
+         return super.equals(other) && this.getDeclaringBean().equals(that.getDeclaringBean());
+      }
+      else
+      {
+         return false;
+      }
+   }
 
 }
\ No newline at end of file

Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/unit/implementation/EnterpriseBeanProxyTest.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -2,7 +2,7 @@
 
 import javassist.util.proxy.ProxyObject;
 
-import org.jboss.webbeans.tck.AbstractTest;
+import org.jboss.webbeans.test.unit.AbstractTest;
 import org.testng.annotations.Test;
 
 public class EnterpriseBeanProxyTest extends AbstractTest

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/EventTest.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -422,11 +422,12 @@
    @SpecAssertion(section = "8.5.5")
    public void testConditionalObserver()
    {
+      RecluseSpider.notified = false;
       deployBeans(RecluseSpider.class);
 
       manager.fireEvent("New string event");
       // Should not be notified since bean is not instantiated yet
-      assert !RecluseSpider.isNotified();
+      assert !RecluseSpider.notified;
 
       // Now instantiate the bean and fire another event
       try
@@ -436,7 +437,7 @@
          assert bean != null;
 
          manager.fireEvent("Another event");
-         assert RecluseSpider.isNotified();
+         assert RecluseSpider.notified;
       }
       finally
       {

Modified: tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java
===================================================================
--- tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java	2009-01-23 01:43:45 UTC (rev 1189)
+++ tck/trunk/impl/src/main/java/org/jboss/webbeans/tck/unit/event/RecluseSpider.java	2009-01-23 02:15:25 UTC (rev 1190)
@@ -11,15 +11,11 @@
 @RequestScoped
 class RecluseSpider
 {
-   private static boolean notified = false;
+   public static boolean notified = false;
    
    public void observe(@Observes @IfExists String someEvent)
    {
       notified = true;
    }
-
-   public static boolean isNotified()
-   {
-      return notified;
-   }
+   
 }




More information about the weld-commits mailing list