changeset 176:691950e8cc89

8129219: Build failure fix Summary: Corrected GPIO message code Reviewed-by: alkonsta
author snazarki
date Thu, 18 Jun 2015 18:58:21 +0300
parents 4328bfd8a8f5
children 16b0299dae30
files src/share/classes/jdk/dio/gpio/GPIOPortConfig.java
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Thu Jun 18 18:34:23 2015 +0300
+++ b/src/share/classes/jdk/dio/gpio/GPIOPortConfig.java	Thu Jun 18 18:58:21 2015 +0300
@@ -137,11 +137,12 @@
 
     private void checkValues() {
         if (DIR_INPUT_ONLY > direction ||
-            DIR_BOTH_INIT_OUTPUT < direction ||
-            pinConfigs.length == 0 ) {
-            throw new IllegalArgumentException(
-                ExceptionMessage.format(ExceptionMessage.GPIO_ILLEGAL_DIRECTION_OR_INIT_VALUE)
-            );
+            DIR_BOTH_INIT_OUTPUT < direction) {
+            throw new IllegalArgumentException(ExceptionMessage.format(ExceptionMessage.GPIO_INVALID_DIRECTION));
+        }
+
+        if (pinConfigs.length == 0) {
+            throw new IllegalArgumentException();
         }
 
         for (GPIOPinConfig pin : pinConfigs) {