Skip to content
Snippets Groups Projects
Verified Commit d80a41b9 authored by Luc Everse's avatar Luc Everse :passport_control:
Browse files

Properly send feedback requests

parent 88e4e545
Branches
Tags
2 merge requests!179Release 2.5.0,!177Submit integration
......@@ -303,8 +303,7 @@ public class SubmitAppController extends ControllerBase
conn.setRequestProperty("Content-Type", "application/json");
try (
var out = conn.getOutputStream();
var writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
var in = conn.getInputStream()
var writer = new OutputStreamWriter(out, StandardCharsets.UTF_8)
) {
final var body = new SubmitAppFeedbackDto();
body.submissionId = submitMetadata.getSubmissionId();
......@@ -314,13 +313,14 @@ public class SubmitAppController extends ControllerBase
body.textualFeedback = report;
body.score = score;
this.gson.toJson(body, writer);
writer.flush();
}
try {
try (var in = conn.getInputStream()) {
in.close();
} catch (final IOException ex) {
// Ignore
}
}
} catch (final IOException ex) {
logger.error("Could not send report to Submit", ex);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment