/** * Determines if a platform is more specific than the current fallback platform. * * @param requested the requested platform * @param fallback the current fallback platform * @param platform the platform to check. * @return <tt>true</tt> if <tt>platform</tt> is a <tt>fallback</tt> or has the same version as that requested * and the fallback doesn't specify a version */ private boolean moreSpecific(Platform requested, Platform fallback, Platform platform) { boolean result = platform.isA(fallback); if (!result) { if (requested.getVersion() != null && requested.getVersion().equals(platform.getVersion()) && fallback.getVersion() == null) { result = true; } } return result; }
boolean archMatch = arch == platform.getArch(); boolean optArchMatch = platform.getArch() == Arch.UNKNOWN; boolean versionMatch = version != null && equals(version, platform.getVersion()); boolean optVersionMatch = platform.getVersion() == null; boolean symbolicMatch = equals(name, platform.getSymbolicName(), true); if (archMatch)
version = match.getVersion();
match = platform.getVersion() != null && platform.getVersion().equals(model.getVersion());