2 Replies Latest reply: Oct 22, 2010 10:05 AM by David Lloyd RSS

[Modules] Should '/' always be used in exported paths regardless of the OS

David Bosschaert Expert

While looking into https://jira.jboss.org/browse/JBAS-8543 I found that jboss-modules expects the exported paths always to be stored using unix dir separators. So if my module exports the org.foo.bar package this should be registered as the path org/foo/bar

 

JBAS-8543 is about running the system on Windows. In our OSGi code we register exported paths with jboss-modules using File.separatorChar, so on Windows that would register the above path as org\foo\bar. The logic in jboss-modules doesn't expect that and can hence not find the resource (or class in this case).

 

So what should the contract be?

* Should we always use '/' and never File.separator? In that case the OSGi code needs to change to follow this rule and all other subsystems need to do this too.

* Should we use File.separator in which case the code in jboss-modules needs to change...