Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com Patches, unit tests, benchmarks, whitepaper, and outreach briefs. Public domain — no copyright claimed. Use freely.
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
/*
|
|
* @test /nodynamiccopyright/
|
|
* @bug 8202056
|
|
* @compile/ref=SerialMethodArity.out -XDrawDiagnostics -Xlint:serial SerialMethodArity.java
|
|
*/
|
|
|
|
import java.io.*;
|
|
|
|
class SerialMethodMods implements Serializable {
|
|
private static final long serialVersionUID = 42;
|
|
|
|
private static class CustomObjectOutputStream extends ObjectOutputStream {
|
|
public CustomObjectOutputStream() throws IOException,
|
|
SecurityException {}
|
|
}
|
|
|
|
// Should have a single parameter of exact type ObjectOutputStream
|
|
private void writeObject(CustomObjectOutputStream stream) throws IOException {
|
|
stream.defaultWriteObject();
|
|
}
|
|
|
|
// Should have a single parameter of exact type ObjectInputStream
|
|
private void readObject(ObjectInputStream stream, int retries)
|
|
throws IOException, ClassNotFoundException {
|
|
stream.defaultReadObject();
|
|
}
|
|
|
|
// Should have no arguments
|
|
private void readObjectNoData(int retries) throws ObjectStreamException {}
|
|
|
|
// Should have no arguments
|
|
public Object writeReplace(int arg0, int arg1) throws ObjectStreamException {
|
|
return null;
|
|
}
|
|
|
|
// Should have no arguments
|
|
public Object readResolve(double foo, float bar) throws ObjectStreamException {
|
|
return null;
|
|
}
|
|
}
|