geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chi Runhua (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (GERONIMO-5172) ImageDownload.java bug in writing to buffer in 'Accessing JDBC in Web applications' tutorial page
Date Thu, 15 Apr 2010 01:45:48 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-5172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Chi Runhua resolved GERONIMO-5172.
----------------------------------

    Fix Version/s: 2.2
       Resolution: Fixed

Thanks for spotting this. 

The sample code was updated accordingly.

Geronimo welcomes all kinds of contributions such as coding, documentation and so on. However,
one can only contribute to Geronimo after the [ICLA|http://www.apache.org/licenses/icla.txt]
was signed.

Anything else, please let us know.

Jeff  

> 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
>            Assignee: Chi Runhua
>            Priority: Trivial
>             Fix For: 2.2
>
>
> 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);' and a check to
make sure there is data to read.
> {noformat} 
> original code:
> while (c != -1) {
>   c = ip.read(b);
>   out.write(b);
>   out.flush();
> }
> fix:
> while (c != -1) {
>   c = ip.read(b);
>   if (c > 0) {
>     out.write(b, 0, c);
>     out.flush();
>   }
> }
> {noformat} 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message