changeset 47466:c30033467073

8187624: NPE in Type.UndetVar.debugString() Reviewed-by: mcimadamore
author vromero
date Tue, 17 Oct 2017 07:11:05 -0700
parents 8cf060fad8a8
children 74700c8e39e9
files src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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';
                 }
             }