diff --git a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
index 0d9594e..367ef0c 100644
--- a/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
+++ b/framework/src/main/java/org/apache/felix/framework/FelixResolverState.java
@@ -466,20 +466,8 @@
         // If the existing version range floor is greater than the additional
         // version range's floor, then they are inconflict since we cannot
         // widen the constraint.
-        if (existing.getTargetVersionRange().getLow().compareTo(
-            additional.getTargetVersionRange().getLow()) > 0)
-        {
-            return true;
-        }
-        // If the existing version range ceiling is less than the additional
-        // version range's ceiling, then they are inconflict since we cannot
-        // widen the constraint.
-        if (((existing.getTargetVersionRange().getHigh() != null)
-            && (additional.getTargetVersionRange().getHigh() == null))
-            || ((existing.getTargetVersionRange().getHigh() != null)
-                && (additional.getTargetVersionRange().getHigh() != null)
-                && (existing.getTargetVersionRange().getHigh().compareTo(
-                    additional.getTargetVersionRange().getHigh()) < 0)))
+        if (!existing.getTargetVersionRange().intersects(
+            additional.getTargetVersionRange()))
         {
             return true;
         }
diff --git a/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java b/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
index c313d9d..b3d4a55 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/VersionRange.java
@@ -80,8 +80,37 @@
         return (version.compareTo(m_low) > 0) && (version.compareTo(m_high) < 0);
     }
 
+    public boolean intersects(VersionRange vr)
+    {
+        // Check to see if the passed in floor is less than or equal to
+        // this ceiling and the passed in ceiling is greater than or
+        // equal to this floor.
+        boolean isFloorLessThanCeiling = false;
+        if ((m_high == null)
+            || (m_high.compareTo(vr.getLow()) > 0)
+            || ((m_high.compareTo(vr.getLow()) == 0)
+                && m_isHighInclusive && vr.isLowInclusive()))
+        {
+            isFloorLessThanCeiling = true;
+        }
+        boolean isCeilingGreaterThanFloor = false;
+        if ((vr.getHigh() == null)
+            || (m_low.compareTo(vr.getHigh()) < 0)
+            || ((m_low.compareTo(vr.getHigh()) == 0)
+                && m_isLowInclusive && vr.isHighInclusive()))
+        {
+            isCeilingGreaterThanFloor = true;
+        }
+        return isFloorLessThanCeiling && isCeilingGreaterThanFloor;
+    }
+
     public VersionRange intersection(VersionRange vr)
     {
+        if (!intersects(vr))
+        {
+            return null;
+        }
+
         VersionRange floor = (m_low.compareTo(vr.getLow()) > 0) ? this : vr;
         boolean floorInclusive = (getLow().equals(vr.getLow()))
             ? (isLowInclusive() & vr.isLowInclusive())
