Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4bb71ef

Browse files
author
Dave Cramer
committed
binary stream patch by Kris Jurka fixes empty stream failure
1 parentf9d3ed6 commit4bb71ef

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
importjava.sql.Types;
2727
importjava.util.Vector;
2828

29-
/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.42 2003/11/29 19:52:10 pgsql Exp $
29+
/* $PostgreSQL: pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java,v 1.43 2003/12/12 00:26:20 davec Exp $
3030
* This class defines methods of the jdbc1 specification. This class is
3131
* extended by org.postgresql.jdbc2.AbstractJdbc2Statement which adds the jdbc2
3232
* methods. The real Statement class (for jdbc1) is org.postgresql.jdbc1.Jdbc1Statement
@@ -1479,6 +1479,11 @@ public void setBinaryStream(int parameterIndex, InputStream x, int length) throw
14791479
{
14801480
setBytes(parameterIndex,l_bytes);
14811481
}
1482+
// x.read will return -1 not 0 on an empty InputStream
1483+
elseif (l_bytesRead == -1)
1484+
{
1485+
setBytes(parameterIndex,newbyte[0]);
1486+
}
14821487
else
14831488
{
14841489
//the stream contained less data than they said

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp