CheneyYin commented on code in PR #5928:
URL: https://github.com/apache/seatunnel/pull/5928#discussion_r1432712255
##########
seatunnel-connectors-v2/connector-email/src/main/java/org/apache/seatunnel/connectors/seatunnel/email/sink/EmailSinkWriter.java:
##########
@@ -143,9 +143,10 @@ protected PasswordAuthentication
getPasswordAuthentication() {
}
public void createFile() {
+ String fielName = "emailsink.csv";
try {
String data = stringBuffer.toString();
- File file = new File("emailsink.csv");
+ File file = new File(fielName);
Review Comment:
```suggestion
File file = new File(fileName);
```
##########
seatunnel-connectors-v2/connector-email/src/main/java/org/apache/seatunnel/connectors/seatunnel/email/sink/EmailSinkWriter.java:
##########
@@ -155,8 +156,7 @@ public void createFile() {
fileWriter.close();
log.info("Create File successfully....");
} catch (IOException e) {
- throw new EmailConnectorException(
- CommonErrorCodeDeprecated.FILE_OPERATION_FAILED, "Create
file failed", e);
+ throw CommonError.fileOperationFailed("Email", "create", fielName,
e);
Review Comment:
```suggestion
throw CommonError.fileOperationFailed("Email", "create",
fileName, e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]