This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6816 - Resources loading: slight inconsistency in the code
Summary: Resources loading: slight inconsistency in the code
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: Other All
: P2 enhancement
Target Milestone: ---
Assignee: Abel Rionda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 6815
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-16 10:14 UTC by fd
Modified: 2009-04-20 11:36 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-04-16 10:14:22 UTC
Not a bug per se, but the library uses two different ways to load resources:
 1. through a call to getClass().getResourceAsStream() in MobileOKCatalog and XhtmlContent to resolve entities.
 2. through a call to getClassLoader().getResourceAsStream() in DOMUtils to resolved XSLT stylesheets.

That is almost the same thing, but there is a slight difference on the way paths are handled (absolute vs. relative). Sticking to one convention seems a good idea.

For an explanation of the difference, see, e.g.:
http://www.javaworld.com/javaworld/javaqa/2003-08/01-qa-0808-property.html?page=2

The convention to use depends on how we resolve bug 6815 to allow for more flexibility in XSLT paths. First one is probably better
Comment 1 fd 2009-04-20 11:36:02 UTC
Resolution of bug 6815 de facto fixed the inconsistency: getClass().getResourceAsStream() is used throughout the mobileOK Checker.