Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ protected void appendAnnotationsString(StringBuilder sb,
if (prefix) {
sb.append(" ");
}
sb.append(getAnnotationMirrors());
sb.append(getAnnotationMirrors().toString(" "));
sb.append(" ");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/*
* @test
* @bug 8284220
* @bug 8284220 8342934
* @summary Tests DeclaredType.toString with type annotations present, for example that '@A
* Map.Entry' is printed as 'java.util.@A Map.Entry' (and not '@A java.util.Map.Entry' or
* 'java.util.@A Entry').
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
@Target(ElementType.TYPE_USE)
@interface A {}

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE_USE)
@interface B {}

public class Test {
static class StaticNested {
static class InnerMostStaticNested {}
Expand All @@ -41,8 +45,8 @@ class Inner {
class InnerMost {}
}

@ExpectedToString("p.Test.@p.A StaticNested")
@A StaticNested i;
@ExpectedToString("p.Test.@p.A @p.B StaticNested")
@A @B StaticNested i;

@ExpectedToString("p.Test.StaticNested.@p.A InnerMostStaticNested")
StaticNested.@A InnerMostStaticNested j;
Expand Down