changeset 178:481953419516

8085831: (PWMChannelConfig/SPIDeviceConfig).Builder.setChannelNumber() throws IAE for legal value Summary: Removed redundant check Reviewed-by: snazarki Contributed-by: olga.milovskaya@oracle.com
author snazarki
date Thu, 04 Jun 2015 17:22:42 +0300
parents 28f536a049ec
children a555fd602e89
files src/share/classes/jdk/dio/pwm/PWMChannelConfig.java src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Thu Jun 04 17:04:43 2015 +0300
+++ b/src/share/classes/jdk/dio/pwm/PWMChannelConfig.java	Thu Jun 04 17:22:42 2015 +0300
@@ -463,7 +463,7 @@
     }
 
     private void checkParameters(){
-        if ( (null == controllerName && controllerNumber  < DEFAULT) ||
+        if ( (controllerNumber  < DEFAULT) ||
              (idleState != DEFAULT && idleState != IDLE_STATE_HIGH && idleState != IDLE_STATE_LOW) ||
              (pulsePeriod < DEFAULT || pulsePeriod == 0) ||
              (pulseAlignment != DEFAULT && pulseAlignment != ALIGN_CENTER && pulseAlignment != ALIGN_RIGHT && pulseAlignment != ALIGN_LEFT) ||
--- a/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Thu Jun 04 17:04:43 2015 +0300
+++ b/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Thu Jun 04 17:22:42 2015 +0300
@@ -665,7 +665,7 @@
     }
 
     private void checkParameters(){
-        if ((null == controllerName && DEFAULT > controllerNumber) ||
+        if ((DEFAULT > controllerNumber) ||
             address < 0 ||
             (csActive != DEFAULT && csActive != CS_ACTIVE_LOW && csActive != CS_ACTIVE_HIGH && csActive != CS_NOT_CONTROLLED) ||
             (clockFrequency < DEFAULT || clockFrequency == 0) ||