File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/main/java/com/aliyun/oss/crypto Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments