Fix doc links for relative path notes
Fixes: 188966706
Test: m docs
Change-Id: Id457919caf401a6fb2c15c67ba17464a2383bcdf
diff --git a/JavaLibrary.bp b/JavaLibrary.bp
index c0ea712..5689e39 100644
--- a/JavaLibrary.bp
+++ b/JavaLibrary.bp
@@ -90,8 +90,8 @@
// different layers of the build tooling. The arguments are wrapped in '' so
// that the shell doesn't add yet another level of escaping.
rewrite_openjdk_doc_links = "sed 's" +
- "!{@docRoot}/\\.\\./\\(\\(platform\\|technotes\\).\\+\\)\">" +
- "!https://docs.oracle.com/javase/8/docs/\\1\">!' " +
+ "!\\({@docRoot}/\\.\\.\\/\\|[./]\\+\\)\\(\\(platform\\|technotes\\).\\+\\)\">" +
+ "!https://docs.oracle.com/javase/8/docs/\\2\">!' " +
"$(in) > $(out)"
// OpenJDK source is not annotated with @hide so we need this separate