Hi John, asserts are checked automatically when running the tests via maven, so they are of some use there. And in critical code like DataAccess which is called many many times in routing we need to avoid overhead which is why we use asserts there. But I agree completely that always exceptions should be used. Maybe you can try to replace with if statement + exception and see if this has an impact on performance?
Kind Regards, Peter On 10.06.2015 00:55, John Zhao wrote: > Hi, > > Assert in java need extra parameter to explicit enable it. > Should GH just throw an exception directly? > _______________________________________________ GraphHopper mailing list [email protected] https://lists.openstreetmap.org/listinfo/graphhopper
