Permalink
Browse files

Fix odd type inference issue on jdk6

  • Loading branch information...
1 parent 2a1dfa1 commit 06b3229144e6d81c76aee86e1e98c78fcde9289e @ptomli ptomli committed Mar 12, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 core/src/test/java/org/smpp/pdu/ByteDataTest.java
@@ -9,6 +9,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
+import org.powermock.reflect.Whitebox;
public class ByteDataTest {
private static Class<?> CLAZZ = ByteData.class;
@@ -121,15 +122,15 @@ private void checkRange(int min, int value, int max) throws Exception {
}
private short decodeUnsigned(byte bite) throws Exception {
- return invokeMethod(CLAZZ, "decodeUnsigned", bite);
+ return Whitebox.<Short> invokeMethod(CLAZZ, "decodeUnsigned", bite);
}
private int decodeUnsigned(short value) throws Exception {
- return invokeMethod(CLAZZ, "decodeUnsigned", value);
+ return Whitebox.<Integer> invokeMethod(CLAZZ, "decodeUnsigned", value);
}
private byte encodeUnsigned(short value) throws Exception {
- return invokeMethod(CLAZZ, "encodeUnsigned", value);
+ return Whitebox.<Byte> invokeMethod(CLAZZ, "encodeUnsigned", value);
}
private short encodeUnsigned(int positive) throws Exception {
- return invokeMethod(CLAZZ, "encodeUnsigned", positive);
+ return Whitebox.<Short> invokeMethod(CLAZZ, "encodeUnsigned", positive);
}
}

0 comments on commit 06b3229

Please sign in to comment.