Ticket #20587: 20587.patch
File 20587.patch, 881 bytes (added by , 4 years ago) |
---|
-
src/org/openstreetmap/josm/data/osm/QuadBuckets.java
454 454 455 455 @Override 456 456 public Object[] toArray() { 457 return this.toList().toArray(); 457 // Don't call toList() -- in some cases, this can produce an infinite loop 458 // For example, ArrayList may call toArray to get the initial array. However, since we are 459 // creating a new ArrayList in toList with `this`, this creates an infinite recursion loop. 460 // So a `toArray` call becomes `toArray -> toList -> toArray -> toList -> toArray -> ...` 461 // For more information, see #20587. 462 return this.stream().toArray(); 458 463 } 459 464 460 465 @Override