diff options
author | Elliott Hughes <enh@google.com> | 2010-03-11 13:39:05 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-03-11 15:13:32 -0800 |
commit | 77dd26ad0da51486d5dcfbc4da346f2acaa1c8fa (patch) | |
tree | 833bee3671f0c2147397fdacffae503dd0692a97 /luni-kernel | |
parent | acde9699a7a7395b42345d74629b92d50209b90f (diff) | |
download | libcore-77dd26ad0da51486d5dcfbc4da346f2acaa1c8fa.zip libcore-77dd26ad0da51486d5dcfbc4da346f2acaa1c8fa.tar.gz libcore-77dd26ad0da51486d5dcfbc4da346f2acaa1c8fa.tar.bz2 |
Plug a resource leak with "finally" and make Object.getClass' return type match Java 6.
Change-Id: Ia8ae90634bfb3680c8e82e4e4cf7f7459263c3d3
Diffstat (limited to 'luni-kernel')
-rw-r--r-- | luni-kernel/src/main/java/java/lang/Class.java | 2 | ||||
-rw-r--r-- | luni-kernel/src/main/java/java/lang/Object.java | 7 |
2 files changed, 3 insertions, 6 deletions
diff --git a/luni-kernel/src/main/java/java/lang/Class.java b/luni-kernel/src/main/java/java/lang/Class.java index e999c92..35e47bc 100644 --- a/luni-kernel/src/main/java/java/lang/Class.java +++ b/luni-kernel/src/main/java/java/lang/Class.java @@ -117,8 +117,6 @@ import static java.lang.ClassCache.findFieldByName; * <li>{@code [Ljava/lang/String;} representing the {@code String[]} type</li> * <li>{@code [[[C} representing the {@code char[][][]} type (three dimensions!)</li> * </ul> - * - * @since Android 1.0 */ public final class Class<T> implements Serializable, AnnotatedElement, GenericDeclaration, Type { diff --git a/luni-kernel/src/main/java/java/lang/Object.java b/luni-kernel/src/main/java/java/lang/Object.java index 4fef609..d9613f8 100644 --- a/luni-kernel/src/main/java/java/lang/Object.java +++ b/luni-kernel/src/main/java/java/lang/Object.java @@ -148,10 +148,10 @@ public class Object { } /** - * Returns the unique instance of {@link Class} which represents this + * Returns the unique instance of {@link Class} that represents this * object's class. Note that {@code getClass()} is a special case in that it * actually returns {@code Class<? extends Foo>} where {@code Foo} is the - * erasure of the type of expression {@code getClass()} was called upon. + * erasure of the type of the expression {@code getClass()} was called upon. * <p> * As an example, the following code actually compiles, although one might * think it shouldn't: @@ -162,9 +162,8 @@ public class Object { * </pre> * * @return this object's {@code Class} instance. - * @since Android 1.0 */ - public final native Class<? extends Object> getClass(); + public final native Class<?> getClass(); /** * Returns an integer hash code for this object. By contract, any two |