Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -469,17 +469,6 @@
<Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS"/>
</Match>

<!-- Incorrect flagging, if the response is null a HttpResponseException should be thrown
https://github.com/azure/azure-sdk-for-java/issues/4556 -->
<Match>
<Or>
<Class name="com.azure.security.keyvault.keys.KeyClient"/>
<Class name="com.azure.security.keyvault.secrets.SecretClient"/>
<Class name="com.azure.security.keyvault.certificates.CertificateClient"/>
</Or>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
</Match>

<!-- Super doesn't need to be cloned since it is Object -->
<Match>
<Class name="com.azure.core.util.Configuration"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public Certificate getCertificateWithPolicy(String name) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Certificate getCertificate(CertificateBase certificateBase) {
return client.getCertificateWithResponse(certificateBase.name(), certificateBase.version(), Context.NONE).block().getValue();
return getCertificateWithResponse(certificateBase.name(), certificateBase.version(), Context.NONE).getValue();
}

/**
Expand Down Expand Up @@ -222,7 +222,7 @@ public Response<Certificate> getCertificateWithResponse(String name, String vers
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Certificate getCertificate(String name, String version) {
return client.getCertificateWithResponse(name, version, Context.NONE).block().getValue();
return getCertificateWithResponse(name, version, Context.NONE).getValue();
}

/**
Expand All @@ -243,7 +243,7 @@ public Certificate getCertificate(String name, String version) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Certificate updateCertificate(CertificateBase certificate) {
return client.updateCertificateWithResponse(certificate, Context.NONE).block().getValue();
return updateCertificateWithResponse(certificate, Context.NONE).getValue();
}

/**
Expand Down Expand Up @@ -742,7 +742,7 @@ public Response<CertificatePolicy> updateCertificatePolicyWithResponse(String ce
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Issuer createCertificateIssuer(String name, String provider) {
return client.createCertificateIssuerWithResponse(name, provider, Context.NONE).block().getValue();
return createCertificateIssuerWithResponse(new Issuer(name, provider), Context.NONE).getValue();
}

/**
Expand Down Expand Up @@ -1148,7 +1148,7 @@ public Response<CertificateOperation> deleteCertificateOperationWithResponse(Str
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public CertificateOperation cancelCertificateOperation(String certificateName) {
return client.cancelCertificateOperationWithResponse(certificateName, Context.NONE).block().getValue();
return cancelCertificateOperationWithResponse(certificateName, Context.NONE).getValue();
}


Expand Down Expand Up @@ -1224,7 +1224,7 @@ public Response<byte[]> getPendingCertificateSigningRequestWithResponse(String c
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Certificate mergeCertificate(String name, List<byte[]> x509Certificates) {
return client.mergeCertificateWithResponse(name, x509Certificates, Context.NONE).block().getValue();
return mergeCertificateWithResponse(name, x509Certificates, Context.NONE).getValue();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public final class KeyClient {
* @throws HttpRequestException if {@code name} is empty string.
*/
public Key createKey(String name, KeyType keyType) {
return client.createKeyWithResponse(name, keyType, Context.NONE).block().getValue();
return createKeyWithResponse(new KeyCreateOptions(name, keyType), Context.NONE).getValue();
}

/**
Expand Down Expand Up @@ -262,7 +262,7 @@ public Response<Key> createEcKeyWithResponse(EcKeyCreateOptions ecKeyCreateOptio
* @throws HttpRequestException if {@code name} is empty string.
*/
public Key importKey(String name, JsonWebKey keyMaterial) {
return client.importKeyWithResponse(name, keyMaterial, Context.NONE).block().getValue();
return importKeyWithResponse(new KeyImportOptions(name, keyMaterial), Context.NONE).getValue();
}

/**
Expand Down Expand Up @@ -450,7 +450,7 @@ public Response<Key> getKeyWithResponse(KeyBase keyBase, Context context) {
* string.
*/
public Key updateKey(KeyBase key) {
return client.updateKeyWithResponse(key, Context.NONE).block().getValue();
return updateKeyWithResponse(key, Context.NONE).getValue();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Secret setSecret(Secret secret) {
* @throws HttpRequestException if {@code name} or {@code value} is empty string.
*/
public Secret setSecret(String name, String value) {
return client.setSecretWithResponse(name, value, Context.NONE).block().getValue();
return setSecretWithResponse(new Secret(name, value), Context.NONE).getValue();
}

/**
Expand Down