Commit 285eab6
authored
fix: Create default wrapped clients only if necessary. (#163)
Create the default wrapped clients only if they have not been
specified explicitly.
S3Client.create or S3AsyncClient.create can fail in restrictive
environments because they attempt to load profiles and credentials from
disk, thus requiring java.io.FilePermission.
This patch moves these calls from the class initializer to the build
method, so users can prevent the calls by passing their own wrapped
clients.1 parent 74ed21d commit 285eab6
File tree
1 file changed
+10
-2
lines changed- src/main/java/software/amazon/encryption/s3
1 file changed
+10
-2
lines changedLines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
476 | | - | |
477 | | - | |
| 476 | + | |
| 477 | + | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
721 | 729 | | |
722 | 730 | | |
723 | 731 | | |
| |||
0 commit comments