equal
deleted
inserted
replaced
80 // Demonstrates corruption |
80 // Demonstrates corruption |
81 System.out.println("Enum size: " + Thread.State.values().length); // 6 |
81 System.out.println("Enum size: " + Thread.State.values().length); // 6 |
82 System.out.println("Set size: " + es.size()); // 64 |
82 System.out.println("Set size: " + es.size()); // 64 |
83 System.out.println("Set: " + es); // Throws IndexOutOfBoundsException |
83 System.out.println("Set: " + es); // Throws IndexOutOfBoundsException |
84 throw new AssertionError("Expected exception InvalidObjectException not thrown"); |
84 throw new AssertionError("Expected exception InvalidObjectException not thrown"); |
85 } catch (java.io.InvalidObjectException _) { /* OK */ } |
85 } catch (java.io.InvalidObjectException expected) { /* OK */ } |
86 } |
86 } |
87 |
87 |
88 private static Object deserialize(byte[] sf) throws Throwable { |
88 private static Object deserialize(byte[] sf) throws Throwable { |
89 return new ObjectInputStream( |
89 return new ObjectInputStream( |
90 new ByteArrayInputStream(sf)) |
90 new ByteArrayInputStream(sf)) |