Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,5 +146,18 @@
}
return FormValidation.ok();
}

@RequirePOST
public FormValidation doCheckUsername(@QueryParameter String value, @QueryParameter boolean usernameSecret) {
if (value.isEmpty()) {
if (usernameSecret) {

Check warning on line 153 in src/main/java/com/cloudbees/plugins/credentials/impl/UsernamePasswordCredentialsImpl.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 153 is only partially covered, one branch is missing
return FormValidation.warning(Messages.UsernamePasswordCredentialsImpl_a_blank_username_cannot_logically_be_con());

Check warning on line 154 in src/main/java/com/cloudbees/plugins/credentials/impl/UsernamePasswordCredentialsImpl.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered line

Line 154 is not covered by tests
} else {
return FormValidation.ok(Messages.UsernamePasswordCredentialsImpl_blank_username_did_you_mean_to_use_secre());
}
} else {
return FormValidation.ok();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# THE SOFTWARE.
#
UsernamePasswordCredentialsImpl.DisplayName=Username with password
UsernamePasswordCredentialsImpl.a_blank_username_cannot_logically_be_con=A blank username cannot logically be considered secret.
UsernamePasswordCredentialsImpl.blank_username_did_you_mean_to_use_secre=Blank username; did you mean to use secret text credentials instead?
CertificateCredentialsImpl.DisplayName=Certificate
CertificateCredentialsImpl.EmptyKeystore=Empty keystore
CertificateCredentialsImpl.LoadKeyFailed=Couldn''t retrieve key for alias "{0}"
Expand Down