@Override public int getCodeOffset() { int codeOffset = internalGetCodeOffset(); if ((this.getCodeUnits() == 1 && (codeOffset < Byte.MIN_VALUE || codeOffset > Byte.MAX_VALUE)) || (this.getCodeUnits() == 2 && (codeOffset < Short.MIN_VALUE || codeOffset > Short.MAX_VALUE))) { throw new IllegalStateException("Target is out of range"); } return codeOffset; }
@Override public int getCodeOffset() { int codeOffset = internalGetCodeOffset(); if (this.getCodeUnits() == 1) { if (codeOffset < Byte.MIN_VALUE || codeOffset > Byte.MAX_VALUE) { throw new ExceptionWithContext("Invalid instruction offset: %d. " + "Offset must be in [-128, 127]", codeOffset); } } else if (this.getCodeUnits() == 2) { if (codeOffset < Short.MIN_VALUE || codeOffset > Short.MAX_VALUE) { throw new ExceptionWithContext("Invalid instruction offset: %d. " + "Offset must be in [-32768, 32767]", codeOffset); } } return codeOffset; }
@Override public int getCodeOffset() { int codeOffset = internalGetCodeOffset(); if (this.getCodeUnits() == 1) { if (codeOffset < Byte.MIN_VALUE || codeOffset > Byte.MAX_VALUE) { throw new ExceptionWithContext("Invalid instruction offset: %d. " + "Offset must be in [-128, 127]", codeOffset); } } else if (this.getCodeUnits() == 2) { if (codeOffset < Short.MIN_VALUE || codeOffset > Short.MAX_VALUE) { throw new ExceptionWithContext("Invalid instruction offset: %d. " + "Offset must be in [-32768, 32767]", codeOffset); } } return codeOffset; }