You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by ge...@apache.org on 2009/01/12 22:55:42 UTC

svn commit: r733920 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java

Author: gerdogdu
Date: Mon Jan 12 13:55:41 2009
New Revision: 733920

URL: http://svn.apache.org/viewvc?rev=733920&view=rev
Log:
Changing the Throwable to Exception in create method

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java?rev=733920&r1=733919&r2=733920&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java (original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/AbstractComponent.java Mon Jan 12 13:55:41 2009
@@ -29,6 +29,7 @@
 import org.apache.webbeans.container.ManagerImpl;
 import org.apache.webbeans.context.DependentContext;
 import org.apache.webbeans.deployment.DeploymentTypeManager;
+import org.apache.webbeans.exception.WebBeansException;
 import org.apache.webbeans.intercept.InterceptorData;
 
 /**
@@ -126,12 +127,13 @@
             instance = createInstance();
 
         }
-        catch (Throwable e)
+        catch (RuntimeException re)
         {
-            if (Exception.class.isAssignableFrom(e.getClass()))
-            {
-                throw new CreationException(e);
-            }
+           throw new CreationException(re);
+        }
+        catch (Exception e)
+        {
+           throw new WebBeansException(e);
         }
         finally
         {
@@ -364,7 +366,6 @@
      * @see javax.webbeans.manager.Bean#getTypes()
      */
     @Override
-    @SuppressWarnings("unchecked")
     public Set<Class<?>> getTypes()
     {
         return this.apiTypes;