Skip to content

Commit aaafea9

Browse files
authored
xpath for download URL is not populated with patch version (#147)
1 parent d7dd80b commit aaafea9

File tree

1 file changed

+4
-4
lines changed
  • imagetool/src/main/java/com/oracle/weblogic/imagetool/cachestore

1 file changed

+4
-4
lines changed

imagetool/src/main/java/com/oracle/weblogic/imagetool/cachestore/PatchFile.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private String downloadPatch(CacheStore cacheStore) throws IOException {
219219
// if the patchVersion is specified, narrow the list of patches with the value of patchVersion
220220
String patchXpath = "string(/results/patch";
221221
if (patchVersion != null) {
222-
patchXpath = patchXpath + "[release[@name='%s']]";
222+
patchXpath = String.format(patchXpath + "[release[@name='%s']]", patchVersion);
223223
} else {
224224
String actualVersion = applyXpath(aruInfo, "string(/results/patch/release/@name)");
225225
if (Utils.compareVersions(getVersion(), actualVersion) != 0) {
@@ -236,9 +236,9 @@ private String downloadPatch(CacheStore cacheStore) throws IOException {
236236
}
237237
}
238238

239-
String downloadUrlXpath = patchXpath + "/files/file/download_url/";
240-
String downLoadLink = applyXpath(aruInfo, downloadUrlXpath + "text())");
241-
String downLoadHost = applyXpath(aruInfo, downloadUrlXpath + "@host)");
239+
String downloadUrlXpath = patchXpath + "/files/file/download_url";
240+
String downLoadLink = applyXpath(aruInfo, downloadUrlXpath + "/text())");
241+
String downLoadHost = applyXpath(aruInfo, downloadUrlXpath + "/@host)");
242242
logger.finer("using download URL xpath = {0}, found link={1}, host={2}",
243243
downloadUrlXpath, downLoadLink, downLoadHost);
244244

0 commit comments

Comments
 (0)