(Object x)
| 1187 | } |
| 1188 | |
| 1189 | static public short shortCast(Object x){ |
| 1190 | if(x instanceof Short) |
| 1191 | return ((Short) x).shortValue(); |
| 1192 | long n = longCast(x); |
| 1193 | if(n < Short.MIN_VALUE || n > Short.MAX_VALUE) |
| 1194 | throw new IllegalArgumentException("Value out of range for short: " + x); |
| 1195 | |
| 1196 | return (short) n; |
| 1197 | } |
| 1198 | |
| 1199 | static public short shortCast(byte x){ |
| 1200 | return x; |
no test coverage detected