Skip to content

Commit

Permalink
Last bugfix for Sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
r-monti committed Jan 19, 2024
1 parent 33ce29d commit d37859a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 2 additions & 4 deletions src/main/java/controller/ExerciseEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,8 @@ private int evaluateITTnTTI(Map<String, String> execution, Map<String, String> s
String executionValue = entry.getValue();
String solutionValue = solution.get(k);

if (executionValue != null) {
if (executionValue.equals(solutionValue.toUpperCase())) {
right++;
}
if (executionValue != null && executionValue.equals(solutionValue.toUpperCase())) {
right++;
}
}
return (int)((right /total)*100);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/controller/Login.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Login extends HttpServlet {
private UserData userData;
private UserRegistry userReg;

@Override
public void init() {
this.authService = new Authenticator();
this.userData = new UserData();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/model/DAO/DAOCondition.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.ArrayList;

public class DAOCondition {
private static final Logger logger = LoggerFactory.getLogger(DAOConnection.class);
private static final Logger logger = LoggerFactory.getLogger(DAOCondition.class);
private Connection connection;
public DAOCondition(Connection connection) {this.connection=connection;}

Expand Down
5 changes: 3 additions & 2 deletions src/main/java/model/service/condition/ConditionManager.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package model.service.condition;

import model.DAO.DAOCondition;
import model.entity.Condition;

import java.util.ArrayList;

public class ConditionManager implements ConditionInterface {
DAOCondition c=new DAOCondition();
public ArrayList<model.entity.Condition> getConditionsOfPatient(int id_patient) { return c.getConditionsOfPatient(id_patient);}
public ArrayList<model.entity.Condition> getConditionsNOTOfPatient(int id_patient) { return c.getConditionsNOTOfPatient(id_patient);}
public ArrayList<Condition> getConditionsOfPatient(int id_patient) { return c.getConditionsOfPatient(id_patient);}
public ArrayList<Condition> getConditionsNOTOfPatient(int id_patient) { return c.getConditionsNOTOfPatient(id_patient);}
public boolean AddConditionPatient(int ID_condition, int ID_patient, int Severity) {return c.AddConditionPatient(ID_condition, ID_patient,Severity);}
public boolean RemoveConditionPatient(int ID_condition, int ID_patient) {return c.RemoveConditionPatient(ID_condition,ID_patient);}
}
2 changes: 1 addition & 1 deletion src/main/webapp/JSP/viewPatientInfo.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%@ page import="model.entity.Exercise" %>
<%@ page import="java.util.List" %>
<!DOCTYPE html>
<html>
<html lang="it">
<head>
<script src="https://cdn.jsdelivr.net/npm/chart.js" integrity="sha384-9nhczxUqK87bcKHh20fSQcTGD4qq5GhayNYSYWqwBkINBhOfQLg/P5HG5lF1urn4" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha384-ZvpUoO/+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn/6Z/hRTt8+pR6L4N2" crossorigin="anonymous"></script>
Expand Down

0 comments on commit d37859a

Please sign in to comment.