GitHub user sebbASF opened an issue:
https://github.com/apache/incubator-ponymail/issues/117
Bug: redundant matching of same string
The first line of the following code contains a redundant match()
invocation:
if get.d and get.d:match("lte=.+") then
local lte = get.d:match("lte=([0-9]+[wMyd])")
if lte then
daterange.lte = "now+1d"
daterange.gte = "now-" .. lte
daterange.gt = nil
end
end
This code pattern appears several times at
https://github.com/apache/incubator-ponymail/blob/master/site/api/stats.lua#L190
and below
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---