summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/ahat/Android.mk4
-rw-r--r--tools/ahat/src/AhatSnapshot.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/tools/ahat/Android.mk b/tools/ahat/Android.mk
index 834426d3f6..60e0cd8ec8 100644
--- a/tools/ahat/Android.mk
+++ b/tools/ahat/Android.mk
@@ -30,6 +30,10 @@ LOCAL_STATIC_JAVA_LIBRARIES := perflib-prebuilt guavalib trove-prebuilt
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := ahat
+
+# Let users with Java 7 run ahat (b/28303627)
+LOCAL_JAVA_LANGUAGE_VERSION := 1.7
+
include $(BUILD_HOST_JAVA_LIBRARY)
# --- ahat script ----------------
diff --git a/tools/ahat/src/AhatSnapshot.java b/tools/ahat/src/AhatSnapshot.java
index e6f8411c90..a8205c7f1a 100644
--- a/tools/ahat/src/AhatSnapshot.java
+++ b/tools/ahat/src/AhatSnapshot.java
@@ -86,7 +86,7 @@ class AhatSnapshot {
mSnapshot = snapshot;
mHeaps = new ArrayList<Heap>(mSnapshot.getHeaps());
- ClassObj javaLangClass = mSnapshot.findClass("java.lang.Class");
+ final ClassObj javaLangClass = mSnapshot.findClass("java.lang.Class");
for (Heap heap : mHeaps) {
// Use a single element array for the total to act as a reference to a
// long.