openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1666739 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception: DuplicateDefinitionException.java InconsistentSpecializationException.java WebBeansConfigurationException.java WebBeansDeploymentException.java
Date Sat, 14 Mar 2015 19:54:46 GMT
Author: rmannibucau
Date: Sat Mar 14 19:54:45 2015
New Revision: 1666739

URL: http://svn.apache.org/r1666739
Log:
ensuring OWB DeploymentException/DefinitionException are serializable as spec ones

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/DuplicateDefinitionException.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/InconsistentSpecializationException.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansConfigurationException.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansDeploymentException.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/DuplicateDefinitionException.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/DuplicateDefinitionException.java?rev=1666739&r1=1666738&r2=1666739&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/DuplicateDefinitionException.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/DuplicateDefinitionException.java
Sat Mar 14 19:54:45 2015
@@ -22,6 +22,8 @@ import javax.enterprise.inject.spi.Defin
 import org.apache.webbeans.exception.helper.DescriptiveException;
 import org.apache.webbeans.exception.helper.ExceptionMessageBuilder;
 
+import java.io.ObjectStreamException;
+
 public class DuplicateDefinitionException extends DefinitionException implements DescriptiveException
 {
     private static final long serialVersionUID = 2312285271502063304L;
@@ -62,4 +64,8 @@ public class DuplicateDefinitionExceptio
         return msg.getAdditionalInformation(super.getLocalizedMessage());
     }
 
+    private Object writeReplace() throws ObjectStreamException
+    {
+        return new DefinitionException(getMessage(), getCause());
+    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/InconsistentSpecializationException.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/InconsistentSpecializationException.java?rev=1666739&r1=1666738&r2=1666739&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/InconsistentSpecializationException.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/InconsistentSpecializationException.java
Sat Mar 14 19:54:45 2015
@@ -22,6 +22,8 @@ import javax.enterprise.inject.spi.Defin
 import org.apache.webbeans.exception.helper.DescriptiveException;
 import org.apache.webbeans.exception.helper.ExceptionMessageBuilder;
 
+import java.io.ObjectStreamException;
+
 public class InconsistentSpecializationException extends DefinitionException implements DescriptiveException
 {
     private static final long serialVersionUID = 5398575103682514128L;
@@ -61,4 +63,8 @@ public class InconsistentSpecializationE
         return msg.getAdditionalInformation(super.getLocalizedMessage());
     }
 
+    private Object writeReplace() throws ObjectStreamException
+    {
+        return new DefinitionException(getMessage(), getCause());
+    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansConfigurationException.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansConfigurationException.java?rev=1666739&r1=1666738&r2=1666739&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansConfigurationException.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansConfigurationException.java
Sat Mar 14 19:54:45 2015
@@ -22,6 +22,8 @@ import javax.enterprise.inject.spi.Defin
 import org.apache.webbeans.exception.helper.DescriptiveException;
 import org.apache.webbeans.exception.helper.ExceptionMessageBuilder;
 
+import java.io.ObjectStreamException;
+
 /**
  * Exception that is thrown by the web beans container at the intialization
  * time. This is the OWB implementation of the DefinitionException.
@@ -69,4 +71,8 @@ public class WebBeansConfigurationExcept
         return msg.getAdditionalInformation(super.getLocalizedMessage());
     }
 
+    private Object writeReplace() throws ObjectStreamException
+    {
+        return new DefinitionException(getMessage(), getCause());
+    }
 }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansDeploymentException.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansDeploymentException.java?rev=1666739&r1=1666738&r2=1666739&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansDeploymentException.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/exception/WebBeansDeploymentException.java
Sat Mar 14 19:54:45 2015
@@ -22,6 +22,8 @@ import javax.enterprise.inject.spi.Deplo
 import org.apache.webbeans.exception.helper.DescriptiveException;
 import org.apache.webbeans.exception.helper.ExceptionMessageBuilder;
 
+import java.io.ObjectStreamException;
+
 /**
  * Exception that is thrown by the web beans container at the deployment time.
  * 
@@ -67,4 +69,8 @@ public class WebBeansDeploymentException
         return msg.getAdditionalInformation(super.getLocalizedMessage());
     }
 
+    private Object writeReplace() throws ObjectStreamException
+    {
+        return new DeploymentException(getMessage(), getCause());
+    }
 }



Mime
View raw message