8187624: NPE in Type.UndetVar.debugString()
authorvromero
Tue, 17 Oct 2017 07:11:05 -0700
changeset 47356 c30033467073
parent 47355 8cf060fad8a8
child 47357 74700c8e39e9
8187624: NPE in Type.UndetVar.debugString() Reviewed-by: mcimadamore
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue Oct 17 15:47:53 2017 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java	Tue Oct 17 07:11:05 2017 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1976,7 +1976,7 @@
             }
             for (InferenceBound bound: InferenceBound.values()) {
                 List<Type> aboundList = bounds.get(bound);
-                if (aboundList.size() > 0) {
+                if (aboundList != null && aboundList.size() > 0) {
                     result += bound + " = " + aboundList + '\n';
                 }
             }