File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/software/amazon/encryption/s3/materials Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ static public class Builder {
138138 private byte [] _plaintextDataKey = null ;
139139 private long _plaintextLength = -1 ;
140140 private Provider _cryptoProvider = null ;
141- private MaterialsDescription _materialsDescription ;
141+ private MaterialsDescription _materialsDescription = MaterialsDescription . builder (). build () ;
142142
143143 private Builder () {
144144 }
@@ -153,7 +153,9 @@ public Builder algorithmSuite(AlgorithmSuite algorithmSuite) {
153153 return this ;
154154 }
155155 public Builder materialsDescription (MaterialsDescription materialsDescription ) {
156- _materialsDescription = materialsDescription ;
156+ _materialsDescription = materialsDescription == null
157+ ? MaterialsDescription .builder ().build ()
158+ : materialsDescription ;
157159 return this ;
158160 }
159161 public Builder encryptionContext (Map <String , String > encryptionContext ) {
You can’t perform that action at this time.
0 commit comments