Skip to content

Commit 29ce56a

Browse files
committed
Fixed AI review comments, minor code-style update in MailtrapClient
1 parent 9611aac commit 29ce56a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ Bulk stream example (optional) differs only by setting `.bulk(true)` instead of
143143
```java
144144
final MailtrapConfig config = new MailtrapConfig.Builder()
145145
.token(TOKEN)
146-
.sandbox(true)
147-
.inboxId(INBOX_ID)
146+
.bulk(true)
148147
.build();
149148
```
150149

@@ -184,14 +183,12 @@ public class SwitchSendFromClient {
184183
// Production send
185184
client.send(mail);
186185

187-
client.switchToBulkSendingApi();
188-
189186
// Bulk send
187+
client.switchToBulkSendingApi();
190188
client.send(mail);
191189

192-
client.switchToEmailTestingApi(INBOX_ID);
193-
194190
// Sandbox send
191+
client.switchToEmailTestingApi(INBOX_ID);
195192
client.send(mail);
196193
}
197194

@@ -311,7 +308,7 @@ public class FullFeaturedExample {
311308
}
312309

313310
private static String readAndEncodeAttachment(final String filename) {
314-
try (final InputStream inputStream = EverythingExample.class.getClassLoader().getResourceAsStream(filename)) {
311+
try (final InputStream inputStream = FullFeaturedExample.class.getClassLoader().getResourceAsStream(filename)) {
315312
if (inputStream == null) {
316313
return "";
317314
}

src/main/java/io/mailtrap/client/MailtrapClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void switchToBulkSendingApi() {
108108
*
109109
* @param inboxId the inbox ID to use for testing
110110
*/
111-
public void switchToEmailTestingApi(Long inboxId) {
111+
public void switchToEmailTestingApi(final Long inboxId) {
112112
this.sendingContextHolder.setInboxId(inboxId);
113113
this.sendingContextHolder.setSandbox(true);
114114
this.sendingContextHolder.setBulk(false);

0 commit comments

Comments
 (0)