(Object x)
| 1140 | } |
| 1141 | |
| 1142 | static public byte byteCast(Object x){ |
| 1143 | if(x instanceof Byte) |
| 1144 | return ((Byte) x).byteValue(); |
| 1145 | long n = longCast(x); |
| 1146 | if(n < Byte.MIN_VALUE || n > Byte.MAX_VALUE) |
| 1147 | throw new IllegalArgumentException("Value out of range for byte: " + x); |
| 1148 | |
| 1149 | return (byte) n; |
| 1150 | } |
| 1151 | |
| 1152 | static public byte byteCast(byte x){ |
| 1153 | return x; |
no test coverage detected