private static void assertSerializability(StringBuilder builder, Object toPrint) { DebugObjectOutputStream doos = null; try { OutputStream base = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(base); doos = new DebugObjectOutputStream(oos); doos.writeObject(toPrint); } catch (IOException ioe) { List pathToBadObject = doos.getStack(); builder.append("Path to non-Serializable Object: \n"); for (Object cur : pathToBadObject) { builder.append(cur.toString()).append("\n"); } } }
private static void assertSerializability(StringBuilder builder, Object toPrint) { DebugObjectOutputStream doos = null; try { OutputStream base = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(base); doos = new DebugObjectOutputStream(oos); doos.writeObject(toPrint); } catch (IOException ioe) { List pathToBadObject = doos.getStack(); builder.append("Path to non-Serializable Object: \n"); for (Object cur : pathToBadObject) { builder.append(cur.toString()).append("\n"); } } }
private static void assertSerializability(StringBuilder builder, Object toPrint) { DebugObjectOutputStream doos = null; try { OutputStream base = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(base); doos = new DebugObjectOutputStream(oos); doos.writeObject(toPrint); } catch (IOException ioe) { List pathToBadObject = doos.getStack(); builder.append("Path to non-Serializable Object: \n"); for (Object cur : pathToBadObject) { builder.append(cur.toString()).append("\n"); } } }
private static void assertSerializability(StringBuilder builder, Object toPrint) { DebugObjectOutputStream doos = null; try { OutputStream base = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(base); doos = new DebugObjectOutputStream(oos); doos.writeObject(toPrint); } catch (IOException ioe) { List pathToBadObject = doos.getStack(); builder.append("Path to non-Serializable Object: \n"); for (Object cur : pathToBadObject) { builder.append(cur.toString()).append("\n"); } } }
ByteArrayOutputStream discard = new ByteArrayOutputStream(); DebugObjectOutputStream out = new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[0]); new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[1]);
ByteArrayOutputStream discard = new ByteArrayOutputStream(); DebugObjectOutputStream out = new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[0]); new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[1]);
ByteArrayOutputStream discard = new ByteArrayOutputStream(); DebugObjectOutputStream out = new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[0]); new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[1]);
ByteArrayOutputStream discard = new ByteArrayOutputStream(); DebugObjectOutputStream out = new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[0]); new DebugObjectOutputStream(discard); try { out.writeObject(stateToWrite[1]);