Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: file upload #23

Merged
merged 36 commits into from
Jun 26, 2024
Merged

feat: file upload #23

merged 36 commits into from
Jun 26, 2024

Conversation

mariocosenza
Copy link
Owner

File upload for food and restaurant

mariocosenza and others added 30 commits June 24, 2024 16:17
Copy link

sonarcloud bot commented Jun 26, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
B Reliability Rating on New Code (required ≥ A)
B Security Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

req.setAttribute("foodList", foodList);
req.setAttribute("restaurant", restaurant);

requestDispatcher.forward(req, resp);

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exceptions that could be thrown by "forward": ServletException, IOException. See more on SonarCloud

try {
Gson gson = new Gson();
map = gson.fromJson(req.getReader(), mapType);

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exceptions that could be thrown by "fromJson": JsonIOException, JsonSyntaxException. See more on SonarCloud
try {
resp.sendError(HttpServletResponse.SC_FORBIDDEN);
} catch (IOException e) {
throw new RuntimeException(e);

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the "RuntimeException" thrown here in a "try/catch" block. See more on SonarCloud
@mariocosenza mariocosenza merged commit 472a909 into main Jun 26, 2024
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants