Remove synchronized from nextSerialNumber

Here I guess that the synchronized keyword is a typo.
This commit is contained in:
Gianluca Finocchiaro 2017-08-21 10:27:36 +02:00 committed by GitHub
parent 7df16392cf
commit ad67514d8f

View File

@ -8,7 +8,7 @@ public class
AtomicSerialNumbers extends SerialNumbers {
private AtomicInteger serialNumber =
new AtomicInteger();
public synchronized int nextSerialNumber() {
public int nextSerialNumber() {
return serialNumber.getAndIncrement();
}
public static void main(String[] args) {