Merge "Format Java files with google-java-format"
This commit is contained in:
@@ -52,8 +52,7 @@ class CookieBase64 {
|
|||||||
return out.toString();
|
return out.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void encode3to4(
|
private static void encode3to4(StringBuilder out, byte[] in, int inOffset, int numSigBytes) {
|
||||||
StringBuilder out, byte[] in, int inOffset, int numSigBytes) {
|
|
||||||
// 1 2 3
|
// 1 2 3
|
||||||
// 01234567890123456789012345678901 Bit position
|
// 01234567890123456789012345678901 Bit position
|
||||||
// --------000000001111111122222222 Array position from threeBytes
|
// --------000000001111111122222222 Array position from threeBytes
|
||||||
|
@@ -52,8 +52,7 @@ public class HttpLogoutServlet extends HttpServlet {
|
|||||||
this.audit = audit;
|
this.audit = audit;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void doLogout(HttpServletRequest req, HttpServletResponse rsp)
|
protected void doLogout(HttpServletRequest req, HttpServletResponse rsp) throws IOException {
|
||||||
throws IOException {
|
|
||||||
webSession.get().logout();
|
webSession.get().logout();
|
||||||
if (logoutUrl != null) {
|
if (logoutUrl != null) {
|
||||||
rsp.sendRedirect(logoutUrl);
|
rsp.sendRedirect(logoutUrl);
|
||||||
@@ -73,8 +72,7 @@ public class HttpLogoutServlet extends HttpServlet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doGet(HttpServletRequest req, HttpServletResponse rsp)
|
protected void doGet(HttpServletRequest req, HttpServletResponse rsp) throws IOException {
|
||||||
throws IOException {
|
|
||||||
|
|
||||||
final String sid = webSession.get().getSessionId();
|
final String sid = webSession.get().getSessionId();
|
||||||
final CurrentUser currentUser = webSession.get().getUser();
|
final CurrentUser currentUser = webSession.get().getUser();
|
||||||
|
@@ -48,9 +48,7 @@ public class RequestContextFilter implements Filter {
|
|||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
RequestContextFilter(
|
RequestContextFilter(
|
||||||
Provider<RequestCleanup> r,
|
Provider<RequestCleanup> r, Provider<HttpRequestContext> c, ThreadLocalRequestContext l) {
|
||||||
Provider<HttpRequestContext> c,
|
|
||||||
ThreadLocalRequestContext l) {
|
|
||||||
cleanup = r;
|
cleanup = r;
|
||||||
requestContext = c;
|
requestContext = c;
|
||||||
local = l;
|
local = l;
|
||||||
@@ -63,8 +61,7 @@ public class RequestContextFilter implements Filter {
|
|||||||
public void destroy() {}
|
public void destroy() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
ServletRequest request, ServletResponse response, FilterChain chain)
|
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
RequestContext old = local.setContext(requestContext.get());
|
RequestContext old = local.setContext(requestContext.get());
|
||||||
try {
|
try {
|
||||||
|
@@ -63,8 +63,7 @@ public class RequireSslFilter implements Filter {
|
|||||||
public void destroy() {}
|
public void destroy() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
|
||||||
ServletRequest request, ServletResponse response, FilterChain chain)
|
|
||||||
throws IOException, ServletException {
|
throws IOException, ServletException {
|
||||||
final HttpServletRequest req = (HttpServletRequest) request;
|
final HttpServletRequest req = (HttpServletRequest) request;
|
||||||
final HttpServletResponse rsp = (HttpServletResponse) response;
|
final HttpServletResponse rsp = (HttpServletResponse) response;
|
||||||
|
@@ -146,8 +146,7 @@ public class BanCommit {
|
|||||||
return currentUser.get().newCommitterIdent(now, tz);
|
return currentUser.get().newCommitterIdent(now, tz);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String buildCommitMessage(
|
private static String buildCommitMessage(List<ObjectId> bannedCommits, String reason) {
|
||||||
List<ObjectId> bannedCommits, String reason) {
|
|
||||||
final StringBuilder commitMsg = new StringBuilder();
|
final StringBuilder commitMsg = new StringBuilder();
|
||||||
commitMsg.append("Banning ");
|
commitMsg.append("Banning ");
|
||||||
commitMsg.append(bannedCommits.size());
|
commitMsg.append(bannedCommits.size());
|
||||||
|
@@ -25,8 +25,7 @@ public class LargeObjectException extends Exception {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public LargeObjectException(
|
public LargeObjectException(String message, org.eclipse.jgit.errors.LargeObjectException cause) {
|
||||||
String message, org.eclipse.jgit.errors.LargeObjectException cause) {
|
|
||||||
super(message, cause);
|
super(message, cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -154,10 +154,7 @@ public class MultiProgressMonitor {
|
|||||||
* @param maxIntervalUnit time unit for progress interval.
|
* @param maxIntervalUnit time unit for progress interval.
|
||||||
*/
|
*/
|
||||||
public MultiProgressMonitor(
|
public MultiProgressMonitor(
|
||||||
OutputStream out,
|
OutputStream out, String taskName, long maxIntervalTime, TimeUnit maxIntervalUnit) {
|
||||||
String taskName,
|
|
||||||
long maxIntervalTime,
|
|
||||||
TimeUnit maxIntervalUnit) {
|
|
||||||
this.out = out;
|
this.out = out;
|
||||||
this.taskName = taskName;
|
this.taskName = taskName;
|
||||||
maxIntervalNanos = NANOSECONDS.convert(maxIntervalTime, maxIntervalUnit);
|
maxIntervalNanos = NANOSECONDS.convert(maxIntervalTime, maxIntervalUnit);
|
||||||
@@ -186,8 +183,7 @@ public class MultiProgressMonitor {
|
|||||||
* @throws ExecutionException if this thread or a worker thread was interrupted, the worker was
|
* @throws ExecutionException if this thread or a worker thread was interrupted, the worker was
|
||||||
* cancelled, or timed out waiting for a worker to call {@link #end()}.
|
* cancelled, or timed out waiting for a worker to call {@link #end()}.
|
||||||
*/
|
*/
|
||||||
public void waitFor(
|
public void waitFor(Future<?> workerFuture, long timeoutTime, TimeUnit timeoutUnit)
|
||||||
Future<?> workerFuture, long timeoutTime, TimeUnit timeoutUnit)
|
|
||||||
throws ExecutionException {
|
throws ExecutionException {
|
||||||
long overallStart = System.nanoTime();
|
long overallStart = System.nanoTime();
|
||||||
long deadline;
|
long deadline;
|
||||||
|
@@ -88,8 +88,7 @@ public class GetReflog implements RestReadView<BranchResource> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ReflogEntryInfo> apply(BranchResource rsrc)
|
public List<ReflogEntryInfo> apply(BranchResource rsrc) throws RestApiException, IOException {
|
||||||
throws RestApiException, IOException {
|
|
||||||
if (!rsrc.getControl().isOwner()) {
|
if (!rsrc.getControl().isOwner()) {
|
||||||
throw new AuthException("not project owner");
|
throw new AuthException("not project owner");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user