src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
changeset 51670 2dddc9394b49
parent 51047 860a3648c494
child 53040 6aeb6a23fb83
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Sep 07 11:24:59 2018 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java	Fri Sep 07 15:56:21 2018 +0100
@@ -5022,6 +5022,10 @@
             this.types = types;
         }
 
+        protected void reportIllegalSignature(Type t) {
+            throw new InvalidSignatureException(t);
+        }
+
         /**
          * Assemble signature of given type in string buffer.
          */
@@ -5056,7 +5060,7 @@
                     break;
                 case CLASS:
                     if (type.isCompound()) {
-                        throw new InvalidSignatureException(type);
+                        reportIllegalSignature(type);
                     }
                     append('L');
                     assembleClassSig(type);
@@ -5101,7 +5105,7 @@
                 }
                 case TYPEVAR:
                     if (((TypeVar)type).isCaptured()) {
-                        throw new InvalidSignatureException(type);
+                        reportIllegalSignature(type);
                     }
                     append('T');
                     append(type.tsym.name);