Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4389772

SimpleTimeZone not serializable by IIOPInputStream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.2.0, 1.2.1
    • other-libs
    • generic, x86
    • generic, windows_nt, windows_2000



      Name: boT120536 Date: 11/15/2000


      Classic VM (build JDK-1.2.2_006, native threads, nojit)

      I defined a CMP entity bean (of type 'TrainingBean') with an attribute (of
      type 'Schedule') that collects two GregorianCalendar instances.

      import java.util.*;

      public class Timespan implements java.io.Serializable
      {
          private Calendar m_cFrom;
          private Calendar m_cTo;
          
          public Timespan(Calendar cFrom, Calendar cTo)
          {
              m_cFrom = (Calendar)cFrom.clone();
              m_cTo = (Calendar)cTo.clone();
          }

          public Timespan()
          {
              m_cFrom = Calendar.getInstance();
              m_cTo = Calendar.getInstance();
          }

          public Calendar getFrom()
          {
              return m_cFrom;
          }
          
          public Calendar getTo()
          {
              return m_cTo;
          }
      }

      When I try to create an instance of the EJB 'TrainingBean' an IOException is
      thrown in the IIOPInputStream's readFully() method ("Method readFully not
      supported"). So this one is left unimplemented...

      ...but too bad, the readObject() method of class SimpleTimeZone (an attribute
      of the Calendar class) calls readFully().

      So there either a bug in the IIOPInputStream's readFully method or in
      SimpleTimeZone's readObject.
      (Review ID: 108066)
      ======================================================================

            eandersosunw Everett Anderson (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: