[jboss-svn-commits] JBoss Portal SVN: r5527 - trunk/api/src/main/javax/portlet

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Oct 31 09:02:31 EST 2006


Author: julien at jboss.com
Date: 2006-10-31 09:02:28 -0500 (Tue, 31 Oct 2006)
New Revision: 5527

Modified:
   trunk/api/src/main/javax/portlet/PortletModeException.java
   trunk/api/src/main/javax/portlet/WindowStateException.java
Log:
make javax.portlet.WindowStateException really serializable

Modified: trunk/api/src/main/javax/portlet/PortletModeException.java
===================================================================
--- trunk/api/src/main/javax/portlet/PortletModeException.java	2006-10-31 14:00:18 UTC (rev 5526)
+++ trunk/api/src/main/javax/portlet/PortletModeException.java	2006-10-31 14:02:28 UTC (rev 5527)
@@ -97,7 +97,6 @@
       out.writeUTF(mode.toString());
    }
 
-
    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
    {
       String s = in.readUTF();

Modified: trunk/api/src/main/javax/portlet/WindowStateException.java
===================================================================
--- trunk/api/src/main/javax/portlet/WindowStateException.java	2006-10-31 14:00:18 UTC (rev 5526)
+++ trunk/api/src/main/javax/portlet/WindowStateException.java	2006-10-31 14:02:28 UTC (rev 5527)
@@ -22,6 +22,10 @@
  ******************************************************************************/
 package javax.portlet;
 
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.IOException;
+
 /**
  * The <CODE>WindowStateException</CODE> is thrown when a portlet tries to use a window state that is not supported by
  * the current runtime environment or the portlet.
@@ -35,7 +39,7 @@
    /** The serialVersionUID */
    private static final long serialVersionUID = -7034467327478096995L;
 
-   private WindowState state;
+   private transient WindowState state;
 
    /**
     * Constructs a new portlet state exception with the given text. The portlet container may use the text write it to a
@@ -87,4 +91,15 @@
    {
       return state;
    }
+
+   private void writeObject(ObjectOutputStream out) throws IOException
+   {
+      out.writeUTF(state.toString());
+   }
+
+   private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
+   {
+      String s = in.readUTF();
+      state = new WindowState(s);
+   }
 }




More information about the jboss-svn-commits mailing list