package ru.cdecl.pub.iota.models;

import org.jetbrains.annotations.NotNull;

import javax.xml.bind.annotation.XmlElement;
import java.util.concurrent.atomic.AtomicLong;

public class UserProfile {

    private long userId;
    @NotNull
    private String login;
    @NotNull
    private String email;

    public UserProfile() {
        this("", "");
    }

    public UserProfile(@NotNull String login, @NotNull String email) {
        userId = ID_GENERATOR.getAndIncrement();
        this.login = login;
        this.email = email;
    }

    @XmlElement(name = "id")
    public synchronized long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    @NotNull
    public synchronized String getLogin() {
        return login;
    }

    public synchronized void setLogin(@NotNull String login) {
        this.login = login.trim();
    }

    @NotNull
    public synchronized String getEmail() {
        return email;
    }

    public synchronized void setEmail(@NotNull String email) {
        this.email = email.trim();
    }

    private static final AtomicLong ID_GENERATOR = new AtomicLong(0);

}

@@ -575,29 +575,16 @@
  public 
-synchronized 
 long get
@@ -722,37 +722,24 @@
 %0A    public 
-synchronized 
 String getLo
@@ -782,37 +782,24 @@
 %0A    public 
-synchronized 
 void setLogi
@@ -891,29 +891,16 @@
  public 
-synchronized 
 String g
@@ -955,21 +955,8 @@
 lic 
-synchronized 
 void

Remove synchronized in UserProfile