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

feature(core): various page and back end implantation #16

Merged
merged 23 commits into from
Jun 20, 2024

Conversation

mariocosenza
Copy link
Owner

feature(core): various page and back end implantation

@mariocosenza mariocosenza merged commit ebd021b into main Jun 20, 2024
6 checks passed
Copy link

sonarcloud bot commented Jun 20, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
4.2% Duplication on New Code (required ≤ 3%)
B Security Rating on New Code (required ≥ A)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

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

public class PaymentServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
super.doGet(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 "doGet": ServletException, IOException. See more on SonarCloud
Map<String, String> map = null;
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
userAccount.setPassword(PasswordSHA512.SHA512Hash(map.get("password")));
var address = new Address();
address.setCountryCode("IT");
address.setLat(Double.valueOf(map.get("lat")));

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exception that could be thrown by "valueOf": NumberFormatException. See more on SonarCloud
var address = new Address();
address.setCountryCode("IT");
address.setLat(Double.valueOf(map.get("lat")));
address.setLon(Double.valueOf(map.get("lon")));

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exception that could be thrown by "valueOf": NumberFormatException. See more on SonarCloud
}
if (httpSession.getAttribute("cart") instanceof HashMap<?, ?> map) {
var typeMap = (HashMap<Integer, Integer>) map;
var quant = typeMap.get(Integer.parseInt(req.getParameter("foodId")));

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exception that could be thrown by "parseInt": NumberFormatException. See more on SonarCloud
var quant = typeMap.get(Integer.parseInt(req.getParameter("foodId")));
if (quant != null) {
quant++;
typeMap.replace(Integer.parseInt(req.getParameter("foodId")), quant);

Check notice

Code scanning / SonarCloud

Exceptions should not be thrown from servlet methods Low

Handle the following exception that could be thrown by "parseInt": NumberFormatException. See more on SonarCloud
Copy link

Qodana for JVM

1 new problem were found

Inspection name Severity Problems
Unused assignment 🔶 Warning 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

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.

1 participant