}
if (getAuthenticationManager() != null) {
try {
String realm = getRepositoryUUID(true);
ISVNAuthenticationManager authManager = getAuthenticationManager();
SVNAuthentication auth = authManager.getFirstAuthentication(ISVNAuthenticationManager.USERNAME, realm, getLocation());
while (auth != null) {
String userName = auth.getUserName();
if (userName == null || "".equals(userName.trim())) {
userName = System.getProperty("user.name");
}
auth = new SVNUserNameAuthentication(userName, auth.isStorageAllowed());
if (userName != null && !"".equals(userName.trim())) {
authManager.acknowledgeAuthentication(true, ISVNAuthenticationManager.USERNAME, realm, null, auth);
return auth.getUserName();
}
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.AUTHN_CREDS_UNAVAILABLE, "Empty user name is not allowed");
authManager.acknowledgeAuthentication(false, ISVNAuthenticationManager.USERNAME, realm, err, auth);
auth = authManager.getNextAuthentication(ISVNAuthenticationManager.USERNAME, realm, getLocation());
}