Skip to content

Commit 8621643

Browse files
authored
Sync list (#370)
1 parent af59637 commit 8621643

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/pokegoapi/api/inventory/PokeBank.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@
2424
import lombok.Getter;
2525

2626
import java.util.ArrayList;
27+
import java.util.Collection;
28+
import java.util.Collections;
2729
import java.util.List;
2830

2931

3032
public class PokeBank {
3133
@Getter
32-
List<Pokemon> pokemons = new ArrayList<Pokemon>();
34+
List<Pokemon> pokemons = Collections.synchronizedList(new ArrayList<Pokemon>());
3335
@Getter
3436
PokemonGo instance;
3537

0 commit comments

Comments
 (0)