in extscript-core-root/extscript-core/src/main/java/org/apache/myfaces/extensions/scripting/jsf/resources/deprecated/ExternalContextResourceLoader.java [103:136]
public String getLibraryVersion(String path)
{
String libraryVersion = null;
Set<String> libraryPaths = this.getResourcePaths(path);
path = getPrefix() + '/' + path;
if (null != libraryPaths && !libraryPaths.isEmpty())
{
// Look in the libraryPaths for versioned libraries.
// If one or more versioned libraries are found, take
// the one with the "highest" version number as the value
// of libraryVersion. If no versioned libraries
// are found, let libraryVersion remain null.
for (Iterator<String> it = libraryPaths.iterator(); it.hasNext();)
{
String libraryPath = it.next();
String version = libraryPath.substring(path.length());
if (VERSION_CHECKER.matcher(version).matches())
{
version = version.substring(1, version.length() - 1);
if (libraryVersion == null)
{
libraryVersion = version;
}
else if (getVersionComparator().compare(libraryVersion, version) < 0)
{
libraryVersion = version;
}
}
}
}
return libraryVersion;
}