@Override public boolean equals(Object o) { if (o instanceof Version) { return compareTo((Version) o) == 0; } return false; }
@Override public boolean equals(Object o) { if (o instanceof Version) { return compareTo((Version) o) == 0; } return false; }
@Override public boolean equals(Object o) { if (o instanceof Version) { return compareTo((Version) o) == 0; } return false; }
/** * Internal isEmpty behavior. * * @return {@code true} if this version range is empty; {@code false} * otherwise. */ private boolean isEmpty0() { if (ceilingVersion == null) { // infinity return false; } int comparison = floorVersion.compareTo(ceilingVersion); if (comparison == 0) { // endpoints equal return !isFloorInclusive || !isCeilingInclusive; } return comparison > 0; // true if left > right }
/** * Internal isEmpty behavior. * * @return {@code true} if this version range is empty; {@code false} * otherwise. */ private boolean isEmpty0() { if (ceilingVersion == null) { // infinity return false; } int comparison = floorVersion.compareTo(ceilingVersion); if (comparison == 0) { // endpoints equal return !isFloorInclusive || !isCeilingInclusive; } return comparison > 0; // true if left > right }
private void assertCompGt(Version v1, Version v2) { assertTrue(v1.compareTo(v2) > 0); } }
private void assertCompLt(Version v1, Version v2) { assertTrue(v1.compareTo(v2) < 0); }
private void assertCompEq(Version v1, Version v2) { assertTrue(v1.compareTo(v2) == 0); }
if (ATT_FRAMEWORK_VERSION.equals(key)) { frameworkVersion = (String) bundleHeaders.get(key); if (version.compareTo(Version.parse(frameworkVersion)) < 0) {
if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) { String message = "Bundle " + parsed.getLocation() + " requests an unrecognized framework version "
new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion .getMicro(), floorVersion.getRevision() + 1); return adjacent1.compareTo(ceilingVersion) >= 0; new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion .getMicro(), floorVersion.getRevision() + 2); return adjacent2.compareTo(ceilingVersion) >= 0;
new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion .getMicro(), floorVersion.getRevision() + 1); return adjacent1.compareTo(ceilingVersion) >= 0; new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion .getMicro(), floorVersion.getRevision() + 2); return adjacent2.compareTo(ceilingVersion) >= 0;
/** * Parses the manifest. * @return The manifest. Note that the classes/classloaders will * not be populated yet. That is to be done at a higher-level. * @throws ConfigurationException If there were any structural problems. */ public ConnectorBundleManifest parse() throws ConfigurationException { String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION); String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME); String bundleVersion =getRequiredAttribute(ATT_BUNDLE_VERSION); if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) { String message = "Bundle " + _fileName + " requests an unrecognized " + "framework version " + frameworkVersion + " but available is " + FrameworkUtil.getFrameworkVersion().getVersion(); throw new ConfigurationException(message); } ConnectorBundleManifest rv = new ConnectorBundleManifest(); rv.setFrameworkVersion(frameworkVersion); rv.setBundleName(bundleName); rv.setBundleVersion(bundleVersion); return rv; }
/** * Parses the manifest. * * @return The manifest. Note that the classes/classloaders will not be populated yet. That is to be done at a * higher-level. * @throws ConfigurationException if there were any structural problems. */ public ConnectorBundleManifest parse() throws ConfigurationException { String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION); String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME); String bundleVersion = getRequiredAttribute(ATT_BUNDLE_VERSION); if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) { String message = "Bundle " + fileName + " requests an unrecognized " + "framework version " + frameworkVersion + " but available is " + FrameworkUtil.getFrameworkVersion().getVersion(); throw new ConfigurationException(message); } ConnectorBundleManifest rv = new ConnectorBundleManifest(); rv.setFrameworkVersion(frameworkVersion); rv.setBundleName(bundleName); rv.setBundleVersion(bundleVersion); return rv; }
/** * Parses the manifest. * * @return The manifest. Note that the classes/classloaders will not be populated yet. That is to be done at a * higher-level. * @throws ConfigurationException if there were any structural problems. */ public ConnectorBundleManifest parse() throws ConfigurationException { String frameworkVersion = getRequiredAttribute(ATT_FRAMEWORK_VERSION); String bundleName = getRequiredAttribute(ATT_BUNDLE_NAME); String bundleVersion = getRequiredAttribute(ATT_BUNDLE_VERSION); if (FrameworkUtil.getFrameworkVersion().compareTo(Version.parse(frameworkVersion)) < 0) { String message = "Bundle " + fileName + " requests an unrecognized " + "framework version " + frameworkVersion + " but available is " + FrameworkUtil.getFrameworkVersion().getVersion(); throw new ConfigurationException(message); } ConnectorBundleManifest rv = new ConnectorBundleManifest(); rv.setFrameworkVersion(frameworkVersion); rv.setBundleName(bundleName); rv.setBundleVersion(bundleVersion); return rv; }