8026262: NPE in SystemFlavorMap.getAllNativesForType - regression in jdk8 b110 by fix of #JDK-8024987
authorpchelko
Fri, 11 Oct 2013 17:57:50 +0400
changeset 21251 bf72e65e6f91
parent 21250 12f343590d5a
child 21252 74ea5712880f
8026262: NPE in SystemFlavorMap.getAllNativesForType - regression in jdk8 b110 by fix of #JDK-8024987 Reviewed-by: art, serb
jdk/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java
--- 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<>();
                 }