summaryrefslogtreecommitdiff
path: root/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java')
-rw-r--r--java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java
new file mode 100644
index 000000000000..3f81f49cac57
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting7/Externalizable.java
@@ -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;
+ }
+} \ No newline at end of file