mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
unused symbol: should not apply to the public constructors of Externalizable classes (IDEA-120639 )
This commit is contained in:
+36
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user