changeset 227:95be573d84d4

8132780: Dev repo build failure Summary: Build was fixed Reviewed-by: alkonsta
author snazarki
date Fri, 31 Jul 2015 15:09:32 +0300
parents a00757ecbb33
children 803e5b366711
files src/se/classes/com/oracle/dio/registry/RegistryImpl.java src/share/classes/com/oracle/dio/impl/PeripheralDescriptorImpl.java
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/classes/com/oracle/dio/registry/RegistryImpl.java	Fri Jul 31 14:45:58 2015 +0300
+++ b/src/se/classes/com/oracle/dio/registry/RegistryImpl.java	Fri Jul 31 15:09:32 2015 +0300
@@ -78,9 +78,11 @@
     @Override
     public synchronized void register(DeviceDescriptor<? super T> descriptor)
                                       throws UnsupportedOperationException, IOException {
+        Class<? extends Device> intf = descriptor.getInterface();
+        int id = descriptor.getID();
         Properties registry = loadRegistry();
         RegistryContent content = readRegistryContent(registry);
-        String factory = DeviceRegistryFactory.registryFactoryName(descriptor.getInterface());
+        String factory = DeviceRegistryFactory.registryFactoryName(intf);
         if (factory == null) {
             throw new UnsupportedDeviceTypeException("Unsupported type: " + intf.getName());
         }
--- a/src/share/classes/com/oracle/dio/impl/PeripheralDescriptorImpl.java	Fri Jul 31 14:45:58 2015 +0300
+++ b/src/share/classes/com/oracle/dio/impl/PeripheralDescriptorImpl.java	Fri Jul 31 15:09:32 2015 +0300
@@ -32,7 +32,7 @@
 
 import com.oracle.dio.utils.Constants;
 import com.oracle.dio.utils.Logging;
-import com.oracle.jme.serializer.SerializeManager;
+ import com.oracle.dio.impl.Platform;
 
 import jdk.dio.Device;
 import jdk.dio.DeviceConfig;
@@ -116,15 +116,15 @@
     }
 
     public void prepareForSerilization() throws IOException {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
         if (! (config instanceof byte[]) ) {
             if (null != providerClazz) {
-                ByteArrayOutputStream baos = new ByteArrayOutputStream();
                 ((DeviceConfig)config).serialize(baos);
-                baos.close();
-                config = baos.toByteArray();
             } else {
-                SerializeManager.serialize(config);
+                Platform.serialize(config, baos);
             }
+            baos.close();
+            config = baos.toByteArray();
         }
     }