1.1 --- a/emul/src/main/java/java/lang/Enum.java Sat Sep 29 11:01:22 2012 +0200
1.2 +++ b/emul/src/main/java/java/lang/Enum.java Sun Sep 30 18:29:37 2012 -0700
1.3 @@ -27,9 +27,6 @@
1.4
1.5 import java.io.Serializable;
1.6 import java.io.IOException;
1.7 -import java.io.InvalidObjectException;
1.8 -import java.io.ObjectInputStream;
1.9 -import java.io.ObjectStreamException;
1.10
1.11 /**
1.12 * This is the common base class of all Java language enumeration types.
1.13 @@ -228,13 +225,14 @@
1.14 */
1.15 public static <T extends Enum<T>> T valueOf(Class<T> enumType,
1.16 String name) {
1.17 - T result = enumType.enumConstantDirectory().get(name);
1.18 - if (result != null)
1.19 - return result;
1.20 - if (name == null)
1.21 - throw new NullPointerException("Name is null");
1.22 - throw new IllegalArgumentException(
1.23 - "No enum constant " + enumType.getCanonicalName() + "." + name);
1.24 + throw new UnsupportedOperationException();
1.25 +// T result = enumType.enumConstantDirectory().get(name);
1.26 +// if (result != null)
1.27 +// return result;
1.28 +// if (name == null)
1.29 +// throw new NullPointerException("Name is null");
1.30 +// throw new IllegalArgumentException(
1.31 +// "No enum constant " + enumType.getCanonicalName() + "." + name);
1.32 }
1.33
1.34 /**
1.35 @@ -245,12 +243,12 @@
1.36 /**
1.37 * prevent default deserialization
1.38 */
1.39 - private void readObject(ObjectInputStream in) throws IOException,
1.40 - ClassNotFoundException {
1.41 - throw new InvalidObjectException("can't deserialize enum");
1.42 - }
1.43 -
1.44 - private void readObjectNoData() throws ObjectStreamException {
1.45 - throw new InvalidObjectException("can't deserialize enum");
1.46 - }
1.47 +// private void readObject(ObjectInputStream in) throws IOException,
1.48 +// ClassNotFoundException {
1.49 +// throw new InvalidObjectException("can't deserialize enum");
1.50 +// }
1.51 +//
1.52 +// private void readObjectNoData() throws ObjectStreamException {
1.53 +// throw new InvalidObjectException("can't deserialize enum");
1.54 +// }
1.55 }