-
Bug
-
Resolution: Done
-
Critical
-
1.3.6.GA
-
None
Oddly, the same does not happen if a java.util.LinkedHashMap (the subclass of LRUMap).
This can be reproduced via the following test:
@Test
public void test() throws Exception {
MarshallerFactory factory = Marshalling.getMarshallerFactory("river", MarshallerFactory.class.getClassLoader());
MarshallingConfiguration config = new MarshallingConfiguration();
Map<String, Object[]> map = new com.sun.faces.util.LRUMap<String, Object[]>(15);
map.put("a", new Object[]
);
ByteArrayOutputStream output = new ByteArrayOutputStream();
Marshaller marshaller = factory.createMarshaller(config);
marshaller.start(Marshalling.createByteOutput(output));
marshaller.writeObject(map);
marshaller.finish();
marshaller.close();
byte[] bytes = output.toByteArray();
Unmarshaller unmarshaller = factory.createUnmarshaller(config);
unmarshaller.start(Marshalling.createByteInput(new ByteArrayInputStream(bytes)));
Map<String, Object[]> result = (Map<String, Object[]>) unmarshaller.readObject();
unmarshaller.finish();
unmarshaller.close();
Assert.assertTrue(result.containsKey("a"));
Assert.assertTrue(Arrays.equals(map.get("a"), result.get("a")));
}
- blocks
-
AS7-2563 NPE accessing replicated HTTP session with JSF state
- Resolved