db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r479527 - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/ drda/org/apache/derby/loc/drda/ engine/org/apache/derby/loc/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/j9_...
Date Mon, 27 Nov 2006 06:37:27 GMT
Author: myrnavl
Date: Sun Nov 26 22:37:26 2006
New Revision: 479527

URL: http://svn.apache.org/viewvc?view=rev&rev=479527
Log:
DERBY-2110 - correcting typos in a number of messages
- fix involved also updating MessageBuilder.java, because the resulting
  dita file did not correctly replace all quotes when put into html.
- also corrected BlobClob4BlobTest which has the string of message 40X0D
  hardcoded.
- also updated errorCode.out masters, incl. for j9_13 and j9_22, even though
  that's not really needed anymore.


Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java
    db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/errorCode.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/errorCode.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/MessageBuilder.java Sun Nov 26 22:37:26
2006
@@ -552,13 +552,24 @@
         String        propertyText = escapePropertiesText( rawText );
         int             parameterCount = countParameters( rawText );
         String[]     args = getArgs( message );
-        String       displayText = replaceSpecialChars( plugInArgs( rawText, args ) );
 
         if ( parameterCount != args.length )
         {
             throw new Exception( name + " has " + parameterCount + " parameters but " + args.length
+ " nested args." );
         }
 
+        String displayText;
+        if (rawText.indexOf('\'')>=0)
+        {
+            displayText = replaceSpecialChars( escapeTextWithAQuote( rawText ) );
+            displayText = plugInArgs( displayText , args );
+
+        }
+        else
+        {
+            displayText = plugInArgs( replaceSpecialChars( rawText), args ) ;
+        }
+
         ditaWriter.beginTag( "row" );
         {
             ditaWriter.writeTextElement( "entry", "colname=\"col1\"", sqlstate );
@@ -643,7 +654,7 @@
         // add xml angle brackets around the args
         for ( int i = 0; i < count; i++ )
         {
-            cookedArgs[ i ] = "&lt;" + rawArgs[ i ] + "&gt;";
+            cookedArgs[ i ] = "<varname>&lt;" + rawArgs[ i ] + "&gt;</varname>";
         }
 
         return MessageFormat.format( message, cookedArgs );
@@ -729,6 +740,7 @@
         return output;
     }
 
+
     /**
      * <p>
      * Replace newlines with the escape sequence needed by properties files.
@@ -740,6 +752,19 @@
         String output = input.replaceAll( "\n", "\\\\n" );
 
         output = output.replaceAll( "\'", "\'\'" );
+        
+        return output;
+    }
+
+    /**
+     * <p>
+     * Replace single quotes with two single quotes.
+     * Only needed when there are parameters with quotes.
+     * </p>
+     */
+    private static String escapeTextWithAQuote( java.lang.String input )
+    {
+        String output = input.replaceAll( "\'", "\'\'" );
         
         return output;
     }

Modified: db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/loc/drda/servlet_en.properties Sun Nov
26 22:37:26 2006
@@ -59,7 +59,7 @@
 SRV_NewMaxThreads=New maximum number of threads:
 SRV_NewTimeSlice=New thread time slice:
 SRV_Interupt=Connection interrupted.
-SRV_MaxTrys=Could not connect to server after {0} trys.
+SRV_MaxTrys=Could not connect to server after {0} tries.
 SRV_NetworkServerError=Network Server Error
 SRV_Message=Message is:{0}
 SRV_MissingParam=Required parameter not set ("{0}")

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?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- 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 Sun Nov 26 22:37:26
2006
@@ -942,12 +942,12 @@
 
             <msg>
                 <name>40XD0</name>
-                <text>Container has been closed</text>
+                <text>Container has been closed.</text>
             </msg>
 
             <msg>
                 <name>40XD1</name>
-                <text>Container was opened in read-only mode.   </text>
+                <text>Container was opened in read-only mode.</text>
             </msg>
 
             <msg>
@@ -1467,13 +1467,13 @@
 
             <msg>
                 <name>42X46</name>
-                <text>There are multiple functions named '{0}'. Use a the full signature
or the specific name.</text>
+                <text>There are multiple functions named '{0}'. Use the full signature
or the specific name.</text>
                 <arg>functionName</arg>
             </msg>
 
             <msg>
                 <name>42X47</name>
-                <text>There are multiple procedures named '{0}'. Use a the full signature
or the specific name.</text>
+                <text>There are multiple procedures named '{0}'. Use the full signature
or the specific name.</text>
                 <arg>procedureName</arg>
             </msg>
 
@@ -1506,7 +1506,7 @@
 
             <msg>
                 <name>42X52</name>
-                <text>Calling  method ('{0}') using a receiver of the Java primitive
type '{1}" is not allowed.</text>
+                <text>Calling  method ('{0}') using a receiver of the Java primitive
type '{1}' is not allowed.</text>
                 <arg>methodName</arg>
                 <arg>type</arg>
             </msg>
@@ -1608,7 +1608,7 @@
 
             <msg>
                 <name>42X69</name>
-                <text>It is not allowed to reference a field ('{0}') using a referencing
expresssion of the Java primitive type '{1}'.</text>
+                <text>It is not allowed to reference a field ('{0}') using a referencing
expression of the Java primitive type '{1}'.</text>
                 <arg>fieldName</arg>
                 <arg>type</arg>
             </msg>
@@ -2488,7 +2488,7 @@
 
             <msg>
                 <name>58009.C.21</name>
-                <text>Network protocol exception: scldta length, {0}, is invalid for
rdbnam.  The connection has been terminated.</text>
+                <text>Network protocol exception: SCLDTA length, {0}, is invalid for
RDBNAM.  The connection has been terminated.</text>
                 <arg>length</arg>
             </msg>
 
@@ -2523,13 +2523,13 @@
 
             <msg>
                 <name>58009.C.7</name>
-                <text>Network protocol exception: scldta length, {0}, is invalid for
rdbcolid.  The connection has been terminated.</text>
+                <text>Network protocol exception: SCLDTA length, {0}, is invalid for
RDBCOLID.  The connection has been terminated.</text>
                 <arg>length</arg>
             </msg>
 
             <msg>
                 <name>58009.C.8</name>
-                <text>Network protocol exception: scldta length, {0}, is invalid for
pkgid.  The connection has been terminated.</text>
+                <text>Network protocol exception: SCLDTA length, {0}, is invalid for
PKGID.  The connection has been terminated.</text>
                 <arg>length</arg>
             </msg>
 
@@ -3168,13 +3168,13 @@
 
             <msg>
                 <name>XBCXU.S</name>
-                <text>Encryption of an un-encrypted database failed: {0}.</text>
+                <text>Encryption of an un-encrypted database failed: {0}</text>
                 <arg>failureMessage</arg>
             </msg>
 
             <msg>
                 <name>XBCXV.S</name>
-                <text>Encryption of an encrypted database with a new key or a new password
failed: {0}.</text>
+                <text>Encryption of an encrypted database with a new key or a new password
failed: {0}</text>
                 <arg>failureMessage</arg>
             </msg>
 
@@ -3213,7 +3213,7 @@
 
             <msg>
                 <name>XBM08.D</name>
-                <text>Could not instantiage {0} StorageFactory class {1}.</text>
+                <text>Could not instantiate {0} StorageFactory class {1}.</text>
                 <arg>value</arg>
                 <arg>value</arg>
             </msg>
@@ -4189,7 +4189,7 @@
 
             <msg>
                 <name>XJ100.S</name>
-                <text>The scale supplied by the registerOutParameter method does not
match with the setter method. Possible loss of precision!"</text>
+                <text>The scale supplied by the registerOutParameter method does not
match with the setter method. Possible loss of precision!</text>
             </msg>
 
             <msg>
@@ -4609,7 +4609,7 @@
 
             <msg>
                 <name>XSCB4.S</name>
-                <text>A method on a btree open scan has been called prior to positioning
the scan on the first row (ie. no next() call has been made yet).  The current state of the
scan is ({0}).</text>
+                <text>A method on a btree open scan has been called prior to positioning
the scan on the first row (i.e. no next() call has been made yet).  The current state of the
scan is ({0}).</text>
                 <arg>value</arg>
             </msg>
 
@@ -4923,7 +4923,7 @@
 
             <msg>
                 <name>XSDF2.S</name>
-                <text>Exception during creation of file {0} for container, file could
not be removed.  The exeception was: {1}.</text>
+                <text>Exception during creation of file {0} for container, file could
not be removed.  The exception was: {1}.</text>
                 <arg>fileName</arg>
                 <arg>value</arg>
             </msg>
@@ -5164,7 +5164,7 @@
 
             <msg>
                 <name>XSLAL.D</name>
-                <text>log record size {2} exceeded the maximum allowable log file size
{3}. Error encounted in log file {0}, position {1}</text>
+                <text>log record size {2} exceeded the maximum allowable log file size
{3}. Error encountered in log file {0}, position {1}.</text>
                 <arg>value</arg>
                 <arg>number</arg>
                 <arg>logfileName</arg>
@@ -5380,7 +5380,7 @@
 
             <msg>
                 <name>XSTB6.M</name>
-                <text>Cannot substitue a transaction table with another while one is
already in use.</text>
+                <text>Cannot substitute a transaction table with another while one
is already in use.</text>
             </msg>
 
         </family>
@@ -5570,7 +5570,7 @@
 
             <msg>
                 <name>42Z54.U</name>
-                <text>This excepiton stops the statement after parsing - no further
processing is needed.</text>
+                <text>This exception stops the statement after parsing - no further
processing is needed.</text>
             </msg>
 
             <msg>
@@ -6688,7 +6688,7 @@
 
             <msg>
                 <name>C001</name>
-                <text>Class {0} has a unknown certificate type in jar {1}, expecting
X509 certificate.</text>
+                <text>Class {0} has an unknown certificate type in jar {1}, expecting
X509 certificate.</text>
                 <arg>className</arg>
                 <arg>jarName</arg>
             </msg>
@@ -7169,13 +7169,13 @@
 
             <msg>
                 <name>L008</name>
-                <text>Deleteing incompatible old Logfile {0}</text>
+                <text>Deleting incompatible old Logfile {0}</text>
                 <arg>fileName</arg>
             </msg>
 
             <msg>
                 <name>L009</name>
-                <text>Deleteing old Logfile {0}</text>
+                <text>Deleting old Logfile {0}</text>
                 <arg>fileName</arg>
             </msg>
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/errorCode.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/errorCode.out?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/errorCode.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/errorCode.out
Sun Nov 26 22:37:26 2006
@@ -133,7 +133,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM08';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XBM08|Could not instantiage {0} StorageFactory class {1}.                               
                                             |45000      
+XBM08|Could not instantiate {0} StorageFactory class {1}.                               
                                             |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0G';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -282,7 +282,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAL';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encounted
in log file {0}, position {1}             |45000      
+XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encountered
in log file {0}, position {1}.          |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAM';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -400,7 +400,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB6';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSTB6|Cannot substitue a transaction table with another while one is already in use.    
                                             |50000      
+XSTB6|Cannot substitute a transaction table with another while one is already in use.   
                                             |50000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ015';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/errorCode.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/errorCode.out?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/errorCode.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/errorCode.out
Sun Nov 26 22:37:26 2006
@@ -133,7 +133,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM08';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XBM08|Could not instantiage {0} StorageFactory class {1}.                               
                                             |45000      
+XBM08|Could not instantiate {0} StorageFactory class {1}.                               
                                             |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0G';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -282,7 +282,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAL';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encounted
in log file {0}, position {1}             |45000      
+XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encountered
in log file {0}, position {1}.          |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAM';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -400,7 +400,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB6';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSTB6|Cannot substitue a transaction table with another while one is already in use.    
                                             |50000      
+XSTB6|Cannot substitute a transaction table with another while one is already in use.   
                                             |50000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ015';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_22/errorCode.out
Sun Nov 26 22:37:26 2006
@@ -133,7 +133,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM08';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XBM08|Could not instantiage {0} StorageFactory class {1}.                               
                                             |45000      
+XBM08|Could not instantiate {0} StorageFactory class {1}.                               
                                             |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XBM0G';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -282,7 +282,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAL';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encounted
in log file {0}, position {1}             |45000      
+XSLAL|log record size {2} exceeded the maximum allowable log file size {3}. Error encountered
in log file {0}, position {1}.          |45000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSLAM';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
@@ -400,7 +400,7 @@
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XSTB6';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------
-XSTB6|Cannot substitue a transaction table with another while one is already in use.    
                                             |50000      
+XSTB6|Cannot substitute a transaction table with another while one is already in use.   
                                             |50000      
 ij> select * from new org.apache.derby.diag.ErrorMessages() c where sql_state = 'XJ015';
 SQL_&|MESSAGE                                                                       
                                                 |SEVERITY   
 --------------------------------------------------------------------------------------------------------------------------------------------------

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java?view=diff&rev=479527&r1=479526&r2=479527
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
Sun Nov 26 22:37:26 2006
@@ -2634,7 +2634,7 @@
             assertTrue("FAIL - only embedded should be this exception",
                     usingEmbedded());
             assertEquals("FAIL - wrong exception", "ERROR 40XD0: Container " +
-                    "has been closed", ioe.getMessage());
+                    "has been closed.", ioe.getMessage());
         }
 
         rollback();



Mime
View raw message