[libpostgresql-jdbc-java] 88/128: Reuse PGSQLState object. Add a field for 42704 code.

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


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 a33e21da6e6c52c0b570cc4d2812a455d23bc1aa
Author: Jeremy Whiting <whitingjr at hotmail.com>
Date:   Wed Jul 31 16:23:08 2013 +0100

    Reuse PGSQLState object. Add a field for 42704 code.
---
 org/postgresql/util/PSQLState.java    | 1 +
 org/postgresql/xa/PGXAConnection.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/util/PSQLState.java b/org/postgresql/util/PSQLState.java
index 9713fff..214c44e 100644
--- a/org/postgresql/util/PSQLState.java
+++ b/org/postgresql/util/PSQLState.java
@@ -86,6 +86,7 @@ public class PSQLState implements java.io.Serializable
 
     public final static PSQLState SYNTAX_ERROR = new PSQLState("42601");
     public final static PSQLState UNDEFINED_COLUMN = new PSQLState("42703");
+    public final static PSQLState UNDEFINED_OBJECT = new PSQLState("42704");
     public final static PSQLState WRONG_OBJECT_TYPE = new PSQLState("42809");
     public final static PSQLState NUMERIC_CONSTANT_OUT_OF_RANGE = new PSQLState("42820");
     public final static PSQLState DATA_TYPE_MISMATCH = new PSQLState("42821");
diff --git a/org/postgresql/xa/PGXAConnection.java b/org/postgresql/xa/PGXAConnection.java
index eec7620..4086dc9 100644
--- a/org/postgresql/xa/PGXAConnection.java
+++ b/org/postgresql/xa/PGXAConnection.java
@@ -42,7 +42,6 @@ public class PGXAConnection extends PGPooledConnection implements XAConnection,
      */
     private final BaseConnection conn;
     private final Logger logger;
-    public static final String UNDEFINED_OBJECT = "42704";
 
     /*
      * PGXAConnection-object can be in one of three states:
@@ -414,7 +413,7 @@ public class PGXAConnection extends PGPooledConnection implements XAConnection,
         }
         catch (SQLException ex)
         {
-        	if (UNDEFINED_OBJECT.equals(ex.getSQLState()))
+        	if (PSQLState.UNDEFINED_OBJECT.getState().equals(ex.getSQLState()))
     		{
         		throw new PGXAException(GT.tr("Error rolling back prepared transaction"), ex, XAException.XAER_NOTA);
             }

-- 
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