提交 e07aac61 编写于 作者: J Jesse Glick

[JENKINS-16332] More logging at FINE in hudson.model.User.

Running hypothesis: something historically saved a user configuration file with a bogus fullName;
thereafter anyone calling User.get(correctFullName) will get a User with the old fullName.
This would make the bug unreproducible in fresh Jenkins installations.
上级 41a4ef65
......@@ -344,8 +344,12 @@ public class User extends AbstractModelObject implements AccessControlled, Descr
if (u==null && (create || getConfigFileFor(id).exists())) {
User tmp = new User(id, fullName);
User prev = byName.putIfAbsent(idkey, u = tmp);
if (prev!=null)
u = prev; // if some has already put a value in the map, use it
if (prev != null) {
u = prev; // if some has already put a value in the map, use it
if (LOGGER.isLoggable(Level.FINE) && !fullName.equals(prev.getFullName())) {
LOGGER.log(Level.FINE, "mismatch on fullName (‘" + fullName + "’ vs. ‘" + prev.getFullName() + "’) for ‘" + id + "’", new Throwable());
}
}
}
return u;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册