Author: struberg
Date: Wed Mar 4 19:20:47 2015
New Revision: 1664120
URL: http://svn.apache.org/r1664120
Log:
OWB-1039 also switch out DeploymentException
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBean.java
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/producer/AmbigousProducerTest.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java?rev=1664120&r1=1664119&r2=1664120&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/config/BeansDeployer.java
Wed Mar 4 19:20:47 2015
@@ -56,7 +56,6 @@ import javax.enterprise.inject.Alternati
import javax.enterprise.inject.Vetoed;
import javax.enterprise.inject.spi.BeanAttributes;
import javax.enterprise.inject.spi.DefinitionException;
-import javax.enterprise.inject.spi.DeploymentException;
import org.apache.webbeans.inject.AlternativesManager;
import org.apache.webbeans.intercept.InterceptorsManager;
@@ -291,16 +290,16 @@ public class BeansDeployer
}
catch (UnsatisfiedResolutionException e)
{
- throw new DeploymentException(e);
+ throw new WebBeansDeploymentException(e);
}
catch (AmbiguousResolutionException e)
{
- throw new DeploymentException(e);
+ throw new WebBeansDeploymentException(e);
}
catch (UnproxyableResolutionException e)
{
// the tck expects a DeploymentException, but it really should be
a DefinitionException, see i.e. https://issues.jboss.org/browse/CDITCK-346
- throw new DeploymentException(e);
+ throw new WebBeansDeploymentException(e);
}
catch (IllegalArgumentException e)
{
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBean.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBean.java?rev=1664120&r1=1664119&r2=1664120&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBean.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/container/SerializableBean.java
Wed Mar 4 19:20:47 2015
@@ -20,7 +20,7 @@ package org.apache.webbeans.container;
import org.apache.webbeans.component.OwbBean;
import org.apache.webbeans.config.WebBeansContext;
-import javax.enterprise.inject.spi.DeploymentException;
+import org.apache.webbeans.exception.WebBeansDeploymentException;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.spi.Bean;
@@ -162,7 +162,7 @@ public final class SerializableBean<T> i
Bean<T> b = (Bean<T>)
WebBeansContext.currentInstance().getBeanManagerImpl().getPassivationCapableBean(id);
if (b == null)
{
- throw new DeploymentException("cannot deserialize Bean with
PassivationCapable id=" + id);
+ throw new WebBeansDeploymentException("cannot deserialize Bean
with PassivationCapable id=" + id);
}
if (b instanceof SerializableBean)
{
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java?rev=1664120&r1=1664119&r2=1664120&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/xml/DefaultBeanArchiveService.java
Wed Mar 4 19:20:47 2015
@@ -18,7 +18,6 @@
*/
package org.apache.webbeans.xml;
-import javax.enterprise.inject.spi.DeploymentException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import java.io.IOException;
@@ -32,6 +31,7 @@ import java.util.logging.Logger;
import org.apache.webbeans.config.OWBLogConst;
import org.apache.webbeans.exception.WebBeansConfigurationException;
+import org.apache.webbeans.exception.WebBeansDeploymentException;
import org.apache.webbeans.exception.WebBeansException;
import org.apache.webbeans.logger.WebBeansLoggerFacade;
import org.apache.webbeans.spi.BeanArchiveService;
@@ -141,7 +141,7 @@ public class DefaultBeanArchiveService i
}
catch (Exception e)
{
- throw new DeploymentException("Error while parsing the beans.xml
file " + beansXmlLocation, e);
+ throw new WebBeansDeploymentException("Error while parsing the
beans.xml file " + beansXmlLocation, e);
}
finally
{
@@ -151,7 +151,7 @@ public class DefaultBeanArchiveService i
}
catch (IOException ioe)
{
- throw new DeploymentException("Error while closing the input
stream!", ioe);
+ throw new WebBeansDeploymentException("Error while closing the
input stream!", ioe);
}
}
}
Modified:
openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/producer/AmbigousProducerTest.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/producer/AmbigousProducerTest.java?rev=1664120&r1=1664119&r2=1664120&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/producer/AmbigousProducerTest.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/test/producer/AmbigousProducerTest.java
Wed Mar 4 19:20:47 2015
@@ -27,6 +27,8 @@ import junit.framework.Assert;
import org.apache.webbeans.exception.WebBeansConfigurationException;
import javax.enterprise.inject.spi.DeploymentException;
+
+import org.apache.webbeans.exception.WebBeansDeploymentException;
import org.apache.webbeans.test.AbstractUnitTest;
import org.junit.Test;
@@ -48,7 +50,7 @@ public class AmbigousProducerTest extend
}
catch (WebBeansConfigurationException e)
{
- Assert.assertEquals(DeploymentException.class,
e.getCause().getClass());
+ Assert.assertEquals(WebBeansDeploymentException.class,
e.getCause().getClass());
Assert.assertEquals(AmbiguousResolutionException.class,
e.getCause().getCause().getClass());
}
shutDownContainer();