changeset 21251:bf72e65e6f91

8026262: NPE in SystemFlavorMap.getAllNativesForType - regression in jdk8 b110 by fix of #JDK-8024987 Reviewed-by: art, serb
author pchelko
date Fri, 11 Oct 2013 17:57:50 +0400
parents 12f343590d5a
children 74ea5712880f
files jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Fri Oct 11 16:44:42 2013 +0400
+++ b/jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java	Fri Oct 11 17:57:50 2013 +0400
@@ -1324,7 +1324,7 @@
         List<String> retval = null;
         for (DataFlavor dataFlavor : convertMimeTypeToDataFlavors(type)) {
             List<String> natives = getFlavorToNative().get(dataFlavor);
-            if (!natives.isEmpty()) {
+            if (natives != null && !natives.isEmpty()) {
                 if (retval == null) {
                     retval = new ArrayList<>();
                 }