Deal with signed ints to unsigned, without the benefit of JDK8.