Skip to content

Commit 2ff6480

Browse files
committed
Fix useCache alway failed for wdt
1 parent 7dd3a54 commit 2ff6480

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/com/oracle/weblogicx/imagebuilder/cli/menu/CreateImage.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ private List<InstallerFile> gatherRequiredInstallers() throws Exception {
268268
if (wdtModelPath != null && Files.isRegularFile(wdtModelPath)) {
269269
InstallerFile wdtInstaller = new InstallerFile(useCache, InstallerType.WDT, wdtVersion, null, null);
270270
retVal.add(wdtInstaller);
271-
addWDTURL(wdtInstaller.getKey() + "_url");
271+
addWDTURL(wdtInstaller.getKey());
272272
}
273273
retVal.add(new InstallerFile(useCache, InstallerType.fromValue(installerType.toString()), installerVersion,
274274
userId, password));
@@ -279,11 +279,12 @@ private List<InstallerFile> gatherRequiredInstallers() throws Exception {
279279
/**
280280
* Parses wdtVersion and constructs the url to download WDT and adds the url to cache
281281
*
282-
* @param wdtURLKey key in the format wdt_0.17
282+
* @param wdtKey key in the format wdt_0.17
283283
* @throws Exception in case of error
284284
*/
285-
private void addWDTURL(String wdtURLKey) throws Exception {
286-
if (cacheStore.getValueFromCache(wdtURLKey) == null) {
285+
private void addWDTURL(String wdtKey) throws Exception {
286+
String wdtURLKey = wdtKey + "_url";
287+
if (cacheStore.getValueFromCache(wdtKey) == null) {
287288
if (useCache == ALWAYS) {
288289
throw new Exception("CachePolicy prohibits download. Add the required wdt installer to cache");
289290
}

0 commit comments

Comments
 (0)