diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-09-22 01:15:39 +0200 |
---|---|---|
committer | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-09-22 01:21:00 +0200 |
commit | c3f1fac03fdf3ed5165adfd22aa14a21e5876892 (patch) | |
tree | 6403e5f3175dbcdccfe0719a838527efd7d580fb /org.eclipse.jgit.http.server | |
parent | 46d42404d3913e626f86a4520032a689d207b4c8 (diff) | |
download | jgit-c3f1fac03fdf3ed5165adfd22aa14a21e5876892.tar.gz jgit-c3f1fac03fdf3ed5165adfd22aa14a21e5876892.zip |
Suppress boxing warnings where we know they are ok
Invoke the wrapper types' valueOf via static imports.
For booleans used in asserts, add a new assert in
the JUnit utility package since out current version of JUnit
does not have the assert(boolean, boolean) method.
Change-Id: I9099bd8efbc8c133479344d51ce7dabed8958a2b
Diffstat (limited to 'org.eclipse.jgit.http.server')
-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) { |