[jboss-osgi-commits] JBoss-OSGI SVN: r92727 - in projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins: facade/bundle and 2 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Mon Aug 24 02:41:11 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-08-24 02:41:09 -0400 (Mon, 24 Aug 2009)
New Revision: 92727

Modified:
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/deployers/bundle/OSGiBundleClassLoadingDeployer.java
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/framework/AdminPermission.java
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java
Log:
Replace 'todo' with [TODO] so they show up in eclipse

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/deployers/bundle/OSGiBundleClassLoadingDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/deployers/bundle/OSGiBundleClassLoadingDeployer.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/deployers/bundle/OSGiBundleClassLoadingDeployer.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -42,7 +42,7 @@
  * 
  * This deployer maps osgi metadata into our classloading metadata.
  * 
- * todo versions and attributes todo require-bundle, dynamic-imports, etc.
+ * [TODO] versions and attributes [TODO] require-bundle, dynamic-imports, etc.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision: 1.1 $

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleManager.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -86,10 +86,10 @@
    public static final String BEAN_BUNDLE_MANAGER = "OSGiBundleManager";
    
    /** The framework version */
-   private static String OSGi_FRAMEWORK_VERSION = "r4v42"; // todo externalise
+   private static String OSGi_FRAMEWORK_VERSION = "r4v42"; // [TODO] externalise
    
    /** The framework vendor */
-   private static String OSGi_FRAMEWORK_VENDOR = "jboss.org"; // todo externalise
+   private static String OSGi_FRAMEWORK_VENDOR = "jboss.org"; // [TODO] externalise
    
    /** The framework language */
    private static String OSGi_FRAMEWORK_LANGUAGE = Locale.getDefault().getISO3Language(); // REVIEW correct?
@@ -171,7 +171,7 @@
          executor = Executors.newFixedThreadPool(10);
       this.executor = executor;
       
-      // todo populate metadata for system bundle
+      // [TODO] populate metadata for system bundle
       Manifest manifest = new Manifest();
       Attributes attributes = manifest.getMainAttributes();
       attributes.put(new Name(Constants.BUNDLE_NAME), Constants.SYSTEM_BUNDLE_SYMBOLICNAME);
@@ -179,7 +179,7 @@
       OSGiMetaData systemMetaData = new AbstractOSGiMetaData(manifest);
       this.systemBundle = new OSGiSystemBundle(systemMetaData);
       addBundle(systemBundle);
-      // todo integrate lifecycle with the underlying framework for stopping/updating
+      // [TODO] integrate lifecycle with the underlying framework for stopping/updating
       startFramework();
    }
    
@@ -375,10 +375,10 @@
       if (osgiMetaData == null)
       {
          Manifest manifest = unit.getAttachment(Manifest.class);
-         // todo we need a mechanism to construct an OSGiMetaData from an easier factory
+         // [TODO] we need a mechanism to construct an OSGiMetaData from an easier factory
          if (manifest == null)
             manifest = new Manifest();
-         // todo populate some bundle information
+         // [TODO] populate some bundle information
          Attributes attributes = manifest.getMainAttributes();
          attributes.put(new Name(Constants.BUNDLE_NAME), unit.getName());
          attributes.put(new Name(Constants.BUNDLE_SYMBOLICNAME), unit.getName());
@@ -386,7 +386,7 @@
       }
       else
       {
-         // todo look at manifest headers and persistent state for this
+         // [TODO] look at manifest headers and persistent state for this
          unit.setRequiredStage(DeploymentStages.DESCRIBE);
       }
       OSGiBundleState bundleState = new OSGiBundleState(osgiMetaData, unit);
@@ -509,7 +509,7 @@
    {
       try
       {
-         // todo check actually changed state
+         // [TODO] check actually changed state
          deployerClient.change(bundleState.getDeploymentUnit().getName(), DeploymentStages.CLASSLOADER);
          return true;
       }
@@ -779,7 +779,7 @@
    {
       OSGiBundleState systemBundle = getSystemBundle();
       systemBundle.changeState(Bundle.STARTING);
-      // todo start the osgi framework, already installed bundles and start level, etc. (fire frameworkEvent.ERROR for errors)
+      // [TODO] start the osgi framework, already installed bundles and start level, etc. (fire frameworkEvent.ERROR for errors)
       systemBundle.changeState(Bundle.ACTIVE);
       systemBundle.fireFrameworkEvent(FrameworkEvent.STARTED, null);
    }
@@ -800,7 +800,7 @@
          {
             try
             {
-               // todo don't change the  persistent state
+               // [TODO] don't change the  persistent state
                bundle.stop();
             }
             catch (Throwable t)
@@ -829,7 +829,7 @@
          {
             try
             {
-               // todo don't change the  persistent state
+               // [TODO] don't change the  persistent state
                bundle.stop();
             }
             catch (Throwable t)

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiBundleState.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -315,8 +315,8 @@
    public File getDataFile(String filename)
    {
       checkValidBundleContext();
-      BundleStoragePlugin storagePlugin = bundleManager.getPlugin(BundleStoragePlugin.class);
-      return storagePlugin.getDataFile(this, filename);
+      BundleStoragePlugin storagePlugin = bundleManager.getOptionalPlugin(BundleStoragePlugin.class);
+      return storagePlugin != null ? storagePlugin.getDataFile(this, filename) : null;
    }
 
    public URL getEntry(String path)
@@ -376,7 +376,7 @@
       if (noAdminPermission(AdminPermission.RESOURCE))
          return null;
       
-      // todo fragments
+      // [TODO] fragments
       resolve(false);
       
       if (filePattern == null)
@@ -409,7 +409,7 @@
    {
       checkInstalled();
       checkAdminPermission(AdminPermission.CLASS);
-      // todo bundle fragment
+      // [TODO] bundle fragment
       
       try
       {
@@ -428,7 +428,7 @@
       checkInstalled();
       if (noAdminPermission(AdminPermission.RESOURCE))
          return null;
-      // todo bundle fragment
+      // [TODO] bundle fragment
       // return null;
       if (resolve(false) == false)
          return getDeploymentUnit().getResourceLoader().getResource(name);
@@ -441,7 +441,7 @@
       checkInstalled();
       if (noAdminPermission(AdminPermission.RESOURCE))
          return null;
-      // todo bundle fragment 
+      // [TODO] bundle fragment 
       // return null;
       if (resolve(false) == false)
          return getDeploymentUnit().getResourceLoader().getResources(name);
@@ -457,7 +457,7 @@
       if (sm == null)
          return true;
       
-      // todo hasPermission
+      // [TODO] hasPermission
       return true;
    }
 
@@ -725,7 +725,7 @@
       start(0);
    }
 
-   // todo options
+   // [TODO] options
    public void start(int options) throws BundleException
    {
       checkInstalled();
@@ -740,11 +740,11 @@
    /**
     * Start internal
     * 
-    * todo Start Level Service & START_TRANSIENT?
-    * todo START_ACTIVATION_POLICY
-    * todo LAZY_ACTIVATION
-    * todo locks
-    * todo options
+    * [TODO] Start Level Service & START_TRANSIENT?
+    * [TODO] START_ACTIVATION_POLICY
+    * [TODO] LAZY_ACTIVATION
+    * [TODO] locks
+    * [TODO] options
     * @throws Throwable for any error 
     */
    public void startInternal() throws Throwable
@@ -798,7 +798,7 @@
       stop(0);
    }
 
-   // todo options
+   // [TODO] options
    public void stop(int options) throws BundleException
    {
       checkInstalled();
@@ -813,9 +813,9 @@
    /**
     * Stop Internal
     * 
-    * todo Start Level Service & STOP_TRANSIENT?
-    * todo locks
-    * todo options
+    * [TODO] Start Level Service & STOP_TRANSIENT?
+    * [TODO] locks
+    * [TODO] options
     * @throws Throwable for any error
     */
    public void stopInternal() throws Throwable
@@ -885,21 +885,21 @@
 
    public void update() throws BundleException
    {
-      checkAdminPermission(AdminPermission.LIFECYCLE); // todo extension bundles
-      // todo update
+      checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
+      // [TODO] update
       throw new UnsupportedOperationException("update");
    }
 
    public void update(InputStream in) throws BundleException
    {
-      checkAdminPermission(AdminPermission.LIFECYCLE); // todo extension bundles
-      // todo update
+      checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
+      // [TODO] update
       throw new UnsupportedOperationException("update");
    }
 
    public void uninstall() throws BundleException
    {
-      checkAdminPermission(AdminPermission.LIFECYCLE); // todo extension bundles
+      checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
 
       OSGiBundleManager bundleManager = getBundleManager();
       if (bundleManager == null)
@@ -943,15 +943,15 @@
    public Bundle installBundle(String location, InputStream input) throws BundleException
    {
       checkValidBundleContext();
-      checkAdminPermission(AdminPermission.LIFECYCLE); // todo extension bundles
-      // todo installBundle
+      checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
+      // [TODO] installBundle
       throw new UnsupportedOperationException("installBundle");
    }
 
    public Bundle installBundle(String location) throws BundleException
    {
       checkValidBundleContext();
-      checkAdminPermission(AdminPermission.LIFECYCLE); // todo extension bundles
+      checkAdminPermission(AdminPermission.LIFECYCLE); // [TODO] extension bundles
       
       OSGiBundleManager bundleManager = getBundleManager();
       if (bundleManager == null)
@@ -1017,7 +1017,7 @@
     */
    Object getSource(String className)
    {
-      // todo some more efficient way than using the class?
+      // [TODO] some more efficient way than using the class?
       try
       {
          return loadClass(className);

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/facade/bundle/OSGiServiceState.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -167,7 +167,7 @@
     */
    public Object getService()
    {
-      // todo fix race condition with unregistration
+      // [TODO] fix race condition with unregistration
       if (isUnregistered())
          return null;
       checkPermission("get", false);
@@ -536,7 +536,7 @@
          try
          {
             Class<?> clazz = getBundleState().loadClass(className);
-            // todo show classloader information all interfaces for debugging purposes
+            // [TODO] show classloader information all interfaces for debugging purposes
             if (clazz.isInstance(object) == false)
                throw new IllegalArgumentException(object + " of type " + object.getClass().getName()  + " does not implement " + className);
          }

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/framework/AdminPermission.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/framework/AdminPermission.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/framework/AdminPermission.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -28,7 +28,7 @@
 /**
  * AdminPermission.
  *
- * todo this properly
+ * [TODO] this properly
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision: 1.1 $
  */

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java	2009-08-24 06:25:01 UTC (rev 92726)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/main/java/org/jboss/osgi/plugins/metadata/AbstractVersionRange.java	2009-08-24 06:41:09 UTC (rev 92727)
@@ -37,7 +37,7 @@
  * floor ::= version
  * ceiling ::= version
  *
- * todo do we really need this extra class or just use our version range?
+ * [TODO] do we really need this extra class or just use our version range?
  * @author Scott.Stark at jboss.org
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  * @author adrian at jboss.org



More information about the jboss-osgi-commits mailing list