Update VersionSpecificWorkerContextWrapper.java

[6463] version is required in url of resource to identify it
This commit is contained in:
Mangala Ekanayake 2024-11-23 21:42:06 +05:30 committed by GitHub
parent 16df8fa4d0
commit 0fc4f14064
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 6 deletions

View File

@ -502,18 +502,14 @@ public class VersionSpecificWorkerContextWrapper extends I18nBase implements IWo
return null; return null;
} }
String uri = theUri;
// handle profile version, if present
if (theUri.contains("|")) { if (theUri.contains("|")) {
String[] parts = theUri.split("\\|"); String[] parts = theUri.split("\\|");
if (parts.length == 2) { if (parts.length != 2) {
uri = parts[0];
} else {
ourLog.warn("Unrecognized profile uri: {}", theUri); ourLog.warn("Unrecognized profile uri: {}", theUri);
} }
} }
ResourceKey key = new ResourceKey(class_.getSimpleName(), uri); ResourceKey key = new ResourceKey(class_.getSimpleName(), theUri);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
T retVal = (T) myFetchResourceCache.get(key); T retVal = (T) myFetchResourceCache.get(key);