diff options
author | Julian Odell <juliano@google.com> | 2016-09-28 13:55:45 -0700 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2016-09-29 11:54:19 +0000 |
commit | 35e0d1defab101925cdbe1490050989f2b813ac1 (patch) | |
tree | b8ef734014c9ad29eddae36edfb9857fc2e540d7 | |
parent | eaec48c8641843b8b75370ef6f41b32c5bc8bfbf (diff) | |
download | platform_external_doclava-35e0d1defab101925cdbe1490050989f2b813ac1.tar.gz platform_external_doclava-35e0d1defab101925cdbe1490050989f2b813ac1.tar.bz2 platform_external_doclava-35e0d1defab101925cdbe1490050989f2b813ac1.zip |
Fix collisions due to ignoring outer class names.
Second attempt - this time strip the type parameters from
the class name but keep the qualified token name (which
will include both Outer and Inner class names so
OuterClass1.InnerClass<V> will become OuterClass1.InnerClass
rather than just InnerClass).
See b/31775016.
Change-Id: Ib2465cc33006e086ab66a6e8e307e98ff1dc37e5
(cherry picked from commit cbc19f92af1b7cef2c2b2d1d3c2cdd12ce27b290)
-rw-r--r-- | src/com/google/doclava/apicheck/ApiFile.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/google/doclava/apicheck/ApiFile.java b/src/com/google/doclava/apicheck/ApiFile.java index d865e20..14a8ab3 100644 --- a/src/com/google/doclava/apicheck/ApiFile.java +++ b/src/com/google/doclava/apicheck/ApiFile.java @@ -166,11 +166,13 @@ class ApiFile { name = token; qname = qualifiedName(pkg.name(), name, null); final TypeInfo typeInfo = Converter.obtainTypeFromString(qname); + // Simple type info excludes the package name (but includes enclosing class names) + final TypeInfo simpleTypeInfo = Converter.obtainTypeFromString(name); token = tokenizer.requireToken(); - cl = new ClassInfo(null/*classDoc*/, ""/*rawCommentText*/, tokenizer.pos(), pub, prot, - pkgpriv, false/*isPrivate*/, stat, iface, abs, true/*isOrdinaryClass*/, + cl = new ClassInfo(null/*classDoc*/, ""/*rawCommentText*/, tokenizer.pos(), pub, prot, + pkgpriv, false/*isPrivate*/, stat, iface, abs, true/*isOrdinaryClass*/, false/*isException*/, false/*isError*/, false/*isEnum*/, false/*isAnnotation*/, - fin, false/*isIncluded*/, typeInfo.simpleTypeName(), typeInfo.qualifiedTypeName(), + fin, false/*isIncluded*/, simpleTypeInfo.qualifiedTypeName(), typeInfo.qualifiedTypeName(), null/*qualifiedTypeName*/, false/*isPrimitive*/); cl.setTypeInfo(typeInfo); cl.setDeprecated(dep); @@ -755,4 +757,3 @@ class ApiFile { return true; } } - |