Fix a bug in A_Star.Graph in jdk17 (#2842)
Co-authored-by: Andrii Siriak <siryaka@gmail.com>
This commit is contained in:
parent
6c00beec90
commit
fb3cec06a1
@ -16,7 +16,7 @@ public class A_Star {
|
||||
public Graph(int size) {
|
||||
this.graph = new ArrayList<>();
|
||||
for (int i = 0; i < size; i++) {
|
||||
this.graph.set(i, new ArrayList<>());
|
||||
this.graph.add(new ArrayList<>());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user