diff options
author | Ian Rogers <irogers@google.com> | 2014-08-22 21:59:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-08-22 21:59:49 +0000 |
commit | ec494368f467ca5235a6a52ff6b03b97141fa17d (patch) | |
tree | 0b6478ad4fa8008158d565f270ef8ce4cf4a1365 /luni/src | |
parent | ec222f69bf2a0ec8115582b01c7a5fdb9c2ae39a (diff) | |
parent | 9332d00472681d8c17296a73a8957183c2572fec (diff) | |
download | libcore-ec494368f467ca5235a6a52ff6b03b97141fa17d.zip libcore-ec494368f467ca5235a6a52ff6b03b97141fa17d.tar.gz libcore-ec494368f467ca5235a6a52ff6b03b97141fa17d.tar.bz2 |
Merge "Avoid wrapping Class in WeakReference when class loader is null."
Diffstat (limited to 'luni/src')
-rw-r--r-- | luni/src/main/java/java/io/ObjectStreamField.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/luni/src/main/java/java/io/ObjectStreamField.java b/luni/src/main/java/java/io/ObjectStreamField.java index 78a6903..2a9b107 100644 --- a/luni/src/main/java/java/io/ObjectStreamField.java +++ b/luni/src/main/java/java/io/ObjectStreamField.java @@ -58,13 +58,7 @@ public class ObjectStreamField implements Comparable<Object> { * if {@code name} or {@code cl} is {@code null}. */ public ObjectStreamField(String name, Class<?> cl) { - if (name == null) { - throw new NullPointerException("name == null"); - } else if (cl == null) { - throw new NullPointerException("cl == null"); - } - this.name = name; - this.type = new WeakReference<Class<?>>(cl); + this(name, cl, false); } /** |