summaryrefslogtreecommitdiffstats
path: root/luni/src
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2014-08-22 22:28:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-22 22:28:48 +0000
commit3b08bc4980125367384de5b59db985d08fdc2019 (patch)
tree5747121537bc6a9c56878c4d1038958b1f8679b4 /luni/src
parent4def3d85a21517ab64a852d9c323e94e49ab1328 (diff)
parentec494368f467ca5235a6a52ff6b03b97141fa17d (diff)
downloadlibcore-3b08bc4980125367384de5b59db985d08fdc2019.zip
libcore-3b08bc4980125367384de5b59db985d08fdc2019.tar.gz
libcore-3b08bc4980125367384de5b59db985d08fdc2019.tar.bz2
am ec494368: Merge "Avoid wrapping Class in WeakReference when class loader is null."
* commit 'ec494368f467ca5235a6a52ff6b03b97141fa17d': 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);
}
/**