Merge "Merge branch 'stable-2.13'"

This commit is contained in:
David Pursehouse
2017-01-11 12:59:08 +00:00
committed by Gerrit Code Review

View File

@@ -161,6 +161,7 @@ public class ProjectQoSFilter implements Filter {
private final Object lock = new Object();
private boolean done;
private Thread worker;
private String fullName;
TaskThunk(final WorkQueue.Executor executor, final Continuation cont,
final HttpServletRequest req) {
@@ -219,28 +220,33 @@ public class ProjectQoSFilter implements Filter {
@Override
public String toString() {
if (fullName != null) {
return fullName;
}
CurrentUser who = user.get();
if (who.isIdentifiedUser()) {
String username = who.asIdentifiedUser().getUserName();
if (username != null && !username.isEmpty()) {
fullName = name + " (" + username + ")";
return fullName;
}
}
return name;
}
private String generateName(HttpServletRequest req) {
String userName = "";
CurrentUser who = user.get();
if (who.isIdentifiedUser()) {
String name = who.asIdentifiedUser().getUserName();
if (name != null && !name.isEmpty()) {
userName = " (" + name + ")";
}
}
String uri = req.getServletPath();
Matcher m = URI_PATTERN.matcher(uri);
if (m.matches()) {
String path = m.group(1);
String cmd = m.group(2);
return cmd + " " + path + userName;
return cmd + " " + path;
}
return req.getMethod() + " " + uri + userName;
return req.getMethod() + " " + uri;
}
}
}