Commit 4a43d17f authored by Gabriele Civitarese's avatar Gabriele Civitarese

Small refactoring

parent 484d8f65
......@@ -17,9 +17,10 @@ public class Users {
@XmlElement(name="users")
private List<User> userslist;
private static Users instance;
public Users() {
private Users() {
userslist = new ArrayList<User>();
}
......@@ -31,10 +32,12 @@ public class Users {
}
public synchronized List<User> getUserslist() {
return new ArrayList<>(userslist);
}
public void setUserslist(List<User> userslist) {
public synchronized void setUserslist(List<User> userslist) {
this.userslist = userslist;
}
......
......@@ -28,13 +28,16 @@ public class HelloWorld {
@GET
@Produces("application/json")
public String helloWorld2(){
return "{\"message\": \"helloWorld\"}";
}
@Path("/inner")
@Path("inner")
@GET
@Produces("text/plain")
public String innerHello(){
return "Inner Hello!";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment