georchestra/georchestra — pull request #57 by fvanderbiest (2013-02-20 12:03:37+00:00)
Title: mapfishapp: temporary docs are removed at the first purge run with default settings

with default setting of shared.mapfishapp.maxDocAgeInMinutes=44640 there's an int overflow in https://github.com/georchestra/georchestra/blob/master/mapfishapp/src/main/java/mapfishapp/ws/PurgeDocsRunnable.java#L30

maxDocAgeIn is an int, when it gets multiplied by 60 * 1000 an int overflow is triggered, and the value gets negative -> the lifetime is huge, and all the files are marked for deletion by PurgeDocRunnable.

A workaround is to cast maxDocAgeIn to (long) in the comparison, or switch it to be a long everywhere.