@Test public void testDeserializationOfUnknownType() throws Exception { InputStream is = getClass().getClassLoader().getResourceAsStream("AnObjectThatDoesNotExist.ser"); CougarObjectInput in = target.newCougarObjectInput(is, PROTOCOL_VERSION); Map deserialized = (Map) in.readObject(); in.close(); assertNotNull(deserialized); assertEquals(HashMap.class, deserialized.getClass()); assertEquals(1, deserialized.size()); assertEquals("bar", deserialized.get("field")); }
@Override public CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion) { return new HessianObjectInput(is, protocolSerializerFactories.get(protocolVersion)); }
HessianObjectIOFactory implements CougarObjectIOFactory { @Override public CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion) { return new HessianObjectInput(is, protocolSerializerFactories.get(protocolVersion)); } }
HessianObjectIOFactory implements CougarObjectIOFactory { @Override public CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion) { return new HessianObjectInput(is, protocolSerializerFactories.get(protocolVersion)); } HessianObjectIOFactory(boolean client); }
HessianObjectIOFactory implements CougarObjectIOFactory { @Override public CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion) { return new HessianObjectInput(is, protocolSerializerFactories.get(protocolVersion)); } HessianObjectIOFactory(boolean client); @Override CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion); @Override CougarObjectOutput newCougarObjectOutput(OutputStream os, byte protocolVersion); }
HessianObjectIOFactory implements CougarObjectIOFactory { @Override public CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion) { return new HessianObjectInput(is, protocolSerializerFactories.get(protocolVersion)); } HessianObjectIOFactory(boolean client); @Override CougarObjectInput newCougarObjectInput(InputStream is, byte protocolVersion); @Override CougarObjectOutput newCougarObjectOutput(OutputStream os, byte protocolVersion);  }