changeset 219:4d7a1b32cc39

8133664: jdk\dio\spi\positive\SPIOpenTests#testCustomDeviceProviderOpen1Child failure Summary: isAssignableFrom() -> equals() Reviewed-by: alkonsta
author snazarki
date Fri, 14 Aug 2015 18:35:55 +0300
parents 2c4078b58289
children f4b2abb4ddd3
files src/share/classes/jdk/dio/DeviceManager.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/DeviceManager.java	Fri Aug 14 16:05:22 2015 +0300
+++ b/src/share/classes/jdk/dio/DeviceManager.java	Fri Aug 14 18:35:55 2015 +0300
@@ -766,6 +766,7 @@
                 if (null == res) {
                     throw e;
                 }
+                return res;
             }
         }
 
@@ -1089,7 +1090,7 @@
                 DeviceProvider provider = iter.next();
                 try {
                     if (provider.getConfigType().isAssignableFrom(config.getClass()) &&
-                        (null == type || provider.getType().isAssignableFrom(type))) {
+                        (null == type || provider.getType().equals(type))) {
                         found = true;
                         if (provider.matches(descr.getProperties())) {
                             // properties was checked by Registry when descriptor was loaded up
@@ -1136,7 +1137,7 @@
             while (iter.hasNext()) {
                 DeviceProvider provider = iter.next();
                 try {
-                    if (provider.getType().isAssignableFrom(intf)) {
+                    if (provider.getType().equals(intf)) {
                         return;
                     }
                 } catch (Throwable e) {