changeset 59:a5e2cee209be

8065371: Correct private variable array type at GPIOPortConfig Summary: Make it possible to assign alternative implementation of GPIOPin interface Reviewed-by: snazarki Contributed-by: alexey.mironov@oracle.com
author snazarki
date Wed, 03 Dec 2014 22:10:07 +0400
parents 4ab1a1b60e6c
children 5d629ccf074a
files src/se/native/com/oracle/dio/gpio/impl/jni_gpio.cpp src/share/classes/jdk/dio/gpio/GPIOPortConfig.java
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/gpio/impl/jni_gpio.cpp	Wed Dec 03 22:01:09 2014 +0400
+++ b/src/se/native/com/oracle/dio/gpio/impl/jni_gpio.cpp	Wed Dec 03 22:10:07 2014 +0400
@@ -365,7 +365,7 @@
 JNIEXPORT void JNICALL Java_com_oracle_dio_gpio_impl_GPIOPortImpl_assignPins0
   (JNIEnv* env, jobject obj, jobject cfg, jobjectArray pins) {
     jclass cfgClass = env->GetObjectClass(cfg);
-    jfieldID pinsField = cfgClass ? env->GetFieldID(cfgClass, "pins", "[Lcom/oracle/dio/gpio/impl/GPIOPinFake;") :
+    jfieldID pinsField = cfgClass ? env->GetFieldID(cfgClass, "pins", "[Ljdk/dio/gpio/GPIOPin;") :
                                     NULL;
     if (pinsField) {
         env->SetObjectField(cfg, pinsField, pins);
--- a/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Wed Dec 03 22:01:09 2014 +0400
+++ b/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Wed Dec 03 22:10:07 2014 +0400
@@ -28,7 +28,6 @@
 import jdk.dio.DeviceConfig;
 import jdk.dio.InvalidDeviceConfigException;
 import com.oracle.dio.utils.ExceptionMessage;
-import com.oracle.dio.gpio.impl.GPIOPinFake;
 import serializator.*;
 import romizer.DontRenameMethod;
 
@@ -78,7 +77,7 @@
     private int direction;
     private int initValue;
     private GPIOPinConfig[] pinConfigs;
-    private GPIOPinFake[] pins;
+    private GPIOPin[] pins;
 
     // hidden constructor for serializer
     @DontRenameMethod