unused symbol: should not apply to the public constructors of Externalizable classes (IDEA-120639 )

This commit is contained in:
Anna Kozlova
2014-03-19 11:02:31 +01:00
parent 46711896e7
commit 8d0a07976b
3 changed files with 52 additions and 2 deletions
@@ -0,0 +1,36 @@
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
class SerializationProxy implements Externalizable
{
private static final long serialVersionUID = 1L;
private Object object;
public SerializationProxy()
{
// Empty constructor for Externalizable class
}
private <warning descr="Private constructor 'SerializationProxy(java.lang.Object)' is never used">SerializationProxy</warning>(Object object)
{
this.object = object;
}
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(this.object);
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
this.object = in.readObject();
}
protected Object readResolve()
{
return this.object;
}
}