Package org.apache.wicket.core.util.io

Examples of org.apache.wicket.core.util.io.SerializableChecker$WicketNotSerializableException


        if (CheckingObjectOutputStream.isAvailable())
        {
          try
          {
            // trigger serialization again, but this time gather some more info
            new SerializableChecker(outputStream, nsx).writeObject(obj);
          } catch (Exception x)
          {
            if (x instanceof CheckingObjectOutputStream.ObjectCheckException)
            {
              throw (CheckingObjectOutputStream.ObjectCheckException) x;
View Full Code Here


   * @throws IOException
   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }
View Full Code Here

   * @throws IOException
   */
  @Test
  public void nonSerializableTypeDetection() throws IOException
  {
    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    String exceptionMessage = null;
    try
    {
      serializableChecker.writeObject(new TestType2());
    }
    catch (CheckingObjectOutputStream.ObjectCheckException e)
    {
      exceptionMessage = e.getMessage();
    }
View Full Code Here

      {
        if (CheckingObjectOutputStream.isAvailable())
        {
          // trigger serialization again, but this time gather
          // some more info
          new SerializableChecker(outputStream, nsx).writeObject(obj);
          // if we get here, we didn't fail, while we
          // should;
          throw nsx;
        }
        throw nsx;
View Full Code Here

      {
        if (CheckingObjectOutputStream.isAvailable())
        {
          // trigger serialization again, but this time gather
          // some more info
          new SerializableChecker(outputStream, nsx).writeObject(obj);
          // if we get here, we didn't fail, while we
          // should;
          throw nsx;
        }
        throw nsx;
View Full Code Here

   * @throws IOException
   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new ByteArrayOutputStream(), new NotSerializableException());
    checker.writeObject(new ValueMap());
  }
View Full Code Here

  {
    Logger logger = LogManager.getLogger(CheckingObjectOutputStream.class);
    logger.setLevel(Level.WARN);
    Log4jEventHistory logHistory = new Log4jEventHistory();
    logger.addAppender(logHistory);
    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    try
    {
      serializableChecker.writeObject(new TestType1());
      String expectedMessage = "Wasn't possible to check the object 'class org.apache.wicket.util.io.SerializableCheckerTest$ProblematicType' possible due an problematic implementation of equals method";
      assertTrue(logHistory.contains(Level.WARN, expectedMessage));
    }
    catch (TestException notMeaningfulException)
    {
View Full Code Here

   * @throws IOException
   */
  @Test
  public void nonSerializableTypeDetection() throws IOException
  {
    SerializableChecker serializableChecker = new SerializableChecker(new ByteArrayOutputStream(),
        new NotSerializableException());
    String exceptionMessage = null;
    try
    {
      serializableChecker.writeObject(new TestType2());
    }
    catch (CheckingObjectOutputStream.ObjectCheckException e)
    {
      exceptionMessage = e.getMessage();
    }
View Full Code Here

      {
        if (SerializableChecker.isAvailable())
        {
          // trigger serialization again, but this time gather
          // some more info
          new SerializableChecker(nsx).writeObject(obj);
          // if we get here, we didn't fail, while we
          // should;
          throw nsx;
        }
        throw nsx;
View Full Code Here

   * @throws IOException
   */
  @Test
  public void valueMap() throws IOException
  {
    SerializableChecker checker = new SerializableChecker(new NotSerializableException());
    checker.writeObject(new ValueMap());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.core.util.io.SerializableChecker$WicketNotSerializableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.