Examples of SerializableChecker


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

  {
    Logger logger = LogManager.getLogger(SerializableChecker.class);
    logger.setLevel(Level.WARN);
    Log4jEventHistory logHistory = new Log4jEventHistory();
    logger.addAppender(logHistory);
    SerializableChecker serializableChecker = new SerializableChecker(
      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

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

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

Examples of org.apache.wicket.util.io.SerializableChecker

      {
        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

Examples of org.apache.wicket.util.io.SerializableChecker

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

Examples of org.apache.wicket.util.io.SerializableChecker

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

Examples of org.apache.wicket.util.io.SerializableChecker

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

Examples of org.apache.wicket.util.io.SerializableChecker

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

Examples of org.apache.wicket.util.io.SerializableChecker

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

Examples of org.apache.wicket.util.io.SerializableChecker

      {
        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

Examples of org.apache.wicket.util.io.SerializableChecker

      {
        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
TOP
Copyright © 2018 www.massapi.com. 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.