Skip to content

Commit

Permalink
fix build error caused by jettison 1.5.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
huiguangjun committed Feb 15, 2023
1 parent 2b26c3b commit 6dfc15a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/com/aliyun/oss/crypto/CryptoModuleBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,12 @@ protected final ObjectMetadata updateMetadataWithContentCryptoMaterial(ObjectMet
// Put the crypto description into the object metadata
Map<String, String> materialDesc = contentCryptoMaterial.getMaterialsDescription();
if (materialDesc != null && materialDesc.size() > 0) {
JSONObject descJson = new JSONObject(materialDesc);
String descStr = descJson.toString();
metadata.addUserMetadata(CryptoHeaders.CRYPTO_MATDESC, descStr);
try {
JSONObject descJson = new JSONObject(materialDesc);
String descStr = descJson.toString();
metadata.addUserMetadata(CryptoHeaders.CRYPTO_MATDESC, descStr);
} catch (Exception e) {
}
}

return metadata;
Expand Down

0 comments on commit 6dfc15a

Please sign in to comment.