private static boolean rangeIsValid(BasicBlock start, BasicBlock end, BlockAddresses addresses) {
    if (start == null) {
      throw new NullPointerException("start == null");
    }

    if (end == null) {
      throw new NullPointerException("end == null");
    }

    // See above about selection of instructions.
    int startAddress = addresses.getLast(start).getAddress();
    int endAddress = addresses.getEnd(end).getAddress();

    return (endAddress - startAddress) <= MAX_CATCH_RANGE;
  }
Gets whether the address range for the given two blocks is valid for a catch handler. This is
true as long as the covered range is under 65536 code units.

@param start {@code non-null;} the start block for the range (inclusive)
@param end {@code non-null;} the start block for the range (also inclusive)
@param addresses {@code non-null;} address objects for each block
@return {@code true} if the range is valid as a catch range
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/StdCatchBuilder.java