Source:
<code>public void doProcessDownloadRequest( StaplerRequest request, StaplerResponse response) throws IOException, ServletException { AzureCredentials.StorageAccountCredential accountCredentials = AzureCredentials.getStorageAccountCredential(build.getParent(), storageCredentialId); if (accountCredentials == null) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Azure Storage account global configuration is missing"); return; } StorageAccountInfo accountInfo = AzureCredentials.convertToStorageAccountInfo(accountCredentials); if (!allowAnonymousAccess && isAnonymousAccess(Jenkins.getAuthentication())) { String url = request.getOriginalRequestURI(); response.sendRedirect(request.getContextPath() + "/login?from=" + url); return; } String queryPath = request.getRestOfPath(); if (queryPath == null) { return; } String blobName = queryPath.substring(1); if (zipArchiveBlob != null && zipArchiveBlob.getBlobName().equals(blobName)) { try { response.sendRedirect2(zipArchiveBlob.getBlobURL() + "?" + generateSASURL(accountInfo, blobName)); } catch (Exception e) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Error occurred while downloading artifact " + e.getMessage()); } return; } for (AzureBlob blob : individualBlobs) { <START> if (blobName.equals(URLDecoder.decode(blob.getBlobName(), "UTF-8"))) { <END> try { response.sendRedirect2(blob.getBlobURL() + "?" + generateSASURL(accountInfo, blob.getBlobName())); } catch (Exception e) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Error occurred while downloading artifact " + e.getMessage()); } return; } } response.sendError(Constants.HTTP_NOT_FOUND, "Azure artifact is not available"); }</code><technical_language>StandardCharsets.UTF_8 instead of hard code "UTF-8" here</technical_language>

Target:
public void doProcessDownloadRequest( StaplerRequest request, StaplerResponse response) throws IOException, ServletException { AzureCredentials.StorageAccountCredential accountCredentials = AzureCredentials.getStorageAccountCredential(build.getParent(), storageCredentialId); if (accountCredentials == null) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Azure Storage account global configuration is missing"); return; } StorageAccountInfo accountInfo = AzureCredentials.convertToStorageAccountInfo(accountCredentials); if (!allowAnonymousAccess && isAnonymousAccess(Jenkins.getAuthentication())) { String url = request.getOriginalRequestURI(); response.sendRedirect(request.getContextPath() + "/login?from=" + url); return; } String queryPath = request.getRestOfPath(); if (queryPath == null) { return; } String blobName = queryPath.substring(1); if (zipArchiveBlob != null && blobName.equals(URLDecoder.decode(zipArchiveBlob.getBlobName(), StandardCharsets.UTF_8.toString()))) { try { response.sendRedirect2(zipArchiveBlob.getBlobURL() + "?" + generateReadSASURL(accountInfo, zipArchiveBlob.getBlobName())); } catch (Exception e) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Error occurred while downloading artifact " + e.getMessage()); } return; } for (AzureBlob blob : individualBlobs) { if (blobName.equals(URLDecoder.decode(blob.getBlobName(), StandardCharsets.UTF_8.toString()))) { try { response.sendRedirect2(blob.getBlobURL() + "?" + generateReadSASURL(accountInfo, blob.getBlobName())); } catch (Exception e) { response.sendError(Constants.HTTP_INTERNAL_SERVER_ERROR, "Error occurred while downloading artifact " + e.getMessage()); } return; } } response.sendError(Constants.HTTP_NOT_FOUND, "Azure artifact is not available"); }