changeset 220:f4b2abb4ddd3

8133653: SPIDeviceConfig.Builder.setClockMode(4) does not throw IAE Summary: Fix range in checkParameters method Reviewed-by: snazarki Contributed-by: olga.milovskaya@oracle.com
author snazarki
date Fri, 14 Aug 2015 18:38:57 +0300
parents 4d7a1b32cc39
children cbfff74807d5
files src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Fri Aug 14 18:35:55 2015 +0300
+++ b/src/share/classes/jdk/dio/spibus/SPIDeviceConfig.java	Fri Aug 14 18:38:57 2015 +0300
@@ -694,7 +694,7 @@
     }
 
     private static void checkClockMode(int clockMode) {
-        if (clockMode < 0 || clockMode > 4) {
+        if (clockMode < 0 || clockMode > 3) {
             throw new IllegalArgumentException(Integer.toString(clockMode));
         }
     }