changeset 245:1eeb2952871d

8134069: api/jdk/dio/gpio/ fail with NullPointerException Summary: Initialize action in constructor Reviewed-by: snazarki Contributed-by: olga.milovskaya@oracle.com
author snazarki
date Thu, 20 Aug 2015 19:08:03 +0300
parents a2d5f52d6175
children 419a9dee7d0f
files src/share/classes/jdk/dio/atcmd/ATPermission.java src/share/classes/jdk/dio/counter/CounterPermission.java src/share/classes/jdk/dio/gpio/GPIOPinPermission.java src/share/classes/jdk/dio/gpio/GPIOPortPermission.java
diffstat 4 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/atcmd/ATPermission.java	Wed Aug 19 18:42:19 2015 +0300
+++ b/src/share/classes/jdk/dio/atcmd/ATPermission.java	Thu Aug 20 19:08:03 2015 +0300
@@ -94,6 +94,7 @@
      */
     public ATPermission(String name) {
         super(name);
+        myActions = OPEN;
         Utils.checkDevicePermissionChannelFormat(name, Utils.DECIMAL_DIGITS);
     }
 
--- a/src/share/classes/jdk/dio/counter/CounterPermission.java	Wed Aug 19 18:42:19 2015 +0300
+++ b/src/share/classes/jdk/dio/counter/CounterPermission.java	Thu Aug 20 19:08:03 2015 +0300
@@ -74,6 +74,7 @@
      */
     public CounterPermission(String name) {
         super(name);
+        myActions = OPEN;
         Utils.checkDevicePermissionChannelFormat(name, Utils.DECIMAL_DIGITS);
     }
 
--- a/src/share/classes/jdk/dio/gpio/GPIOPinPermission.java	Wed Aug 19 18:42:19 2015 +0300
+++ b/src/share/classes/jdk/dio/gpio/GPIOPinPermission.java	Thu Aug 20 19:08:03 2015 +0300
@@ -92,6 +92,7 @@
      */
     public GPIOPinPermission(String name) {
         super(name);
+        myActions = OPEN;
         Utils.checkDevicePermissionChannelFormat(name, Utils.DECIMAL_DIGITS);
     }
 
--- a/src/share/classes/jdk/dio/gpio/GPIOPortPermission.java	Wed Aug 19 18:42:19 2015 +0300
+++ b/src/share/classes/jdk/dio/gpio/GPIOPortPermission.java	Thu Aug 20 19:08:03 2015 +0300
@@ -90,6 +90,7 @@
      */
     public GPIOPortPermission(String name) {
         super(name);
+        myActions = OPEN;
         Utils.checkDevicePermissionChannelFormat(name, Utils.EMPTY);
     }