Class SerializableWithThreadFieldBean

java.lang.Object
com.codebox.bean.SerializableWithThreadFieldBean
All Implemented Interfaces:
Serializable

public class SerializableWithThreadFieldBean extends Object implements Serializable
The Class SerializableWithThreadFieldBean.

A Serializable bean that holds a non-serializable Thread field initialised in the constructor. Serializing an instance always throws NotSerializableException (a subtype of IOException), which exercises the IOException catch block in JavaBeanTesterWorker.canSerialize().

See Also:
  • Constructor Details

    • SerializableWithThreadFieldBean

      public SerializableWithThreadFieldBean()
  • Method Details

    • getThread

      public Thread getThread()
      Gets the thread.
      Returns:
      the thread
    • setThread

      public void setThread(Thread thread)
      Sets the thread.
      Parameters:
      thread - the thread