changeset 14074:7ad88bd23c4e

Fix: Model3Converter does not handle erased inner classes properly
author mcimadamore
date Thu, 30 Jun 2016 12:05:03 +0100
parents c92f241d60b6
children 6ac303e36f22
files src/java.base/share/classes/valhalla/model3/Model3Converter.java
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/valhalla/model3/Model3Converter.java	Tue Jun 28 11:05:10 2016 +0200
+++ b/src/java.base/share/classes/valhalla/model3/Model3Converter.java	Thu Jun 30 12:05:03 2016 +0100
@@ -148,8 +148,12 @@
         }
 
         public String encode() {
+            return encode(allErasedRecursive());
+        }
+
+        private String encode(boolean allErased) {
             String canonicalName;
-            if (allErasedRecursive()) {
+            if (allErased) {
                 return className.replace('.', '/');
             }
             if (enclosing != null) {
@@ -164,7 +168,7 @@
             String local = allErased()
                            ? canonicalName
                            : Stream.of(params).map(ParameterizedType::normalize).collect(joining("", canonicalName + "$${", "}"));
-            return (enclosing != null) ? enclosing.encode() + "$$$" + local : local;
+            return (enclosing != null) ? enclosing.encode(allErased) + "$$$" + local : local;
         }
 
         private static String normalize(String s) {