Skip to content

Commit

Permalink
Merge pull request CSC207-UofT#47 from CSC207-UofT/tony-cleanup
Browse files Browse the repository at this point in the history
Clean up (final) code for Phase 2
  • Loading branch information
dien-n-nguyen committed Dec 9, 2021
2 parents 2f7d3be + 13d13bd commit a87b7ff
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 13 deletions.
2 changes: 0 additions & 2 deletions app/src/main/java/com/amigo/control/DatabaseController.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.amigo.control;

import java.util.List;
import java.util.Optional;

import com.amigo.course.Course;
import com.amigo.course.CourseRepository;
// // import com.amigo.user.UserRepository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
Expand Down
7 changes: 0 additions & 7 deletions app/src/main/java/com/amigo/course/CourseSetFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

public class CourseSetFactory {

/**
* Constructor for CourseSetFactory
*/

public CourseSetFactory() {
}

/**
* Creates a course set using a string of course codes
* @param stringOfCourseCodes a string containing course codes, each separated by commas
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/amigo/match/DemoMatching.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static Map<String, List<Match>> doMatching(User user) {
* Creates the demo users
*/
private static List<User> createDemoUsers() {
ArrayList<User> users = new ArrayList<User>();
ArrayList<User> users = new ArrayList<>();
ProfileFactory profileFactory = new ProfileFactory();
CourseSetFactory courseSetFactory = new CourseSetFactory();
UserFactory userFactory = new UserFactory();
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/amigo/match/Matcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ public int compare(Match m1, Match m2) {
* Returns the metric representing the closeness of match between two users.
*/
public double metric(User user1, User user2) {
// TODO: Improve metric to include more than just courses
double metric;
Profile profile1 = user1.getProfile();
Profile profile2 = user2.getProfile();
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/amigo/match/MatcherBeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ private Map<String, List<Match>> matchPotential(List<User> users) {
*/

public double metric(User user1, User user2) {
// TODO: Improve metric to include more than just courses, should be done
double temp_metric = 0;
Profile profile1 = user1.getProfile();
Profile profile2 = user2.getProfile();
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/amigo/validate/CourseValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public boolean supports(Class<?> clazz) {
*/
@Override
public void validate(Object target, Errors errors) {
// TODO: convert into nested validators to correctly identify fields
CourseForm form = (CourseForm) target;
if (!COURSE_PATTERN.matcher(form.getCourseCode()).matches()) {
errors.reject(errorStrings.COURSE_INFO_FORMAT);
Expand Down

0 comments on commit a87b7ff

Please sign in to comment.