diff --git a/org.osgi.core/src/main/java/org/osgi/framework/AdminPermission.java b/org.osgi.core/src/main/java/org/osgi/framework/AdminPermission.java
index c55fc7b..1811791 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/AdminPermission.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/AdminPermission.java
@@ -87,7 +87,7 @@
  * Filter attribute names are processed in a case sensitive manner.
  * 
  * @ThreadSafe
- * @version $Revision: 6867 $
+ * @version $Revision: 7743 $
  */
 
 public final class AdminPermission extends BasicPermission {
@@ -213,6 +213,12 @@
 	private transient volatile Dictionary	properties;
 
 	/**
+	 * ThreadLocal used to determine if we have recursively called
+	 * getProperties.
+	 */
+	private static final ThreadLocal		recurse						= new ThreadLocal();
+
+	/**
 	 * Creates a new <code>AdminPermission</code> object that matches all
 	 * bundles and has all actions. Equivalent to AdminPermission("*","*");
 	 */
@@ -647,7 +653,17 @@
 		if (requested.bundle == null) {
 			return false;
 		}
-		return f.matchCase(requested.getProperties());
+		Dictionary requestedProperties = requested.getProperties();
+		if (requestedProperties == null) {
+			/*
+			 * If the requested properties are null, then we have detected a
+			 * recursion getting the bundle location. So we return true to
+			 * permit the bundle location request in the AdminPermission check
+			 * up the stack to succeed.
+			 */
+			return true;
+		}
+		return f.matchCase(requestedProperties);
 	}
 
 	/**
@@ -808,10 +824,10 @@
 	}
 
 	/**
-	 * Called by <code><@link AdminPermission#implies(Permission)></code> on an
-	 * AdminPermission which was constructed with a Bundle. This method loads a
-	 * dictionary with the filter-matchable properties of this bundle. The
-	 * dictionary is cached so this lookup only happens once.
+	 * Called by <code>implies0</code> on an AdminPermission which was
+	 * constructed with a Bundle. This method loads a dictionary with the
+	 * filter-matchable properties of this bundle. The dictionary is cached so
+	 * this lookup only happens once.
 	 * 
 	 * This method should only be called on an AdminPermission which was
 	 * constructed with a bundle
@@ -823,23 +839,38 @@
 		if (result != null) {
 			return result;
 		}
-		final Dictionary dict = new Hashtable(4);
-		AccessController.doPrivileged(new PrivilegedAction() {
-			public Object run() {
-				dict.put("id", new Long(bundle.getBundleId()));
-				dict.put("location", bundle.getLocation());
-				String name = bundle.getSymbolicName();
-				if (name != null) {
-					dict.put("name", name);
+		/*
+		 * We may have recursed here due to the Bundle.getLocation call in the
+		 * doPrivileged below. If this is the case, return null to allow implies
+		 * to return true.
+		 */
+		final Object mark = recurse.get();
+		if (mark == bundle) {
+			return null;
+		}
+		recurse.set(bundle);
+		try {
+			final Dictionary dict = new Hashtable(4);
+			AccessController.doPrivileged(new PrivilegedAction() {
+				public Object run() {
+					dict.put("id", new Long(bundle.getBundleId()));
+					dict.put("location", bundle.getLocation());
+					String name = bundle.getSymbolicName();
+					if (name != null) {
+						dict.put("name", name);
+					}
+					SignerProperty signer = new SignerProperty(bundle);
+					if (signer.isBundleSigned()) {
+						dict.put("signer", signer);
+					}
+					return null;
 				}
-				SignerProperty signer = new SignerProperty(bundle);
-				if (signer.isBundleSigned()) {
-					dict.put("signer", signer); 
-				}
-				return null;
-			}
-		});
-		return properties = dict;
+			});
+			return properties = dict;
+		}
+		finally {
+			recurse.set(null);
+		}
 	}
 }
 
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/FrameworkUtil.java b/org.osgi.core/src/main/java/org/osgi/framework/FrameworkUtil.java
index 13391ca..b565b86 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/FrameworkUtil.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/FrameworkUtil.java
@@ -39,7 +39,7 @@
  * 
  * @since 1.3
  * @ThreadSafe
- * @version $Revision: 6888 $
+ * @version $Revision: 7761 $
  */
 public class FrameworkUtil {
 	/**
@@ -186,7 +186,7 @@
 	 */
 	public static boolean matchDistinguishedNameChain(String matchPattern,
 			List /* <String> */dnChain) {
-		return DNChainMatching.match(matchPattern, new ArrayList(dnChain));
+		return DNChainMatching.match(matchPattern, dnChain);
 	}
 
 	/**
@@ -1704,11 +1704,11 @@
 		/**
 		 * Check the name/value pairs of the rdn against the pattern.
 		 * 
-		 * @param rdn ArrayList of name value pairs for a given RDN.
-		 * @param rdnPattern ArrayList of name value pattern pairs.
+		 * @param rdn List of name value pairs for a given RDN.
+		 * @param rdnPattern List of name value pattern pairs.
 		 * @return true if the list of name value pairs match the pattern.
 		 */
-		private static boolean rdnmatch(ArrayList rdn, ArrayList rdnPattern) {
+		private static boolean rdnmatch(List rdn, List rdnPattern) {
 			if (rdn.size() != rdnPattern.size()) {
 				return false;
 			}
@@ -1732,7 +1732,7 @@
 			return true;
 		}
 
-		private static boolean dnmatch(ArrayList dn, ArrayList dnPattern) {
+		private static boolean dnmatch(List dn, List dnPattern) {
 			int dnStart = 0;
 			int patStart = 0;
 			int patLen = dnPattern.size();
@@ -1750,8 +1750,7 @@
 				if (dn.size() > patLen) {
 					if (!dnPattern.get(0).equals(STAR_WILDCARD)) {
 						// If the number of rdns do not match we must have a
-						// prefix
-						// map
+						// prefix map
 						return false;
 					}
 					// The rdnPattern and rdn must have the same number of
@@ -1760,8 +1759,8 @@
 				}
 			}
 			for (int i = 0; i < patLen; i++) {
-				if (!rdnmatch((ArrayList) dn.get(i + dnStart),
-						(ArrayList) dnPattern.get(i + patStart))) {
+				if (!rdnmatch((List) dn.get(i + dnStart), (List) dnPattern
+						.get(i + patStart))) {
 					return false;
 				}
 			}
@@ -1769,24 +1768,24 @@
 		}
 
 		/**
-		 * Parses a distinguished name chain pattern and returns an ArrayList
-		 * where each element represents a distinguished name (DN) in the chain
-		 * of DNs. Each element will be either a String, if the element
-		 * represents a wildcard ("*" or "-"), or an ArrayList representing an
-		 * RDN. Each element in the RDN ArrayList will be a String, if the
-		 * element represents a wildcard ("*"), or an ArrayList of Strings, each
-		 * String representing a name/value pair in the RDN.
+		 * Parses a distinguished name chain pattern and returns a List where
+		 * each element represents a distinguished name (DN) in the chain of
+		 * DNs. Each element will be either a String, if the element represents
+		 * a wildcard ("*" or "-"), or a List representing an RDN. Each element
+		 * in the RDN List will be a String, if the element represents a
+		 * wildcard ("*"), or a List of Strings, each String representing a
+		 * name/value pair in the RDN.
 		 * 
 		 * @param dnChain
 		 * @return a list of DNs.
 		 * @throws IllegalArgumentException
 		 */
-		private static ArrayList parseDNchainPattern(String dnChain) {
+		private static List parseDNchainPattern(String dnChain) {
 			if (dnChain == null) {
 				throw new IllegalArgumentException(
 						"The DN chain must not be null.");
 			}
-			ArrayList parsed = new ArrayList();
+			List parsed = new ArrayList();
 			int startIndex = 0;
 			startIndex = skipSpaces(dnChain, startIndex);
 			while (startIndex < dnChain.length()) {
@@ -1814,23 +1813,22 @@
 				startIndex = endIndex + 1;
 				startIndex = skipSpaces(dnChain, startIndex);
 			}
-			parseDNchain(parsed);
-			return parsed;
+			return parseDNchain(parsed);
 		}
 
 		private static List parseDNchain(List chain) {
 			if (chain == null) {
 				throw new IllegalArgumentException("DN chain must not be null.");
 			}
-			// Now we parse is a list of strings, lets make ArrayList of rdn out
-			// of
-			// them
+			chain = new ArrayList(chain);
+			// Now we parse is a list of strings, lets make List of rdn out
+			// of them
 			for (int i = 0; i < chain.size(); i++) {
 				String dn = (String) chain.get(i);
 				if (dn.equals(STAR_WILDCARD) || dn.equals(MINUS_WILDCARD)) {
 					continue;
 				}
-				ArrayList rdns = new ArrayList();
+				List rdns = new ArrayList();
 				if (dn.charAt(0) == '*') {
 					if (dn.charAt(1) != ',') {
 						throw new IllegalArgumentException(
@@ -1870,13 +1868,13 @@
 		 * rdnArray with the extracted RDNs.
 		 * 
 		 * @param dn the distinguished name in canonical form.
-		 * @param rdnArray the array to fill in with RDNs extracted from the dn
+		 * @param rdn the list to fill in with RDNs extracted from the dn
 		 * @throws IllegalArgumentException if a formatting error is found.
 		 */
-		private static void parseDN(String dn, ArrayList rdnArray) {
+		private static void parseDN(String dn, List rdn) {
 			int startIndex = 0;
 			char c = '\0';
-			ArrayList nameValues = new ArrayList();
+			List nameValues = new ArrayList();
 			while (startIndex < dn.length()) {
 				int endIndex;
 				for (endIndex = startIndex; endIndex < dn.length(); endIndex++) {
@@ -1894,7 +1892,7 @@
 				}
 				nameValues.add(dn.substring(startIndex, endIndex));
 				if (c != '+') {
-					rdnArray.add(nameValues);
+					rdn.add(nameValues);
 					if (endIndex != dn.length()) {
 						nameValues = new ArrayList();
 					}
@@ -1912,7 +1910,7 @@
 
 		/**
 		 * This method will return an 'index' which points to a non-wildcard DN
-		 * or the end-of-arraylist.
+		 * or the end-of-list.
 		 */
 		private static int skipWildCards(List dnChainPattern,
 				int dnChainPatternIndex) {
@@ -1928,22 +1926,19 @@
 					// otherwise continue skipping over wild cards
 				}
 				else {
-					if (dnPattern instanceof ArrayList) {
-						// if its an arraylist then we have our 'non-wildcard'
-						// DN
+					if (dnPattern instanceof List) {
+						// if its a list then we have our 'non-wildcard' DN
 						break;
 					}
 					else {
 						// unknown member of the DNChainPattern
 						throw new IllegalArgumentException(
-								"expected String or Arraylist in DN Pattern");
+								"expected String or List in DN Pattern");
 					}
 				}
 			}
-			// i either points to end-of-arraylist, or to the first
-			// non-wildcard
-			// pattern
-			// after dnChainPatternIndex
+			// i either points to end-of-list, or to the first
+			// non-wildcard pattern after dnChainPatternIndex
 			return i;
 		}
 
@@ -1986,9 +1981,8 @@
 				}
 				//
 				// we will now recursively call to see if the rest of the
-				// DNChainPattern
-				// matches increasingly smaller portions of the rest of the
-				// DNChain
+				// DNChainPattern matches increasingly smaller portions of the
+				// rest of the DNChain
 				//
 				if (dnPattern.equals(STAR_WILDCARD)) {
 					// '*' option: only wildcard on 0 or 1
@@ -2008,13 +2002,12 @@
 				// failure
 			}
 			else {
-				if (dnPattern instanceof ArrayList) {
+				if (dnPattern instanceof List) {
 					// here we have to do a deeper check for each DN in the
-					// pattern
-					// until we hit a wild card
+					// pattern until we hit a wild card
 					do {
-						if (!dnmatch((ArrayList) dnChain.get(dnChainIndex),
-								(ArrayList) dnPattern)) {
+						if (!dnmatch((List) dnChain.get(dnChainIndex),
+								(List) dnPattern)) {
 							return false;
 						}
 						// go to the next set of DN's in both chains
@@ -2027,24 +2020,18 @@
 							return true;
 						}
 						// if the DN Chain is finished, but the pattern isn't
-						// finished
-						// then if the rest of the pattern is not wildcard then
-						// we
-						// are
-						// done
+						// finished then if the rest of the pattern is not
+						// wildcard then we are done
 						if (dnChainIndex >= dnChain.size()) {
 							dnChainPatternIndex = skipWildCards(dnChainPattern,
 									dnChainPatternIndex);
 							// return TRUE iff the pattern index moved past the
-							// array-size
-							// (implying that the rest of the pattern is all
-							// wildcards)
+							// list-size (implying that the rest of the pattern
+							// is all wildcards)
 							return dnChainPatternIndex >= dnChainPattern.size();
 						}
 						// if the pattern finished, but the chain continues then
-						// we
-						// have
-						// a mis-match
+						// we have a mis-match
 						if (dnChainPatternIndex >= dnChainPattern.size()) {
 							return false;
 						}
@@ -2062,23 +2049,20 @@
 									dnChainPattern, dnChainPatternIndex);
 						}
 						else {
-							if (!(dnPattern instanceof ArrayList)) {
+							if (!(dnPattern instanceof List)) {
 								throw new IllegalArgumentException(
-										"expected String or Arraylist in DN Pattern");
+										"expected String or List in DN Pattern");
 							}
 						}
 						// if we are here, then we will just continue to the
-						// match
-						// the
-						// next set of DN's from the DNChain, and the
-						// DNChainPattern
-						// since both are array-lists
+						// match the next set of DN's from the DNChain, and the
+						// DNChainPattern since both are lists
 					} while (true);
 					// should never reach here?
 				}
 				else {
 					throw new IllegalArgumentException(
-							"expected String or Arraylist in DN Pattern");
+							"expected String or List in DN Pattern");
 				}
 			}
 			// if we get here, the the default return is 'mis-match'
@@ -2124,16 +2108,20 @@
 			try {
 				parsedDNChain = parseDNchain(dnChain);
 			}
-			catch (IllegalArgumentException e) {
-				throw (IllegalArgumentException) new IllegalArgumentException(
-						"Invalid DN chain: " + toString(dnChain)).initCause(e);
+			catch (RuntimeException e) {
+				IllegalArgumentException iae = new IllegalArgumentException(
+						"Invalid DN chain: " + toString(dnChain));
+				iae.initCause(e);
+				throw iae;
 			}
 			try {
 				parsedDNPattern = parseDNchainPattern(pattern);
 			}
-			catch (IllegalArgumentException e) {
-				throw (IllegalArgumentException) new IllegalArgumentException(
-						"Invalid match pattern: " + pattern).initCause(e);
+			catch (RuntimeException e) {
+				IllegalArgumentException iae = new IllegalArgumentException(
+						"Invalid match pattern: " + pattern);
+				iae.initCause(e);
+				throw iae;
 			}
 			return dnChainMatch(parsedDNChain, 0, parsedDNPattern, 0);
 		}
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/PackagePermission.java b/org.osgi.core/src/main/java/org/osgi/framework/PackagePermission.java
index fc319e8..da2f540 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/PackagePermission.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/PackagePermission.java
@@ -56,7 +56,7 @@
  * which is deprecated, implies the <code>import</code> action.
  * 
  * @ThreadSafe
- * @version $Revision: 6530 $
+ * @version $Revision: 7189 $
  */
 
 public final class PackagePermission extends BasicPermission {
@@ -165,9 +165,9 @@
 	 *        only be specified if the specified action is <code>import</code>.
 	 * @param actions <code>exportonly</code>,<code>import</code> (canonical
 	 *        order).
-	 * @throw IllegalArgumentException If the specified name is a filter
-	 *        expression and either the specified action is not
-	 *        <code>import</code> or the filter has an invalid syntax.
+	 * @throws IllegalArgumentException If the specified name is a filter
+	 *         expression and either the specified action is not
+	 *         <code>import</code> or the filter has an invalid syntax.
 	 */
 	public PackagePermission(String name, String actions) {
 		this(name, parseActions(actions));
@@ -188,8 +188,8 @@
 	 * @param name The name of the requested package to import.
 	 * @param exportingBundle The bundle exporting the requested package.
 	 * @param actions The action <code>import</code>.
-	 * @throw IllegalArgumentException If the specified action is not
-	 *        <code>import</code> or the name is a filter expression.
+	 * @throws IllegalArgumentException If the specified action is not
+	 *         <code>import</code> or the name is a filter expression.
 	 * @since 1.5
 	 */
 	public PackagePermission(String name, Bundle exportingBundle, String actions) {
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/ServicePermission.java b/org.osgi.core/src/main/java/org/osgi/framework/ServicePermission.java
index d1fb70f..d2f3c31 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/ServicePermission.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/ServicePermission.java
@@ -51,7 +51,7 @@
  * <code>ServicePermission</code> to get the specific service.
  * 
  * @ThreadSafe
- * @version $Revision: 6530 $
+ * @version $Revision: 7189 $
  */
 
 public final class ServicePermission extends BasicPermission {
@@ -166,9 +166,9 @@
 	 * 
 	 * @param name The service class name
 	 * @param actions <code>get</code>,<code>register</code> (canonical order)
-	 * @throw IllegalArgumentException If the specified name is a filter
-	 *        expression and either the specified action is not <code>get</code>
-	 *        or the filter has an invalid syntax.
+	 * @throws IllegalArgumentException If the specified name is a filter
+	 *         expression and either the specified action is not
+	 *         <code>get</code> or the filter has an invalid syntax.
 	 */
 	public ServicePermission(String name, String actions) {
 		this(name, parseActions(actions));
@@ -188,8 +188,8 @@
 	 * 
 	 * @param reference The requested service.
 	 * @param actions The action <code>get</code>.
-	 * @throw IllegalArgumentException If the specified action is not
-	 *        <code>get</code> or reference is <code>null</code>.
+	 * @throws IllegalArgumentException If the specified action is not
+	 *         <code>get</code> or reference is <code>null</code>.
 	 * @since 1.5
 	 */
 	public ServicePermission(ServiceReference reference, String actions) {
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/EventHook.java b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/EventHook.java
index fe21fba..1249493 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/EventHook.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/EventHook.java
@@ -28,7 +28,7 @@
  * (register, modify, and unregister service) operations.
  * 
  * @ThreadSafe
- * @version $Revision: 6860 $
+ * @version $Revision: 6967 $
  */
 
 public interface EventHook {
@@ -50,5 +50,5 @@
 	 *        synchronized.
 	 */
 	void event(ServiceEvent event,
-			Collection/* <? extends BundleContext> */contexts);
+			Collection/* <BundleContext> */contexts);
 }
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/FindHook.java b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/FindHook.java
index 02044f3..0de1f0b 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/FindHook.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/FindHook.java
@@ -28,7 +28,7 @@
  * (get service references) operations.
  * 
  * @ThreadSafe
- * @version $Revision: 6860 $
+ * @version $Revision: 6967 $
  */
 
 public interface FindHook {
@@ -59,5 +59,5 @@
 	 */
 	void find(BundleContext context, String name, String filter,
 			boolean allServices,
-			Collection/* <? extends ServiceReference> */references);
+			Collection/* <ServiceReference> */references);
 }
diff --git a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/ListenerHook.java b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/ListenerHook.java
index 7ee855b..5934c0c 100644
--- a/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/ListenerHook.java
+++ b/org.osgi.core/src/main/java/org/osgi/framework/hooks/service/ListenerHook.java
@@ -28,7 +28,7 @@
  * addition and removal.
  * 
  * @ThreadSafe
- * @version $Revision: 6906 $
+ * @version $Revision: 6967 $
  */
 
 public interface ListenerHook {
@@ -46,7 +46,7 @@
 	 *        result in an <code>UnsupportedOperationException</code>. The
 	 *        collection is not synchronized.
 	 */
-	void added(Collection/* <? extends ListenerInfo> */listeners);
+	void added(Collection/* <ListenerInfo> */listeners);
 
 	/**
 	 * Removed listeners hook method. This method is called to provide the hook
@@ -60,7 +60,7 @@
 	 *        will result in an <code>UnsupportedOperationException</code>. The
 	 *        collection is not synchronized.
 	 */
-	void removed(Collection/* <? extends ListenerInfo> */listeners);
+	void removed(Collection/* <ListenerInfo> */listeners);
 
 	/**
 	 * Information about a Service Listener. This interface describes the bundle
