ImageDownload.java bug in writing to buffer in 'Accessing JDBC in Web
applications' tutorial page
-------------------------------------------------------------------------------------------------
Key: GERONIMO-5172
URL: https://issues.apache.org/jira/browse/GERONIMO-5172
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: documentation
Affects Versions: 2.2
Environment: N/A
Reporter: Scott Oberg
Priority: Trivial
The 'Accessing JDBC in Web applications' page in the tutorial contains a bug in
the ImageDownload.java sample code.
http://cwiki.apache.org/GMOxDOC22/accessing-jdbc-in-web-applications.html
The line 'out.write(b);' should be replaced with 'out.write(b, 0, c);'
original code:
while (c != -1) {
c = ip.read(b);
out.write(b);
out.flush();
}
fix:
while (c != -1) {
c = ip.read(b);
out.write(b, 0, c);
out.flush();
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.