NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.96k stars 1.7k forks source link

PriorityQueue in RouterNanoHTTPD does not return the routes in the correct order #600

Open rbill opened 3 years ago

rbill commented 3 years ago

I was debugging my code to see why a certain "low-priority" rule was taken instead of a high-priority one and found that route prioritization (in RouterNanoHTTPD) uses PriorityQueue, which, according to the JavaDoc, does not return the elements in any particular order.