suppress AutoValue mutable byte array warnings

This commit is contained in:
Vincent Breitmoser
2018-01-22 01:35:09 +01:00
parent ac96fea1fc
commit 29a740a902
8 changed files with 11 additions and 0 deletions

View File

@@ -31,10 +31,12 @@ import com.google.auto.value.AutoValue;
@AutoValue @AutoValue
public abstract class ParcelableKeyRing implements Parcelable { public abstract class ParcelableKeyRing implements Parcelable {
@Nullable @Nullable
@SuppressWarnings("mutable")
public abstract byte[] getBytes(); public abstract byte[] getBytes();
// dual role! // dual role!
@Nullable @Nullable
@SuppressWarnings("mutable")
public abstract byte[] getExpectedFingerprint(); public abstract byte[] getExpectedFingerprint();
@Nullable @Nullable
public abstract String getKeyIdHex(); public abstract String getKeyIdHex();

View File

@@ -38,6 +38,7 @@ abstract class SktUri {
public abstract String getHost(); public abstract String getHost();
public abstract int getPort(); public abstract int getPort();
@SuppressWarnings("mutable")
public abstract byte[] getPresharedKey(); public abstract byte[] getPresharedKey();
@Nullable @Nullable

View File

@@ -33,6 +33,7 @@ public abstract class CommandApdu {
public abstract int getINS(); public abstract int getINS();
public abstract int getP1(); public abstract int getP1();
public abstract int getP2(); public abstract int getP2();
@SuppressWarnings("mutable")
public abstract byte[] getData(); public abstract byte[] getData();
public abstract int getNe(); public abstract int getNe();

View File

@@ -36,7 +36,9 @@ public abstract class OpenPgpCapabilities {
private static final int MAX_PW1_LENGTH_INDEX = 1; private static final int MAX_PW1_LENGTH_INDEX = 1;
private static final int MAX_PW3_LENGTH_INDEX = 3; private static final int MAX_PW3_LENGTH_INDEX = 3;
@SuppressWarnings("mutable")
public abstract byte[] getAid(); public abstract byte[] getAid();
@SuppressWarnings("mutable")
abstract byte[] getHistoricalBytes(); abstract byte[] getHistoricalBytes();
@Nullable @Nullable
@@ -48,6 +50,7 @@ public abstract class OpenPgpCapabilities {
@Nullable @Nullable
@SuppressWarnings("mutable") @SuppressWarnings("mutable")
public abstract byte[] getFingerprintAuth(); public abstract byte[] getFingerprintAuth();
@SuppressWarnings("mutable")
public abstract byte[] getPwStatusBytes(); public abstract byte[] getPwStatusBytes();
public abstract KeyFormat getSignKeyFormat(); public abstract KeyFormat getSignKeyFormat();

View File

@@ -28,6 +28,7 @@ import com.google.auto.value.AutoValue;
public abstract class ResponseApdu { public abstract class ResponseApdu {
private static final int APDU_SW_SUCCESS = 0x9000; private static final int APDU_SW_SUCCESS = 0x9000;
@SuppressWarnings("mutable")
public abstract byte[] getData(); public abstract byte[] getData();
public abstract int getSw1(); public abstract int getSw1();
public abstract int getSw2(); public abstract int getSw2();

View File

@@ -47,6 +47,7 @@ public abstract class SecurityTokenInfo implements Parcelable {
public abstract List<byte[]> getFingerprints(); public abstract List<byte[]> getFingerprints();
@Nullable @Nullable
@SuppressWarnings("mutable")
public abstract byte[] getAid(); public abstract byte[] getAid();
@Nullable @Nullable
public abstract String getUserId(); public abstract String getUserId();

View File

@@ -269,6 +269,7 @@ public class CcidTransceiver {
public abstract byte getError(); public abstract byte getError();
public abstract byte getChainParameter(); public abstract byte getChainParameter();
@Nullable @Nullable
@SuppressWarnings("mutable")
public abstract byte[] getData(); public abstract byte[] getData();
static CcidDataBlock parseHeaderFromBytes(byte[] headerBytes) { static CcidDataBlock parseHeaderFromBytes(byte[] headerBytes) {

View File

@@ -325,6 +325,7 @@ public abstract class PublicKeyRetrievalLoader extends AsyncTaskLoader<KeyRetrie
@Nullable @Nullable
abstract Long getMasterKeyId(); abstract Long getMasterKeyId();
@Nullable @Nullable
@SuppressWarnings("mutable")
abstract byte[] getKeyData(); abstract byte[] getKeyData();
abstract boolean isSecretKeyAvailable(); abstract boolean isSecretKeyAvailable();