You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by bp...@apache.org on 2008/09/05 01:09:12 UTC

svn commit: r692298 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/types/SQLBinary.java engine/org/apache/derby/loc/messages.xml shared/org/apache/derby/shared/common/reference/MessageId.java

Author: bpendleton
Date: Thu Sep  4 16:09:12 2008
New Revision: 692298

URL: http://svn.apache.org/viewvc?rev=692298&view=rev
Log:
DERBY-961: Error 22001 can include XX-RESOLVE-XX which should be removed

This change is a follow-on to revision 678769, and modifies the string
which is used as a message parameter from a hard-coded string to a string
fetched from a translatable message file, so that the string
"(Binary data value not displayed)" can in the future be translated as
appropriate for different Derby locales.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBinary.java
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBinary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBinary.java?rev=692298&r1=692297&r2=692298&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBinary.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/SQLBinary.java Thu Sep  4 16:09:12 2008
@@ -22,6 +22,7 @@
 package org.apache.derby.iapi.types;
 
 import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.reference.MessageId;
 
 import org.apache.derby.iapi.services.io.ArrayInputStream;
 import org.apache.derby.iapi.services.io.FormatableBitSet;
@@ -42,6 +43,7 @@
 import org.apache.derby.iapi.services.io.FormatIdInputStream;
 
 import org.apache.derby.iapi.services.sanity.SanityManager;
+import org.apache.derby.iapi.services.i18n.MessageService;
 
 import org.apache.derby.iapi.types.BooleanDataValue;
 import org.apache.derby.iapi.types.StringDataValue;
@@ -1053,7 +1055,8 @@
 
 		if (variableLength != -1 && variableLength > declaredLength)
 				throw StandardException.newException(SQLState.LANG_STRING_TRUNCATION, getTypeName(), 
-							"(Binary data value not displayed)",
+							MessageService.getTextMessage(
+								MessageId.BINARY_DATA_HIDDEN),
 							String.valueOf(declaredLength));
 	}
 

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=692298&r1=692297&r2=692298&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Thu Sep  4 16:09:12 2008
@@ -6945,6 +6945,12 @@
                 <text>Maximum depth of nested triggers was exceeded.</text>
             </msg>
 
+            <!-- Message BIN01 used in SQLBinary.java -->
+            <msg>
+                <name>BIN01</name>
+                <text>(Binary data value not displayed)</text>
+            </msg>
+
             <msg>
                 <name>S0022</name>
                 <text>Column '{0}' not found.</text>

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java?rev=692298&r1=692297&r2=692298&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java (original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/MessageId.java Thu Sep  4 16:09:12 2008
@@ -64,6 +64,11 @@
                                                          // derby.system.durability was set to test
 
     /*
+     * SQLBinary.java internal translatable strings
+     */
+    String BINARY_DATA_HIDDEN               = "BIN01";
+
+    /*
      * Raw Store data
      */