--- a/jdk/src/share/classes/java/net/InetAddress.java Tue Dec 01 08:55:15 2009 -0800
+++ b/jdk/src/share/classes/java/net/InetAddress.java Wed Dec 02 12:17:42 2009 +0000
@@ -35,6 +35,7 @@
import java.security.AccessController;
import java.io.ObjectStreamException;
import java.io.IOException;
+import java.io.ObjectInputStream;
import sun.security.action.*;
import sun.net.InetAddressCachePolicy;
import sun.net.util.IPAddressUtil;
@@ -1472,6 +1473,23 @@
return impl;
}
+
+ private void readObjectNoData (ObjectInputStream s) throws
+ IOException, ClassNotFoundException {
+ if (getClass().getClassLoader() != null) {
+ throw new SecurityException ("invalid address type");
+ }
+ }
+
+ private void readObject (ObjectInputStream s) throws
+ IOException, ClassNotFoundException {
+ s.defaultReadObject ();
+ if (getClass().getClassLoader() != null) {
+ hostName = null;
+ address = 0;
+ throw new SecurityException ("invalid address type");
+ }
+ }
}
/*