FIX: Checkstyle fixes after merge conflicts
This commit is contained in:
@@ -158,11 +158,16 @@ public class DashBoardController {
|
||||
pathTrans.play();
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the calculator.
|
||||
* @throws IOException if the Application doesn't load.
|
||||
*/
|
||||
public void openCalculator() throws IOException {
|
||||
Parent calc = Application.load(this.getClass().getClassLoader()
|
||||
.getResource("fxml/calculator.fxml"));
|
||||
Scene scene = new Scene(calc);
|
||||
scene.getStylesheets().add(getClass().getClassLoader().getResource("stylesheets/calculatorStyle.css").toExternalForm());
|
||||
scene.getStylesheets().add(getClass().getClassLoader()
|
||||
.getResource("stylesheets/calculatorStyle.css").toExternalForm());
|
||||
Stage calcStage = new Stage();
|
||||
|
||||
calcStage.setScene(scene);
|
||||
|
||||
@@ -99,6 +99,12 @@ public class UserService {
|
||||
.encode().toUri(), String.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a friend to the user.
|
||||
* @param name the username of the current user.
|
||||
* @param friend the username of the friend you want to add.
|
||||
* @return a userDTO
|
||||
*/
|
||||
@SuppressWarnings("Duplicates")
|
||||
public String addFriend(String name, String friend) {
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
|
||||
@@ -4,11 +4,11 @@ import greenify.common.ApplicationException;
|
||||
import greenify.server.InputValidator;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -165,11 +165,10 @@ public class User {
|
||||
}
|
||||
|
||||
/**
|
||||
<<<<<<< HEAD
|
||||
* Returns the name and score of the friends in JSON. Needed for the leaderboard.
|
||||
* @return a JSON object of the friendlist with only names and scores.
|
||||
*/
|
||||
public String friendsToString(){
|
||||
public String friendsToString() {
|
||||
String result = "friends=[";
|
||||
for (User u : friends) {
|
||||
result += "{name=" + u.getName() + ", footprint=" + u.getFootPrint() + "}, ";
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
package greenify.server.data.model;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import greenify.common.ApplicationException;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import greenify.common.ApplicationException;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user