changeset 208:a00757ecbb33

8132773: api/jdk/dio/DevicePermission test fails Summary: IAE is added Reviewed-by: snazarki Contributed-by: olga.milovskaya@oracle.com
author snazarki
date Fri, 31 Jul 2015 14:45:58 +0300
parents 6a6eda574d4e
children 95be573d84d4
files src/share/classes/jdk/dio/DevicePermission.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/DevicePermission.java	Fri Jul 31 14:03:09 2015 +0300
+++ b/src/share/classes/jdk/dio/DevicePermission.java	Fri Jul 31 14:45:58 2015 +0300
@@ -179,6 +179,11 @@
     public DevicePermission(String name, String actions) {
         // null check
         super(name.toString());
+        if (null == actions) {
+            throw new IllegalArgumentException(
+                ExceptionMessage.format(ExceptionMessage.DEVICE_NULL_ACTIONS)
+            );
+        }
         String[] ret = Utils.parseDevicePermissionName(name);
         thisDevice  = ret[0];
         thisChannel = ret[1];