--- orig/BundleContext.java	2010-09-13 09:46:29.000000000 -0700
+++ prop/BundleContext.java	2010-09-13 09:56:24.000000000 -0700
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) OSGi Alliance (2000, 2009). All Rights Reserved.
+ * Copyright (c) OSGi Alliance (and others) (2000, 2009, 2010).
+ * All Rights Reserved.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -88,7 +89,7 @@ public interface BundleContext {
 	 *         <code>PropertyPermission</code> to read the property, and the
 	 *         Java Runtime Environment supports permissions.
 	 */
-	public String getProperty(String key);
+	public String getProperty(String key) throws SecurityException;
 
 	/**
 	 * Returns the <code>Bundle</code> object associated with this
@@ -99,7 +100,7 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no
 	 *         longer valid.
 	 */
-	public Bundle getBundle();
+	public Bundle getBundle() throws IllegalStateException;
 
 	/**
 	 * Installs a bundle from the specified <code>InputStream</code> object.
@@ -163,7 +164,7 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no longer valid.
 	 */
 	public Bundle installBundle(String location, InputStream input)
-			throws BundleException;
+			throws BundleException, IllegalStateException, SecurityException;
 
 	/**
 	 * Installs a bundle from the specified <code>location</code> identifier.
@@ -182,7 +183,8 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no longer valid.
 	 * @see #installBundle(String, InputStream)
 	 */
-	public Bundle installBundle(String location) throws BundleException;
+	public Bundle installBundle(String location)
+			throws BundleException, IllegalStateException, SecurityException;
 
 	/**
 	 * Returns the bundle with the specified identifier.
@@ -257,7 +259,7 @@ public interface BundleContext {
 	 * @see ServicePermission
 	 */
 	public void addServiceListener(ServiceListener listener, String filter)
-			throws InvalidSyntaxException;
+			throws InvalidSyntaxException, IllegalStateException;
 
 	/**
 	 * Adds the specified <code>ServiceListener</code> object to the context
@@ -274,7 +276,8 @@ public interface BundleContext {
 	 *         longer valid.
 	 * @see #addServiceListener(ServiceListener, String)
 	 */
-	public void addServiceListener(ServiceListener listener);
+	public void addServiceListener(ServiceListener listener)
+			throws IllegalStateException;
 
 	/**
 	 * Removes the specified <code>ServiceListener</code> object from the
@@ -288,7 +291,8 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no
 	 *         longer valid.
 	 */
-	public void removeServiceListener(ServiceListener listener);
+	public void removeServiceListener(ServiceListener listener)
+			throws IllegalStateException;
 
 	/**
 	 * Adds the specified <code>BundleListener</code> object to the context
@@ -311,7 +315,8 @@ public interface BundleContext {
 	 * @see BundleEvent
 	 * @see BundleListener
 	 */
-	public void addBundleListener(BundleListener listener);
+	public void addBundleListener(BundleListener listener)
+			throws IllegalStateException, SecurityException;
 
 	/**
 	 * Removes the specified <code>BundleListener</code> object from the
@@ -330,7 +335,8 @@ public interface BundleContext {
 	 *         <code>AdminPermission[context bundle,LISTENER]</code>, and the
 	 *         Java Runtime Environment supports permissions.
 	 */
-	public void removeBundleListener(BundleListener listener);
+	public void removeBundleListener(BundleListener listener)
+			throws IllegalStateException, SecurityException;
 
 	/**
 	 * Adds the specified <code>FrameworkListener</code> object to the context
@@ -348,7 +354,8 @@ public interface BundleContext {
 	 * @see FrameworkEvent
 	 * @see FrameworkListener
 	 */
-	public void addFrameworkListener(FrameworkListener listener);
+	public void addFrameworkListener(FrameworkListener listener)
+			throws IllegalStateException;
 
 	/**
 	 * Removes the specified <code>FrameworkListener</code> object from the
@@ -363,7 +370,8 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no
 	 *         longer valid.
 	 */
-	public void removeFrameworkListener(FrameworkListener listener);
+	public void removeFrameworkListener(FrameworkListener listener)
+			throws IllegalStateException;
 
 	/**
 	 * Registers the specified service object with the specified properties
@@ -435,7 +443,8 @@ public interface BundleContext {
 	 * @see ServiceFactory
 	 */
 	public ServiceRegistration registerService(String[] clazzes,
-			Object service, Dictionary properties);
+			Object service, Dictionary properties)
+			throws IllegalStateException, SecurityException;
 
 	/**
 	 * Registers the specified service object with the specified properties
@@ -460,7 +469,7 @@ public interface BundleContext {
 	 * @see #registerService(String[], Object, Dictionary)
 	 */
 	public ServiceRegistration registerService(String clazz, Object service,
-			Dictionary properties);
+			Dictionary properties) throws IllegalStateException;
 
 	/**
 	 * Returns an array of <code>ServiceReference</code> objects. The returned
@@ -517,7 +526,7 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no longer valid.
 	 */
 	public ServiceReference[] getServiceReferences(String clazz, String filter)
-			throws InvalidSyntaxException;
+			throws IllegalStateException, InvalidSyntaxException;
 
 	/**
 	 * Returns an array of <code>ServiceReference</code> objects. The returned
@@ -569,7 +578,7 @@ public interface BundleContext {
 	 * @since 1.3
 	 */
 	public ServiceReference[] getAllServiceReferences(String clazz,
-			String filter) throws InvalidSyntaxException;
+			String filter) throws IllegalStateException, InvalidSyntaxException;
 
 	/**
 	 * Returns a <code>ServiceReference</code> object for a service that
@@ -600,7 +609,8 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no longer valid.
 	 * @see #getServiceReferences(String, String)
 	 */
-	public ServiceReference getServiceReference(String clazz);
+	public ServiceReference getServiceReference(String clazz)
+			throws IllegalStateException;
 
 	/**
 	 * Returns the service object referenced by the specified
@@ -663,7 +673,9 @@ public interface BundleContext {
 	 * @see #ungetService(ServiceReference)
 	 * @see ServiceFactory
 	 */
-	public Object getService(ServiceReference reference);
+	public Object getService(ServiceReference reference)
+			throws IllegalArgumentException, IllegalStateException,
+				   SecurityException;
 
 	/**
 	 * Releases the service object referenced by the specified
@@ -704,7 +716,8 @@ public interface BundleContext {
 	 * @see #getService
 	 * @see ServiceFactory
 	 */
-	public boolean ungetService(ServiceReference reference);
+	public boolean ungetService(ServiceReference reference)
+			throws IllegalArgumentException, IllegalStateException;
 
 	/**
 	 * Creates a <code>File</code> object for a file in the persistent storage
@@ -731,7 +744,7 @@ public interface BundleContext {
 	 * @throws IllegalStateException If this BundleContext is no
 	 *         longer valid.
 	 */
-	public File getDataFile(String filename);
+	public File getDataFile(String filename) throws IllegalStateException;
 
 	/**
 	 * Creates a <code>Filter</code> object. This <code>Filter</code> object may
@@ -752,5 +765,6 @@ public interface BundleContext {
 	 * @see FrameworkUtil#createFilter(String)
 	 * @since 1.1
 	 */
-	public Filter createFilter(String filter) throws InvalidSyntaxException;
+	public Filter createFilter(String filter)
+			throws IllegalStateException, InvalidSyntaxException;
 }
