Sorry about the delayed reply. Sure, try/catch that one. I'm all for catching exceptions you don't want bubbling up, as long as you're not creating them intentionally and needlessly. In the case of the io operations, there's not much you can do to avoid them. (The API is a bit unfortunate in that respect.) I can't remember if the original method threw IOException. If it didn't, and you don't want it to now, catch away.
GreG --- Mark Proctor <[EMAIL PROTECTED]> wrote: > I'm looking at applying your faster schema resolver > code, as I have put xml parser back in. > http://jira.jboss.com/jira/browse/JBRULES-235 > So I added in your code as shown, non of the > replacements throw > exceptions this one: > // Try current working directory > { > File file = new File(xsd); > if(file.exists()) { > return new InputSource(new > BufferedInputStream(new > FileInputStream(file))); > } > }. > > Shouldn't we try/catch this, as we don't wanto this > exception bubbling > up to the user? Or is the theory on this one that we > already know the > file exists, thus FileInputStream(...) won't fail - > must admit I'm not > entirely comfortable with that idea. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
