changeset 55888:7b014520e960 records-and-sealed

Fix printing processor output of permits clause.
author darcy
date Thu, 18 Apr 2019 16:48:09 -0700
parents 6b61fc7de2a1
children d8ffec159b1f
files src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Thu Apr 18 12:02:01 2019 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java	Thu Apr 18 16:48:09 2019 -0700
@@ -610,10 +610,11 @@
         private void printPermittedSubtypes(TypeElement e) {
             List<? extends TypeMirror> subtypes = e.getPermittedSubtypes();
             if (!subtypes.isEmpty()) { // could remove this check with more complicated joining call
-                writer.print("permits ");
-                writer.print(Stream.of(subtypes).
-                             map(subtype -> subtype.toString()).
-                             collect(Collectors.joining(", ")));
+                writer.print(" permits ");
+                writer.print(subtypes
+                             .stream()
+                             .map(subtype -> subtype.toString())
+                             .collect(Collectors.joining(", ")));
             }
         }