Normalize image paths pulled from img with itemprop=image b/31772103
am: ee1c8fa0ae

Change-Id: I33bfc6dee65cfe0a40299c9c2f8961100886aed4
diff --git a/build.gradle b/build.gradle
index 0fdc5d1..de34436 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,6 @@
 apply plugin: 'java'
 
-import com.android.internal.BuildUtils
+import javax.tools.ToolProvider
 
 sourceSets {
     main {
@@ -13,17 +13,9 @@
     }
 }
 
-// TODO put this function in a plugin
-// TODO remove when prebuilt's case will always properly work with BuildUtils's version.
-String findToolsJar() {
-    new ByteArrayOutputStream().withStream { os ->
-        project.exec {
-            executable "../../build/core/find-jdk-tools-jar.sh"
-
-            standardOutput = os
-        }
-        return os.toString().trim()
-    }
+dependencies {
+    // tools.jar required for com.sun.javadoc
+    compile files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs())
 }
 
 if (project.hasProperty("usePrebuilts") && project.usePrebuilts == "true") {
@@ -31,20 +23,15 @@
         maven { url '../../prebuilts/tools/common/m2/repository' }
     }
 
-    // TODO refactor to allow referencing the "gradle way"
     dependencies {
-        compile files(findToolsJar())
-        compile files('../../prebuilts/misc/common/antlr/antlr-3.4-complete.jar')
+        compile 'org.antlr:antlr:3.5.2'
         compile 'com.google.jsilver:jsilver:1.0.0'
-        // TODO add tagsoup to prebuils to fully support building using prebuilts
-        compile project(':tagsoup')
+        compile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
         // required by jsilver
         compile 'com.google.guava:guava:15.0'
-        //compile project(path: ':junit', configuration: 'target')
     }
 } else {
     dependencies {
-        compile files(BuildUtils.findToolsJar(project))
         compile project(path: ':antlr', configuration: 'antlrRuntime')
         compile project(':jsilver')
         compile project(':tagsoup')
diff --git a/src/com/google/doclava/MethodInfo.java b/src/com/google/doclava/MethodInfo.java
index 5d6188a..299043d 100644
--- a/src/com/google/doclava/MethodInfo.java
+++ b/src/com/google/doclava/MethodInfo.java
@@ -793,7 +793,8 @@
   public boolean isConsistent(MethodInfo mInfo) {
     boolean consistent = true;
     if (this.mReturnType != mInfo.mReturnType && !this.mReturnType.equals(mInfo.mReturnType)) {
-      if (!mReturnType.isPrimitive() && !mInfo.mReturnType.isPrimitive()) {
+      if (!mReturnType.isPrimitive() && !mInfo.mReturnType.isPrimitive()
+          && Objects.equals(mInfo.mReturnType.dimension(),  mReturnType.dimension())) {
         // Check to see if our class extends the old class.
         ApiInfo infoApi = mInfo.containingClass().containingPackage().containingApi();
         ClassInfo infoReturnClass = infoApi.findClass(mInfo.mReturnType.qualifiedTypeName());