/** * replaces the version string "current" with the recent available version * * @param path the full resource path */ public static String useRecent(String path) { Args.notEmpty(path, "path"); path = prependWebjarsPathIfMissing(path); if (path.matches(Holder.recentVersionPattern)) { return path.replaceFirst(Holder.replacePattern, "/" + recentVersion(path) + "/"); } return path; }
/** * replaces the version string "current" with the recent available version * * @param path the full resource path * @return The version of webjars resource */ public static String useRecent(String path) { Args.notEmpty(path, "path"); path = prependWebjarsPathIfMissing(path); if (path.matches(Holder.recentVersionPattern)) { return path.replaceFirst(Holder.replacePattern, "/" + recentVersion(path) + "/"); } return path; }