summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-08-22 21:59:49 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-08-22 21:59:49 +0000
commitec494368f467ca5235a6a52ff6b03b97141fa17d (patch)
tree0b6478ad4fa8008158d565f270ef8ce4cf4a1365 /luni/src
parentec222f69bf2a0ec8115582b01c7a5fdb9c2ae39a (diff)
parent9332d00472681d8c17296a73a8957183c2572fec (diff)
downloadlibcore-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.java8
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);
}
/**