Skip to content

Commit

Permalink
Safely handle negative input on the delay input to metrics-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Jacobs committed Jun 21, 2015
1 parent 61152a0 commit a2b2dc6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void handleRequest(HttpServletRequest request, HttpServletResponse respo
try {
String d = request.getParameter("delay");
if (d != null) {
delay = Integer.parseInt(d);
delay = Math.max(Integer.parseInt(d), 1);
}
} catch (Exception e) {
// ignore if it's not a number
Expand Down

0 comments on commit a2b2dc6

Please sign in to comment.