Skip to content

Commit

Permalink
Allow subclasses of UpdateSite to call updateData
Browse files Browse the repository at this point in the history
The updateData method is required to be called for the
actual update data to be synced. For plugins that may
implement a different method for interacting with an
update site (e.g. an implementation of password or
API key protected update site being planned for the
Managed Update Sites plugin), we need to override
updateDirectlyNow and call updateData with the
retrieved JSON data.
  • Loading branch information
slide committed Dec 2, 2024
1 parent d092094 commit 966e586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/model/UpdateSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public long getDataTimestamp() {
return updateData(DownloadService.loadJSON(new URL(getUrl() + "?id=" + URLEncoder.encode(getId(), StandardCharsets.UTF_8) + "&version=" + URLEncoder.encode(Jenkins.VERSION, StandardCharsets.UTF_8))), signatureCheck);
}

private FormValidation updateData(String json, boolean signatureCheck)
protected FormValidation updateData(String json, boolean signatureCheck)
throws IOException {

dataTimestamp = System.currentTimeMillis();
Expand Down

0 comments on commit 966e586

Please sign in to comment.