conveyal / r5

Developed to power Conveyal's web-based interface for scenario planning and land-use/transport accessibility analysis, R5 is our routing engine for multimodal (transit/bike/walk/car) networks with a particular focus on public transit
https://conveyal.com/learn
MIT License
285 stars 73 forks source link

Change dual accessibility CSV headers and column order #912

Closed abyrd closed 10 months ago

abyrd commented 10 months ago

Noting here that the final commit is a workaround for a weird detail of Java: strangely it's possible to read the value of an uninitialized final variable in a constructor and this is not considered an error. This would often fail fast for null references but not for primitives - their final values are not actually final. Java also disallows setting such final fields before calling the superclass constructor. We may be able to reorder some initialization to lessen this effect but for now we're just leaving the dual threshold out of the column headers.

abyrd commented 10 months ago

I just discovered that the problem described above is the subject of a change introduced in Java 22: https://openjdk.org/jeps/447 "statements before super()"