diff options
Diffstat (limited to 'org.eclipse.jgit.http.server/src')
-rw-r--r-- | org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java index bee2bfc191..2d466e2bc8 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java @@ -53,6 +53,8 @@ import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import static java.lang.Integer.valueOf; + import org.eclipse.jgit.http.server.HttpServerText; /** @@ -72,7 +74,8 @@ public class RegexGroupFilter implements Filter { */ public RegexGroupFilter(final int groupIdx) { if (groupIdx < 1) - throw new IllegalArgumentException(MessageFormat.format(HttpServerText.get().invalidIndex, groupIdx)); + throw new IllegalArgumentException(MessageFormat.format( + HttpServerText.get().invalidIndex, valueOf(groupIdx))); this.groupIdx = groupIdx - 1; } @@ -91,7 +94,9 @@ public class RegexGroupFilter implements Filter { if (groupIdx < g.length) chain.doFilter(g[groupIdx], rsp); else - throw new ServletException(MessageFormat.format(HttpServerText.get().invalidRegexGroup, (groupIdx + 1))); + throw new ServletException(MessageFormat.format( + HttpServerText.get().invalidRegexGroup, + valueOf(groupIdx + 1))); } private static WrappedRequest[] groupsFor(final ServletRequest r) { |