File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
src/main/java/com/amazonaws/encryptionsdk/model Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -487,13 +487,11 @@ public int deserialize(final byte[] b, final int off) {
487487 //@ assignable \nothing;
488488 //@ ensures \fresh(\result);
489489 //@ ensures \result.length == 3 * Short.BYTES + providerId.length + providerInformation.length + encryptedDataKey.length;
490+ //@ code_java_math // necessary, or else casts to short are warnings
490491 public byte [] toByteArray () {
491492 final int outLen = 3 * (Short .SIZE / Byte .SIZE ) + keyProviderIdLen_ + keyProviderInfoLen_ + encryptedKeyLen_ ;
492493 final ByteBuffer out = ByteBuffer .allocate (outLen );
493494
494- //@ // JML bug: it treats it as an error to cast a value too large to be
495- //@ // a signed short (but small enough to be an unsigned short) to short
496- //@ // see https://github.com/OpenJML/OpenJML/issues/649
497495 out .putShort ((short ) keyProviderIdLen_ );
498496 out .put (keyProviderId_ , 0 , keyProviderIdLen_ );
499497
You can’t perform that action at this time.
0 commit comments