This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to annotated tag REL9_3_1100 in repository libpostgresql-jdbc-java.
commit 23fa27469ecf91da3687bd6298e51f83d17d9094 Author: halset <[email protected]> Date: Mon Sep 9 12:12:26 2013 +0200 fix for setBlob with large blob --- org/postgresql/jdbc2/AbstractJdbc2Statement.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java index 3b82829..20efb52 100644 --- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java +++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java @@ -3069,8 +3069,8 @@ public abstract class AbstractJdbc2Statement implements BaseStatement // could be buffered, but then the OutputStream returned by LargeObject // is buffered internally anyhow, so there would be no performance // boost gained, if anything it would be worse! - int bytesRemaining = (int)x.length(); - int numRead = l_inStream.read(buf, 0, Math.min(buf.length, bytesRemaining)); + long bytesRemaining = x.length(); + int numRead = l_inStream.read(buf, 0, (int)Math.min((long)buf.length, bytesRemaining)); while (numRead != -1 && bytesRemaining > 0) { bytesRemaining -= numRead; @@ -3078,7 +3078,7 @@ public abstract class AbstractJdbc2Statement implements BaseStatement los.write(buf); // saves a buffer creation and copy in LargeObject since it's full else los.write(buf, 0, numRead); - numRead = l_inStream.read(buf, 0, Math.min(buf.length, bytesRemaining)); + numRead = l_inStream.read(buf, 0, (int)Math.min((long)buf.length, bytesRemaining)); } } catch (IOException se) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

