dev@javaserverfaces.java.net

Re: [REVIEW] Fine tuning of parsing/validation code for _05

From: Jason Lee <jason_at_steeplesoft.com>
Date: Tue, 15 May 2007 20:32:04 -0500

The only thing that jumps out at me are possible dangling InputStreams:

DOMSource domSource
     = new DOMSource(db.parse(getInputStream(documentURL),
         documentURL.toExternalForm()));

URL url = DbfFactory.class.getResource(FACES_1_2_XSD);
URLConnection conn = url.openConnection();
conn.setUseCaches(false);
InputStream in = conn.getInputStream();


[Not sure about this one]
if (source != null) {
     return new Input(source.getByteStream());
}

Am I off-base?

-- 
Jason Lee, SCJP
JSF RI Dev Team
http://blogs.steeplesoft.com