Fixed a small bug in the boot delegation logic that caused delegation to
occur when it should not. (FELIX-25)


git-svn-id: https://svn.apache.org/repos/asf/incubator/felix/trunk@393408 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
index 798fdd1..344e266 100755
--- a/org.apache.felix.framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
+++ b/org.apache.felix.framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
@@ -306,7 +306,7 @@
             // delegated to the parent class loader.
             if ((m_bootPkgWildcards[i] &&
                     (pkgName.startsWith(m_bootPkgs[i]) ||
-                    m_bootPkgs[i].regionMatches(0, pkgName, 0, m_bootPkgs[i].length() - 1)))
+                    m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length())))
                 || (!m_bootPkgWildcards[i] && m_bootPkgs[i].equals(pkgName)))
             {
                 return getClass().getClassLoader().loadClass(name);