[libpostgresql-jdbc-java] 06/13: The error message reports the column position incorrectly by using ""+i+1 which is (""+i)+1, resulting in a value of 21 instead of 3 for an i value of 2.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:20:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_2_505
in repository libpostgresql-jdbc-java.

commit 2b25a8421dd75fe39742a4816ae77d3cfcae1470
Author: Kris Jurka <books at ejurka.com>
Date:   Thu Mar 29 04:27:57 2007 +0000

    The error message reports the column position incorrectly by using
    ""+i+1 which is (""+i)+1, resulting in a value of 21 instead of 3
    for an i value of 2.
---
 org/postgresql/jdbc2/AbstractJdbc2Statement.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index 89bee5e..1c7f185 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -3,7 +3,7 @@
 * Copyright (c) 2004-2005, PostgreSQL Global Development Group
 *
 * IDENTIFICATION
-*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.96.2.1 2007/01/04 21:59:19 jurka Exp $
+*   $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.96.2.2 2007/02/19 06:04:48 jurka Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -400,7 +400,7 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
                     else
                     {    
 	                    throw new PSQLException (GT.tr("A CallableStatement function was executed and the out parameter {0} was of type {1} however type {2} was registered.",
-	                            new Object[]{""+i+1,
+	                            new Object[]{new Integer(i+1),
 	                                "java.sql.Types=" + columnType, "java.sql.Types=" + functionReturnType[j] }),
 	                      PSQLState.DATA_TYPE_MISMATCH);
                     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list