Workaround for breaking change in OpenJDK 8 javadoc

This should only affect behavior when using the OpenJDK 8 version
of javadoc.

ConstructorDoc.name() is supposed to return the unqualified name for a constructor.
It is left ambiguous as to what this means for constructors of inner classes. e.g.

package foo;

class Bar {
  static class Baz {
    public Baz() {}
  }
}

For OpenJDK 7, the method returns "Bar.Baz" as the name of the constructor. i.e. it is
qualified with the name of the outer class, but not the package
For OpenJDK 8, the method returns "Baz" as the name of the constructor. i.e. it is not
qualified at all

In Android this affects both what doclava is willing to accept in
@link tags, but also the content of the API files like current.txt. This change
retains the old behavior under both OpenJDK 7 and OpenJDK 8. If later Android wants to
adopt the new semantics that can be done once OpenJDK 7 is no longer supported.

Bug: 18051133
Change-Id: Ic753a8d308e5d773cca13bd44ba3463481881779
1 file changed