mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8241969: Type annotation is not shown for wildcard type in Javadoc
Reviewed-by: jjg
This commit is contained in:
parent
ffbee17d8a
commit
983e012c9f
2 changed files with 32 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -109,6 +109,7 @@ public abstract class LinkFactory {
|
||||||
@Override
|
@Override
|
||||||
public Content visitWildcard(WildcardType type, LinkInfo linkInfo) {
|
public Content visitWildcard(WildcardType type, LinkInfo linkInfo) {
|
||||||
linkInfo.isTypeBound = true;
|
linkInfo.isTypeBound = true;
|
||||||
|
link.add(getTypeAnnotationLinks(linkInfo));
|
||||||
link.add("?");
|
link.add("?");
|
||||||
TypeMirror extendsBound = type.getExtendsBound();
|
TypeMirror extendsBound = type.getExtendsBound();
|
||||||
if (extendsBound != null) {
|
if (extendsBound != null) {
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984 8162363 8175200 8186332 8182765
|
* @bug 8005091 8009686 8025633 8026567 6469562 8071982 8071984 8162363 8175200 8186332 8182765
|
||||||
* 8187288
|
* 8187288 8241969
|
||||||
* @summary Make sure that type annotations are displayed correctly
|
* @summary Make sure that type annotations are displayed correctly
|
||||||
* @library ../../lib
|
* @library ../../lib
|
||||||
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
* @modules jdk.javadoc/jdk.javadoc.internal.tool
|
||||||
|
@ -335,6 +335,35 @@ public class TestTypeAnnotations extends JavadocTester {
|
||||||
tation in typeannos">@WldB</a>("m") java.lang.String></span> <span class\
|
tation in typeannos">@WldB</a>("m") java.lang.String></span> <span class\
|
||||||
="member-name">returnWcExtends</span>()</div>""");
|
="member-name">returnWcExtends</span>()</div>""");
|
||||||
|
|
||||||
|
checkOutput("typeannos/SelfTest.html", true,
|
||||||
|
"""
|
||||||
|
<div class="member-signature"><span class="return-type"><a href="MyList.html" ti\
|
||||||
|
tle="class in typeannos">MyList</a><<a href="WldA.html" title="annotation in \
|
||||||
|
typeannos">@WldA</a> ?></span> <span class="member-name">returnWcExtends\
|
||||||
|
</span>()</div>""",
|
||||||
|
"""
|
||||||
|
<div class="member-signature"><span class="return-type"><a href="MyList.html" ti\
|
||||||
|
tle="class in typeannos">MyList</a><<a href="WldA.html" title="annotation in \
|
||||||
|
typeannos">@WldA</a> ? extends <a href="WldA.html" title="annotation in typeanno\
|
||||||
|
s">@WldA</a> <a href="MyList.html" title="class in typeannos">MyList</a><<a h\
|
||||||
|
ref="WldB.html" title="annotation in typeannos">@WldB</a>("m") ?>></span>&\
|
||||||
|
nbsp;<span class="member-name">complex</span>()</div>""");
|
||||||
|
|
||||||
|
checkOutput("typeannos/SelfWithValue.html", true,
|
||||||
|
"""
|
||||||
|
<div class="member-signature"><span class="return-type"><a href="MyList.html" ti\
|
||||||
|
tle="class in typeannos">MyList</a><<a href="WldB.html" title="annotation in \
|
||||||
|
typeannos">@WldB</a>("m") ?></span> <span class="member-name">returnWcEx\
|
||||||
|
tends</span>()</div>""",
|
||||||
|
"""
|
||||||
|
<div class="member-signature"><span class="return-type"><a href="MyList.html" ti\
|
||||||
|
tle="class in typeannos">MyList</a><<a href="WldB.html" title="annotation in \
|
||||||
|
typeannos">@WldB</a>("m") ? extends <a href="MyList.html" title="class in typean\
|
||||||
|
nos">MyList</a><<a href="WldB.html" title="annotation in typeannos">@WldB</a>\
|
||||||
|
("m") ? super java.lang.String>></span> <span class="member-name">com\
|
||||||
|
plex</span>()</div>""");
|
||||||
|
|
||||||
|
|
||||||
// Test for receiver annotations (Receivers.java).
|
// Test for receiver annotations (Receivers.java).
|
||||||
checkOutput("typeannos/DefaultUnmodified.html", true,
|
checkOutput("typeannos/DefaultUnmodified.html", true,
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue