The API was designed so that a flow of an issue would have its locations in order leading to the issue.
Due to a bug in the SonarQube UI, the flows were being displayed in reverse order. For that reason, the Java plugin did the "hack" of creating the flows also in reverse order so that they would be displayed correctly in SonarQube.
To avoid problems with compatibility between plugins, the platform and SonarLint, we decided to adopt the reverse order.
The goal of this ticket is simply to update the javadoc of sonar-api so that all analyzers creating flows will also created them with the locations ordered from the primary location to the start of the flow.