[jboss-dev-forums] [Design of OSGi Integration] - Re: Logging and Exception Handling

adrian@jboss.org do-not-reply at jboss.com
Fri Feb 29 10:45:10 EST 2008


"johnbailey" wrote : There are couple places in the OSGI API that expect different behavior than the MC.  One example is the Bundle getEntry and getEntryPaths methods.  These methods should return 'null' in if the entry can not be found within the Bundle.  The call to the DeploymentUnit to get the file will result in a RuntimeException wrapped FileNotFoundException, which makes sense, as the file does not exist.  In this case I think the Bundle methods should catch the Exception and return 'null'.   Should we catch it here, or propagate to client?
  | 

What method are you using? It should return null for not found:

VFSDeploymentUnit or VFSDeploymentResourceLoader

  |    /**
  |     * Get a virtual file
  |     * 
  |     * @param path the relative path of the file
  |     * @return the virtual file or null if not found
  |     */
  |    VirtualFile getFile(String path);
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133260#4133260

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133260



More information about the jboss-dev-forums mailing list