Fix compiler issues

This commit is contained in:
Reinhard Pointner 2016-04-21 01:22:35 +08:00
parent 5435078e58
commit 77d5aca62e
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ public class FloodLimit {
public ScheduledFuture<?> acquirePermit() throws InterruptedException {
permits.acquire();
return TIMER.schedule(permits::release, releaseDelay, timeUnit);
return TIMER.schedule(this::releasePermit, releaseDelay, timeUnit);
}
protected void releasePermit() {
permits.release();
}
}