Fix the setXXXStream methods. If passed a null InputStream, convert
Kris Jurka <books@ejurka.com>
Fix the setXXXStream methods. If passed a null InputStream, convert this to a setNull call. The code originally would try to read the whole stream in one call to read(), but this doesn't work. The InputStream API makes it clear you must be prepared to loop and continue reading if you didn't get the whole request on the first try. Per report from Martin Holz.
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java | modified | +66 −50 |
| src/interfaces/jdbc/org/postgresql/test/jdbc2/Jdbc2TestSuite.java | modified | +1 −0 |
| src/interfaces/jdbc/org/postgresql/test/jdbc2/PreparedStatementTest.java | added | +91 −0 |