Skip to content

Commit 6dfc15a

Browse files
committed
fix build error caused by jettison 1.5.2.
1 parent 2b26c3b commit 6dfc15a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main/java/com/aliyun/oss/crypto/CryptoModuleBase.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,12 @@ protected final ObjectMetadata updateMetadataWithContentCryptoMaterial(ObjectMet
525525
// Put the crypto description into the object metadata
526526
Map<String, String> materialDesc = contentCryptoMaterial.getMaterialsDescription();
527527
if (materialDesc != null && materialDesc.size() > 0) {
528-
JSONObject descJson = new JSONObject(materialDesc);
529-
String descStr = descJson.toString();
530-
metadata.addUserMetadata(CryptoHeaders.CRYPTO_MATDESC, descStr);
528+
try {
529+
JSONObject descJson = new JSONObject(materialDesc);
530+
String descStr = descJson.toString();
531+
metadata.addUserMetadata(CryptoHeaders.CRYPTO_MATDESC, descStr);
532+
} catch (Exception e) {
533+
}
531534
}
532535

533536
return metadata;

0 commit comments

Comments
 (0)