db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1372814 [1/3] - in /db/derby/code/trunk/java/drda/org/apache/derby: drda/ impl/drda/
Date Tue, 14 Aug 2012 09:53:10 GMT
Author: kahatlen
Date: Tue Aug 14 09:53:09 2012
New Revision: 1372814

URL: http://svn.apache.org/viewvc?rev=1372814&view=rev
Log:
DERBY-5896: Change java/drda source code to use spaces instead of tabs and clean up tab creep in java/client

Align with tab stops if the replaced tab character itself wasn't located on a tab stop.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
    db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePoint.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolException.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAProtocolExceptionInfo.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAResultSet.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAStatement.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAXAProtocol.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DecryptionManager.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DssTrace.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/EXTDTAInputStream.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/EbcdicCcsidManager.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/FdocaConstants.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/SQLTypes.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Session.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetServlet.java Tue Aug 14 09:53:09 2012
@@ -63,8 +63,8 @@ public class NetServlet extends HttpServ
 
     // can be overridden by trips through doGet()
     private volatile String tracingDirectory;
-    private volatile boolean logStatus= false;    /* Logging off */
-    private volatile boolean traceStatus = false;    /* Tracing off */
+    private volatile boolean logStatus= false;  /* Logging off */
+    private volatile boolean traceStatus = false;   /* Tracing off */
 
     private final static int NOT_GIVEN = -2;
     private final static int INVALID = -3;
@@ -240,7 +240,7 @@ public class NetServlet extends HttpServ
 
         form = escapeSingleQuotes(form);
         doAction = escapeSingleQuotes(doAction);
-          if (form.equals(startMessage))
+        if (form.equals(startMessage))
         {
             String logButton = getLogging(request);
             String traceButton = getTrace(request);
@@ -477,7 +477,7 @@ public class NetServlet extends HttpServ
             out.println("Internal Error: Unknown form");
         }
 
-        out.println( "</body>" );     
+        out.println( "</body>" );
         out.println( "</html>" ); 
     }
 
@@ -524,14 +524,14 @@ public class NetServlet extends HttpServ
     }
 
     /**
-     *    Start the network server and attempt to connect to it before
-     *    returning
+     *  Start the network server and attempt to connect to it before
+     *  returning
      *
      * @param localUtil LocalizedResource to use to translate messages
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @exception ServletException throws an exception if error in starting the 
-     *         Network Server during initialization
+     *      Network Server during initialization
      */
     private void runServer
         ( LocalizedResource localUtil, String returnMessage, PrintWriter out )
@@ -602,11 +602,11 @@ public class NetServlet extends HttpServ
         }
     }
     /**
-     *    Display an error form
+     *  Display an error form
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param e        Exception to be displayed
-     * @param returnMessage    localized continue message for continue button on error form
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param e     Exception to be displayed
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      */
     private void printErrorForm
@@ -626,12 +626,12 @@ public class NetServlet extends HttpServ
         out.println( "</html>" );
     }
     /**
-     *    Display an error form
+     *  Display an error form
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param msg    String to be displayed
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param msg   String to be displayed
      * @param out Form PrintWriter
-     * @param returnMessage    localized continue message for continue button on error form
+     * @param returnMessage localized continue message for continue button on error form
      */
     private void printErrorForm
         (
@@ -647,14 +647,14 @@ public class NetServlet extends HttpServ
                 localUtil.getTextMessage("SRV_Message", escapeHTML(msg)) +
                 "</h4>" );
         out.println( "<INPUT type=submit name=form value='"+returnMessage+"'>" );
-        out.println( "</body>" );     
+        out.println( "</body>" );
         out.println( "</html>" ); 
     }
     /**
-     *    Display the current Network server status
+     *  Display the current Network server status
      *
-     * @param localUtil        LocalizedResource to use for localizing messages
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param localUtil     LocalizedResource to use for localizing messages
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      */
     private void displayCurrentStatus
@@ -695,7 +695,7 @@ public class NetServlet extends HttpServ
         }
     }
     /**
-     *    Get the currrent server status by using test connection
+     *  Get the currrent server status by using test connection
      *
      * @return true if server is up and reachable; false; otherwise
      */
@@ -709,10 +709,10 @@ public class NetServlet extends HttpServ
         return false;
     }
     /**
-     *    Shutdown the network server
+     *  Shutdown the network server
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -734,10 +734,10 @@ public class NetServlet extends HttpServ
         return retval;
     }
     /**
-     *    Turn logging of connections on
+     *  Turn logging of connections on
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -760,11 +760,11 @@ public class NetServlet extends HttpServ
         return retval;
     }
     /**
-     *    Change tracing for all sessions 
+     *  Change tracing for all sessions
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param val    if true, turn tracing on, if false turn it off
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param val   if true, turn tracing on, if false turn it off
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -787,12 +787,12 @@ public class NetServlet extends HttpServ
         return retval;
     }
     /**
-     *    Change tracing for a given session
+     *  Change tracing for a given session
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param val    if true, turn tracing on, if false turn it off
-     * @param session    session to trace
-     * @param returnMessage    localized continue message for continue button on error form    
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param val   if true, turn tracing on, if false turn it off
+     * @param session   session to trace
+     * @param returnMessage localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -819,9 +819,9 @@ public class NetServlet extends HttpServ
     /**
      * Set trace directory
      *
-     * @param localUtil    LocalizedResource to use to translate messages
+     * @param localUtil LocalizedResource to use to translate messages
      * @param traceDirectory    directory for trace files
-     * @param returnMessage        localized continue message for continue button on error form    
+     * @param returnMessage     localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -857,10 +857,10 @@ public class NetServlet extends HttpServ
     /**
      * Set Network server parameters
      *
-     * @param localUtil    LocalizedResource to use to translate messages
-     * @param max                maximum number of threads
-     * @param slice                time slice for each connection
-     * @param returnMessage        localized continue message for continue button on error form    
+     * @param localUtil LocalizedResource to use to translate messages
+     * @param max               maximum number of threads
+     * @param slice             time slice for each connection
+     * @param returnMessage     localized continue message for continue button on error form
      * @param out Form PrintWriter
      * @return true if succeeded; false; otherwise
      */
@@ -898,11 +898,11 @@ public class NetServlet extends HttpServ
     /**
      * Get an integer parameter
      *
-     * @param request             HttpServetRequest for  forms
-     * @param name                parameter name
-     * @param fieldKey            Key for the name of the field we're reading.
-     * @param localUtil                LocalizedResource to use in localizing messages
-     * @param returnMessage        localized continue message for continue button on error form    
+     * @param request           HttpServetRequest for  forms
+     * @param name              parameter name
+     * @param fieldKey          Key for the name of the field we're reading.
+     * @param localUtil             LocalizedResource to use in localizing messages
+     * @param returnMessage     localized continue message for continue button on error form
      * @param out Form PrintWriter
      */
     private int getIntParameter
@@ -920,7 +920,7 @@ public class NetServlet extends HttpServ
         if (val == null || val.equals(""))
             return NOT_GIVEN;
         try {
-             retval = (new Integer(val)).intValue();
+            retval = (new Integer(val)).intValue();
         } catch (Exception e) {
             printErrorForm(localUtil,localUtil.getTextMessage("SRV_InvalidVal",
                 val, localUtil.getTextMessage(fieldKey)), returnMessage, out);
@@ -957,9 +957,9 @@ public class NetServlet extends HttpServ
     /**
      * Determine the locale file needed for this browsers preferences
      * Defaults to the settings for derby.locale and derby.codeset if set
-     *        English otherwise if browsers preferences can't be found
+     *      English otherwise if browsers preferences can't be found
      *
-     * @param request             HttpServetRequest for forms
+     * @param request           HttpServetRequest for forms
      * @param locale                Name of locale (return arg)
      * @return the appUI which fits the browsers preferences
      */
@@ -998,7 +998,7 @@ public class NetServlet extends HttpServ
     /**
      * Get locale string from language which may have qvalue set
      * 
-     * @param lang    language string to parse
+     * @param lang  language string to parse
      *
      * @return stripped language string to use in matching
      */
@@ -1017,7 +1017,7 @@ public class NetServlet extends HttpServ
     /**
      * Check if the required translation is available
      *
-     * @param lang    language we are looking for
+     * @param lang  language we are looking for
      * 
      * @return index into language array if found, -1 otherwise;
      */
@@ -1035,7 +1035,7 @@ public class NetServlet extends HttpServ
      * Fix the language code, as some browsers send then in a bad format (for instance, 
      * Firefox sends en-us instead of en_US).
      *
-     * @param lang    language to be fixed
+     * @param lang  language to be fixed
      * 
      * @return fixed version of the language, with _ separating parts and country in upper case
      */

Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java Tue Aug 14 09:53:09 2012
@@ -200,17 +200,17 @@ public class NetworkServerControl{
      * a Network Server on a specified port and InetAddress with given
      * user credentials.
      *
-     * @param address      The IP address of the Network Server host.
-     *                       address cannot be null.
+     * @param address     The IP address of the Network Server host.
+     *                     address cannot be null.
      *
      * @param portNumber  port number server is to used. If <= 0,
-     *                      default port number is used
-     *                         
-     * @param userName      The user name for actions requiring authorization.
-     *                         
-     * @param password      The password for actions requiring authorization.
-     *                         
-     * @throws               Exception on error
+     *                    default port number is used
+     *
+     * @param userName    The user name for actions requiring authorization.
+     *
+     * @param password    The password for actions requiring authorization.
+     *
+     * @throws             Exception on error
      */
     public NetworkServerControl(InetAddress address, int portNumber,
                                 String userName, String password)
@@ -225,11 +225,11 @@ public class NetworkServerControl{
      * a Network Server on the default host and the default port with given
      * user credentials.
      *
-     * @param userName      The user name for actions requiring authorization.
-     *                         
-     * @param password      The password for actions requiring authorization.
-     *                         
-     * @throws               Exception on error
+     * @param userName    The user name for actions requiring authorization.
+     *
+     * @param password    The password for actions requiring authorization.
+     *
+     * @throws             Exception on error
      */
     public NetworkServerControl(String userName, String password)
             throws Exception
@@ -292,7 +292,7 @@ public class NetworkServerControl{
     /**
      * main routine for NetworkServerControl
      *
-     * @param args    array of arguments indicating command to be executed.
+     * @param args  array of arguments indicating command to be executed.
      * See class comments for more information
      */
     public static void main(String args[]) {
@@ -408,7 +408,7 @@ public class NetworkServerControl{
      * Shuts down the Network Server listening on the port and InetAddress
      * specified in the constructor for this NetworkServerControl object.
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void shutdown()
         throws Exception
@@ -420,7 +420,7 @@ public class NetworkServerControl{
      * Check if Network Server is started
      * Excecutes and returns without error if the server has started
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void  ping() throws Exception
     {
@@ -433,7 +433,7 @@ public class NetworkServerControl{
      *
      * @param on true to turn tracing on, false to turn tracing off.
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void trace(boolean on)
         throws Exception
@@ -449,7 +449,7 @@ public class NetworkServerControl{
      *                in the Derby error log if logConnections is on
      * @param on true to turn tracing on, false to turn tracing off.
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void trace(int connNum, boolean on)
         throws Exception
@@ -464,7 +464,7 @@ public class NetworkServerControl{
      *
      * @param on            true to turn on, false to turn  off
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void logConnections(boolean on)
         throws Exception
@@ -479,7 +479,7 @@ public class NetworkServerControl{
      * @param traceDirectory    directory for trace files on machine 
      *                          where server is running
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public void setTraceDirectory(String traceDirectory)
         throws Exception
@@ -492,7 +492,7 @@ public class NetworkServerControl{
      * Network Server. 
      *
      * @return sysinfo output
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public String getSysinfo()
         throws Exception
@@ -506,7 +506,7 @@ public class NetworkServerControl{
      * prepared statements, and memory usage for the running Network Server. 
      *
      * @return run time information
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public String getRuntimeInfo()
         throws Exception
@@ -520,11 +520,11 @@ public class NetworkServerControl{
      * of threads that will be used for JDBC client connections.   setTimeSlice
      * should also be set so that clients will yield appropriately.
      *
-     * @param max        maximum number of connection threads.
+     * @param max       maximum number of connection threads.
      *                  If <= 0, connection threads will be created when 
      *                  there are no free connection threads.
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      * @see #setTimeSlice
      */
     public void setMaxThreads(int max) throws Exception
@@ -536,7 +536,7 @@ public class NetworkServerControl{
     /** Returns the current maxThreads setting for the running Network Server
      * 
      * @return maxThreads setting 
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      * @see #setMaxThreads
      */
     public int getMaxThreads() throws Exception
@@ -551,10 +551,10 @@ public class NetworkServerControl{
      * Set Network Server connection time slice parameter.  
      * This should be set and is only relevant if setMaxThreads > 0.
      *
-     * @param timeslice    number of milliseconds given to each session before yielding to 
-     *                        another session, if <=0, never yield. 
+     * @param timeslice number of milliseconds given to each session before yielding to
+     *                      another session, if <=0, never yield.
      *
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      * @see #setMaxThreads
      */
     public void setTimeSlice(int timeslice) throws Exception
@@ -581,7 +581,7 @@ public class NetworkServerControl{
      * Get current Network server properties
      *
      * @return Properties object containing Network server properties
-     * @exception Exception    throws an exception if an error occurs
+     * @exception Exception throws an exception if an error occurs
      */
     public Properties getCurrentProperties() throws Exception
     {

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/AppRequester.java Tue Aug 14 09:53:09 2012
@@ -36,11 +36,11 @@ class AppRequester
 
     protected static final int UNKNOWN_CLIENT = 0;
 
-    protected static final int DNC_CLIENT = 3;        // derby net client 
+    protected static final int DNC_CLIENT = 3;      // derby net client
 
     private static final int [] MIN_MGR_LEVELS = {
                                             3, // AGENT - JCC comes in at 3
-                                            4, // CCSIDMGR    
+                                            4, // CCSIDMGR
                                             3, // CMNAPPC, 
                                             4, // CMNSYNCPT
                                             5, // CMNTCPIP
@@ -56,17 +56,17 @@ class AppRequester
                                             };
     
     // Application requester information
-    protected String    extnam;            // External Name - EXCSAT
-    protected String    srvnam;            // Server Name - EXCSAT
-    protected String     srvrlslv;        // Server Product Release Level - EXCSAT
-    protected String    srvclsnm;        // Server Class Name - EXCSAT
-    protected String    spvnam;            // Supervisor Name - EXCSAT
-    protected String    prdid;            // Product specific identifier - ACCRDB protected
-    private int[]        managerLevels = new int[CodePoint.MGR_CODEPOINTS.length];
+    protected String    extnam;         // External Name - EXCSAT
+    protected String    srvnam;         // Server Name - EXCSAT
+    protected String    srvrlslv;       // Server Product Release Level - EXCSAT
+    protected String    srvclsnm;       // Server Class Name - EXCSAT
+    protected String    spvnam;         // Supervisor Name - EXCSAT
+    protected String    prdid;          // Product specific identifier - ACCRDB protected
+    private int[]       managerLevels = new int[CodePoint.MGR_CODEPOINTS.length];
     private int         clientType;
-    protected int        versionLevel;
-    protected int        releaseLevel;
-    protected int        modifyLevel;
+    protected int       versionLevel;
+    protected int       releaseLevel;
+    protected int       modifyLevel;
     
 
     // constructor 
@@ -84,7 +84,7 @@ class AppRequester
     /**
      * get the Application requester manager level
      *
-     * @param manager    codepoint for manager we are looking for
+     * @param manager   codepoint for manager we are looking for
      *
      * @return manager level for that manager
      */
@@ -171,8 +171,8 @@ class AppRequester
      * not the CCSID requested, the value returned is FFFF
      * For now, we won't support the CCSIDMGR since JCC doesn't request it.
      *
-     * @param manager    codepoint of the manager
-     * @param managerLevel    level for that manager
+     * @param manager   codepoint of the manager
+     * @param managerLevel  level for that manager
      *
      */
     protected void setManagerLevel(int manager, int managerLevel)
@@ -192,7 +192,7 @@ class AppRequester
     /**
      * Check if the application requester is the same as this one
      *
-     * @param a    application requester to compare to
+     * @param a application requester to compare to
      * @return true if same false otherwise
      */
     protected boolean equals(AppRequester a)
@@ -230,7 +230,7 @@ class AppRequester
      * Check whether two objects are not equal when 1 of the objects could
      * be null
      *
-      * @param a    first object
+     * @param a first object
      * @param b second object
      * @return true if not equals false otherwise
      */

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePoint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePoint.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePoint.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/CodePoint.java Tue Aug 14 09:53:09 2012
@@ -21,9 +21,9 @@
 package org.apache.derby.impl.drda;
 
 // TBD:
-//     organize into separate kinds of code points; impose organizational scheme.
+//   organize into separate kinds of code points; impose organizational scheme.
 // TBD:
-//     reconsider the various SECCHKCD_xx constants, perhaps we should hardwire.
+//   reconsider the various SECCHKCD_xx constants, perhaps we should hardwire.
 
 class CodePoint
 {
@@ -271,10 +271,10 @@ class CodePoint
     // Output override
     static final int OUTOVR = 0x2415;
 
-      //Output override option
+    //Output override option
     static final int OUTOVROPT = 0x2147;
 
-      // Package Consistency Token
+    // Package Consistency Token
     static final int PKGCNSTKN = 0x210D;
 
     // Product Specific Data
@@ -727,9 +727,9 @@ class CodePoint
     static final int SVRCOD_SESDMG = 128;  // Session Damage Severity Code
     
     //---------------------- Security Mechanisms ---------------------------
-    static final int SECMEC_DCESEC = 1;        // Distributed Computing Environment Security
-    static final int SECMEC_USRIDPWD = 3;    // Userid and Password
-    static final int SECMEC_USRIDONL = 4;    // Userid only
+    static final int SECMEC_DCESEC = 1;     // Distributed Computing Environment Security
+    static final int SECMEC_USRIDPWD = 3;   // Userid and Password
+    static final int SECMEC_USRIDONL = 4;   // Userid only
     static final int SECMEC_USRIDNWPWD = 5;  // Userid, Password, and new Password
     static final int SECMEC_USRSBSPWD = 6;  // Userid with substitute password
     static final int SECMEC_USRENCPWD = 7;  // Userid with encrypted password
@@ -738,12 +738,12 @@ class CodePoint
     static final int SECMEC_EUSRIDNWPWD = 10;  // Encrpyted userid and password
 
     //---------------------Security Check Codes ---------------------------
-    static final int SECCHKCD_OK = 0;        // Security info correct and acceptable
-    static final int SECCHKCD_NOTSUPPORTED = 0x01;    // SECMEC value not supported
-    static final int SECCHKCD_SECTKNMISSING_OR_INVALID = 0x0E;    // SECTKN missing or invalid 
-    static final int SECCHKCD_PASSWORDMISSING = 0x10;    // Password missing  
-    static final int SECCHKCD_USERIDMISSING = 0x12;    // User Id missing  
-    static final int SECCHKCD_USERIDINVALID = 0x13;    // Userid invalid
+    static final int SECCHKCD_OK = 0;       // Security info correct and acceptable
+    static final int SECCHKCD_NOTSUPPORTED = 0x01;  // SECMEC value not supported
+    static final int SECCHKCD_SECTKNMISSING_OR_INVALID = 0x0E;  // SECTKN missing or invalid
+    static final int SECCHKCD_PASSWORDMISSING = 0x10;   // Password missing
+    static final int SECCHKCD_USERIDMISSING = 0x12; // User Id missing
+    static final int SECCHKCD_USERIDINVALID = 0x13; // Userid invalid
 
     //----------------------Type Definition Names we care about -----------
     static final String TYPDEFNAM_QTDSQLASC = "QTDSQLASC"; // ASCII
@@ -773,10 +773,10 @@ class CodePoint
     static final int MAXBLKEXT_DEFAULT = MAXBLKEXT_NONE;
 
     //-------------- QRYSCRORN - query scroll orientation values
-    static final int QRYSCRREL = 1;        // relative fetch
-    static final int QRYSCRABS = 2;        // absolute fetch
-    static final int QRYSCRAFT = 3;        // after last row
-    static final int QRYSCRBEF = 4;        // before first row
+    static final int QRYSCRREL = 1;     // relative fetch
+    static final int QRYSCRABS = 2;     // absolute fetch
+    static final int QRYSCRAFT = 3;     // after last row
+    static final int QRYSCRBEF = 4;     // before first row
 
     //---------------OUTOVROPT - output override option values
     static final int OUTOVRFRS = 1;     // Output Override allowed on first CNTQRY
@@ -866,16 +866,16 @@ class CodePoint
 
     protected static int [] MGR_CODEPOINTS = {
                                             AGENT,
-                                            CCSIDMGR,    
+                                            CCSIDMGR,
                                             CMNAPPC, 
-                                            CMNSYNCPT,    
-                                            CMNTCPIP,    
+                                            CMNSYNCPT,
+                                            CMNTCPIP,
                                             DICTIONARY,
                                             RDB,
-                                            RSYNCMGR,    
-                                            SECMGR,    
+                                            RSYNCMGR,
+                                            SECMGR,
                                             SQLAM,
-                                            SUPERVISOR,    
+                                            SUPERVISOR,
                                             SYNCPTMGR,
                                             UNICODEMGR,
                                             XAMGR

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMReader.java Tue Aug 14 09:53:09 2012
@@ -33,18 +33,18 @@ import org.apache.derby.iapi.services.sa
     three layers corresponding to the DDM three-tier architecture. For each layer,
     their is a DSS (Data Stream Structure) defined.
         Layer A     Communications management services
-        Layer B        Agent services
+        Layer B     Agent services
         Layer C     Data management services
     <P>
     At layer A are request, reply and data correlation, structure chaining,
     continuation or termination of chains when errors are detected, interleaving
     and multi-leaving request, reply, and data DSSs for multitasking environments.
     For TCP/IP, the format of the DDM envelope is
-        2 bytes        Length of the data
-        1 byte        'D0' - indicates DDM data
-        1 byte        DDM format byte(DSSFMT) - type of DSS(RQSDSS,RPYDSS), whether it is
+        2 bytes     Length of the data
+        1 byte      'D0' - indicates DDM data
+        1 byte      DDM format byte(DSSFMT) - type of DSS(RQSDSS,RPYDSS), whether it is
                     chained, information about the next chained DSS
-        2 bytes        request correlation identifier
+        2 bytes     request correlation identifier
     <P>
     The correlation identifier ties together a request, the request data and the
     reply.  In a chained DSS, each request has a correlation identifier which
@@ -53,8 +53,8 @@ import org.apache.derby.iapi.services.sa
     <P>
     At layer B are object mapping, object validation and command routing.
     Layer B objects with data 5 bytes less than 32K bytes consist of
-        2 bytes        Length
-        2 bytes        Type of the object (code point)
+        2 bytes     Length
+        2 bytes     Type of the object (code point)
         Object data
     Object data is either SCALAR or COLLECTION data.  Scalar data consists of
     a string of bytes formatted as the class description of the object required.
@@ -62,24 +62,24 @@ import org.apache.derby.iapi.services.sa
     are nested within the length/ code point of the collection.
     <P>
     Layer B objects with data >=32763 bytes long format is 
-        2 bytes        Length - length of class, length, and extended total length fields
+        2 bytes     Length - length of class, length, and extended total length fields
                     (high order bit set, indicating >=32763)
-        2 bytes        Type of the object (code point)
-        n bytes        Extended total length - length of the object
+        2 bytes     Type of the object (code point)
+        n bytes     Extended total length - length of the object
                     (n = Length - 4)
         Object data
     <P>
     At layer C are services each class of DDM object provides.
 
             |-------------------------------------------|
-    Layer C | Specific    |    Specific    |    Specific    |
-            | Commands    |    Replies        | Scalars and    |
+    Layer C | Specific  |   Specific    |   Specific    |
+            | Commands  |   Replies     | Scalars and   |
             | and their |  and their    | Collections   |
             |-------------------------------------------|----------------|
-    Layer B | Commands  |    Reply        | Scalars and   | Communications |
-            |            |   Messages    | Collections    |                |
+    Layer B | Commands  |    Reply      | Scalars and   | Communications |
+            |           |   Messages    | Collections   |                |
             |-----------|---------------|---------------|----------------|
-    Layer A |  RQSDSS   |   RPYDSS        | OBJDSS        | CMNDSS         |
+    Layer A |  RQSDSS   |   RPYDSS      | OBJDSS        | CMNDSS         |
             |           |               |               | Mapped Data    |
             |-----------|---------------|---------------|----------------|
             |                DDM Data Stream Structures                  |
@@ -191,7 +191,7 @@ class DDMReader
      * set null and 0 values
      */
     protected void initialize(DRDAConnThread agent, DssTrace dssTrace)
-      {
+    {
         this.agent = agent;
         this.utf8CcsidManager = new Utf8CcsidManager();
         this.ebcdicCcsidManager = new EbcdicCcsidManager();
@@ -233,20 +233,20 @@ class DDMReader
      *
      * @return true if next DSS has the same correlator as current DSS
      */
-      protected boolean isChainedWithSameID()
-      {
+    protected boolean isChainedWithSameID()
+    {
         return dssIsChainedWithSameID;
-      }
+    }
 
     /**
      * Next DSS has different correlator than current DSS
      *
      * @return true if next DSS has a different correlator than current DSS
      */
-      protected boolean isChainedWithDiffID()
-      {
+    protected boolean isChainedWithDiffID()
+    {
         return dssIsChainedWithDiffID;
-      }
+    }
 
     /**
      * Length of current DDM object
@@ -305,25 +305,25 @@ class DDMReader
     /**
      * Read DSS header
      * DSS Header format is 
-     *     2 bytes    - length
-     *    1 byte    - 'D0'    - indicates DDM data
-     *     1 byte    - DSS format 
-     *        |---|---------|----------|
-     *        | 0    |  flags  |  type    |
-     *        |---|---------|----------|
-     *        | 0 | 1  2  3 | 4 5 6 7  |
-     *        |---|---------|----------|
-     *        bit 0 - '0'
-     *        bit 1 - '0' - unchained, '1' - chained
-     *        bit 2 - '0'    - do not continue on error, '1' - continue on error
-     *        bit 3 - '0' - next DSS has different correlator, '1' - next DSS has
-     *                        same correlator
-     *        type - 1 - Request DSS
-     *             - 2 - Reply DSS
-     *             - 3 - Object DSS
-     *             - 4 - Communications DSS
-     *             - 5 - Request DSS where no reply is expected
-     *    2 bytes - request correlation id
+     *  2 bytes - length
+     *  1 byte  - 'D0'  - indicates DDM data
+     *  1 byte  - DSS format
+     *      |---|---------|----------|
+     *      | 0 |  flags  |  type    |
+     *      |---|---------|----------|
+     *      | 0 | 1  2  3 | 4 5 6 7  |
+     *      |---|---------|----------|
+     *      bit 0 - '0'
+     *      bit 1 - '0' - unchained, '1' - chained
+     *      bit 2 - '0' - do not continue on error, '1' - continue on error
+     *      bit 3 - '0' - next DSS has different correlator, '1' - next DSS has
+     *                      same correlator
+     *      type - 1 - Request DSS
+     *           - 2 - Reply DSS
+     *           - 3 - Object DSS
+     *           - 4 - Communications DSS
+     *           - 5 - Request DSS where no reply is expected
+     *  2 bytes - request correlation id
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -371,7 +371,7 @@ class DDMReader
         // Determine if the current DSS is chained with the
         // next DSS, with the same or different request ID.
         if ((gdsFormatter & DssConstants.DSSCHAIN) == DssConstants.DSSCHAIN) 
-        {    // on indicates structure chained to next structure
+        {   // on indicates structure chained to next structure
             if ((gdsFormatter & DssConstants.DSSCHAIN_SAME_ID) 
                     == DssConstants.DSSCHAIN_SAME_ID) 
             {
@@ -393,7 +393,7 @@ class DDMReader
         {
             // chaining bit not b'1', make sure DSSFMT same id not b'1'
             if ((gdsFormatter & DssConstants.DSSCHAIN_SAME_ID) 
-                    == DssConstants.DSSCHAIN_SAME_ID)    
+                    == DssConstants.DSSCHAIN_SAME_ID)
             {  // Next DSS can not have same correlator
                 agent.throwSyntaxrm(CodePoint.SYNERRCD_CHAIN_OFF_SAME_NEXT_CORRELATOR,
                                    DRDAProtocolException.NO_CODPNT_ARG);
@@ -478,7 +478,7 @@ class DDMReader
         // Determine if the current DSS is chained with the
         // next DSS, with the same or different request ID.
         if ((gdsFormatter & DssConstants.DSSCHAIN) == DssConstants.DSSCHAIN) 
-        {    // on indicates structure chained to next structure
+        {   // on indicates structure chained to next structure
             if ((gdsFormatter & DssConstants.DSSCHAIN_SAME_ID) 
                     == DssConstants.DSSCHAIN_SAME_ID) 
             {
@@ -591,7 +591,7 @@ class DDMReader
                                DRDAProtocolException.NO_CODPNT_ARG);
         }
 
-            // adjust the lengths here.    this is a special case since the
+            // adjust the lengths here. this is a special case since the
             // extended length bytes do not include their own length.
             for (int i = 0; i <= topDdmCollectionStack; i++) {
                 ddmCollectionLenStack[i] -= adjustSize;
@@ -628,9 +628,9 @@ class DDMReader
     }
 
     /**
-     *     Get the next CodePoint from a collection
-     *     @return    NO_CODEPOINT if collection stack is empty or remaining length is
-     *        0; otherwise,  read length and code point
+     *  Get the next CodePoint from a collection
+     *  @return NO_CODEPOINT if collection stack is empty or remaining length is
+     *      0; otherwise,  read length and code point
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -656,9 +656,9 @@ class DDMReader
     }
     /**
      * Get the next CodePoint from a collection and check that it matches the specified
-     *     CodePoint
-     * @param    codePointCheck    - codePoint to check against
-     * @return    codePoint
+     *  CodePoint
+     * @param   codePointCheck  - codePoint to check against
+     * @return  codePoint
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -678,7 +678,7 @@ class DDMReader
 
     /**
      * Read byte value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -700,7 +700,7 @@ class DDMReader
 
     /**
      * Read network short value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -713,7 +713,7 @@ class DDMReader
 
     /**
      * Read signed network short value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -725,7 +725,7 @@ class DDMReader
     }
     /**
      * Read platform short value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -741,7 +741,7 @@ class DDMReader
 
     /**
      * Read network int value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -756,7 +756,7 @@ class DDMReader
 
     /**
      * Read platform int value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -772,7 +772,7 @@ class DDMReader
 
     /**
      * Read network long value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -793,7 +793,7 @@ class DDMReader
     
     /**
      * Read network six byte value and put it in a long v
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -812,7 +812,7 @@ class DDMReader
 
     /**
      * Read platform long value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -828,7 +828,7 @@ class DDMReader
 
     /**
      * Read platform float value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -839,7 +839,7 @@ class DDMReader
 
     /**
      * Read platform double value
-     * @return    value
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -850,9 +850,9 @@ class DDMReader
 
     /**
      * Read a BigDecimal value
-     * @param    precision of the BigDecimal
-     * @param    scale of the BigDecimal
-     * @return    value
+     * @param   precision of the BigDecimal
+     * @param   scale of the BigDecimal
+     * @return  value
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -1027,7 +1027,7 @@ class DDMReader
      */
     ByteArrayInputStream readLOBContinuationStream ()
         throws IOException
-    {        
+    {
         if ( SanityManager.DEBUG ) {
             SanityManager.ASSERT( doingLayerBStreaming );
         }
@@ -1048,7 +1048,7 @@ class DDMReader
      */
     ByteArrayInputStream readLOBContinuationStream (final long desiredLength)
         throws IOException
-    {        
+    {
         try {
             return readLOBChunk(true, desiredLength);
         } catch (DRDAProtocolException e) {
@@ -1071,8 +1071,8 @@ class DDMReader
     private ByteArrayInputStream readLOBChunk
         (final boolean readHeader, final long desiredLength)
         throws DRDAProtocolException
-    {        
-        if (readHeader) {            
+    {
+        if (readHeader) {
             readDSSContinuationHeader();
         }
         
@@ -1220,11 +1220,11 @@ class DDMReader
    /**
     * Convert a range of packed nybbles (up to 9 digits without overflow) to an int.
     * Note that for performance purpose, it does not do array-out-of-bound checking.
-    * @param buffer            buffer to read from
-    * @param offset            offset in the buffer
+    * @param buffer         buffer to read from
+    * @param offset         offset in the buffer
     * @param startNybble        start nybble
     * @param numberOfNybbles    number of nybbles
-    * @return    an int value
+    * @return   an int value
     */
     private int packedNybblesToInt (byte[] buffer,
                                          int offset,
@@ -1259,9 +1259,9 @@ class DDMReader
      * Note that for performance purpose, it does not do array-out-of-bound checking.
      * @param buffer        buffer to read from
      * @param offset        offset in the buffer
-     * @param startNybble        start nybble
-     * @param numberOfNybbles    number of nybbles
-     * @return    an long value
+     * @param startNybble       start nybble
+     * @param numberOfNybbles   number of nybbles
+     * @return  an long value
      */
     private long packedNybblesToLong (byte[] buffer,
                                            int offset,
@@ -1288,13 +1288,13 @@ class DDMReader
         value = value*10 + ((buffer[offset+i] & 0xF0) >>> 4);
       }
 
-       return value;
+      return value;
     }
 
     /**
      * Compute the int array of magnitude from input value segments.
-     * @param    input value segments
-     * @return    array of int magnitudes
+     * @param   input value segments
+     * @return  array of int magnitudes
      */
     private int[] computeMagnitude(int[] input)
     {
@@ -1533,7 +1533,7 @@ class DDMReader
     /**
      * Convert EBCDIC byte array to unicode string
      *
-     * @param     buf    - byte array
+     * @param   buf - byte array
      * @return string
      */
     protected String convertBytes(byte[] buf)
@@ -1600,7 +1600,7 @@ class DDMReader
      *
      * @param desiredDataSize - amount of data we need
      *
-     * @exception    DRDAProtocolException
+     * @exception   DRDAProtocolException
      */
     private void ensureALayerDataInBuffer (int desiredDataSize) 
         throws DRDAProtocolException
@@ -1619,7 +1619,7 @@ class DDMReader
      * The data will be in the buffer after this method is called.
      *
      * @param desiredDataSize - amount of data we need
-     * @param adjustLen    - whether to adjust the remaining lengths
+     * @param adjustLen - whether to adjust the remaining lengths
      *
      * @exception DRDAProtocolException if a protocol error is detected
      */
@@ -1648,7 +1648,7 @@ class DDMReader
      *
      * @param continueDssHeaderCount - amount of data we need
      *
-     * @exception    throws DRDAProtocolException
+     * @exception   throws DRDAProtocolException
      */
     private void compressBLayerData (int continueDssHeaderCount) 
         throws DRDAProtocolException
@@ -1675,7 +1675,7 @@ class DDMReader
 
         // for each of the DSS headers to remove,
         // read out the continuation header and increment the DSS length by the
-        // size of the continuation bytes,    then shift the continuation data as needed.
+        // size of the continuation bytes,  then shift the continuation data as needed.
         int shiftSize = 0;
         int bytesToShift = 0;
         int continueHeaderLength = 0;
@@ -1841,7 +1841,7 @@ class DDMReader
 
     /**
      * This method will attempt to read a minimum number of bytes
-     * from the underlying stream.    This method will keep trying to
+     * from the underlying stream.  This method will keep trying to
      * read bytes until it has obtained at least the minimum number.
      * @param minimumBytesNeeded - minimum required bytes
      *

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java?rev=1372814&r1=1372813&r2=1372814&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java Tue Aug 14 09:53:09 2012
@@ -85,14 +85,14 @@ class DDMWriter
     // DRDA connection thread for this writer
     private DRDAConnThread agent;
 
-    //    This Object tracks the location of the current
-    //    Dss header length bytes.    This is done so
-    //    the length bytes can be automatically
-    //    updated as information is added to this stream.
+    //  This Object tracks the location of the current
+    //  Dss header length bytes.    This is done so
+    //  the length bytes can be automatically
+    //  updated as information is added to this stream.
     private int dssLengthLocation;
 
     // Current correlation ID
-    private    int correlationID;
+    private int correlationID;
 
     // Next correlation ID
     private int nextCorrelationID;
@@ -254,20 +254,20 @@ class DDMWriter
      * the high-order bit to "1", per DDM spec.
      * This means:
      *
-     *    1. One or more continuation DSSes will immediately
-     *         follow the current (continued) DSS.
-     *    2. All continuation DSSes will have a 2-byte
-     *         continuation header, followed by data; in
-     *         other words, chaining state, correlation
-     *        id, dss format info, and code point will
-     *         NOT be included.  All of that info is 
-     *         present ONLY in the FIRST DSS in the
-     *        list of continued DSSes.
-     *
-     *    NOTE: A DSS can be a "continuation" DSS _and_
-     *     a "continued" DSS at the same time.  However,
-     *     the FIRST DSS to be continued canNOT be
-     *    a continuation DSS.
+     *  1. One or more continuation DSSes will immediately
+     *      follow the current (continued) DSS.
+     *  2. All continuation DSSes will have a 2-byte
+     *      continuation header, followed by data; in
+     *      other words, chaining state, correlation
+     *      id, dss format info, and code point will
+     *      NOT be included.  All of that info is
+     *      present ONLY in the FIRST DSS in the
+     *      list of continued DSSes.
+     *
+     *  NOTE: A DSS can be a "continuation" DSS _and_
+     *  a "continued" DSS at the same time.  However,
+     *  the FIRST DSS to be continued canNOT be
+     *  a continuation DSS.
      */
     private void markDssAsContinued(boolean forLob)
     {
@@ -363,7 +363,7 @@ class DDMWriter
      */
     protected void endDdmAndDss ()
     {
-        endDdm();    // updates last DDM object
+        endDdm();   // updates last DDM object
         endDss();
     }
     /**
@@ -453,7 +453,7 @@ class DDMWriter
         int lengthLocation = markStack[--top];
         int length = buffer.position() - lengthLocation;
 
-        // determine if any extended length bytes are needed.    the value returned
+        // determine if any extended length bytes are needed.   the value returned
         // from calculateExtendedLengthByteCount is the number of extended length
         // bytes required. 0 indicates no exteneded length.
         int extendedLengthByteCount = calculateExtendedLengthByteCount (length);
@@ -485,7 +485,7 @@ class DDMWriter
 
             // the two byte length field before the codepoint contains the length
             // of itself, the length of the codepoint, and the number of bytes used
-            // to hold the extended length.    the 2 byte length field also has the first
+            // to hold the extended length. the 2 byte length field also has the first
             // bit on to indicate extended length bytes were used.
             length = extendedLengthByteCount + 4;
             length |= DssConstants.CONTINUATION_BIT;
@@ -527,7 +527,7 @@ class DDMWriter
     /**
      * Write byte
      *
-     * @param     value    byte to be written
+     * @param   value   byte to be written
      */
     protected void writeByte (int value)
     {
@@ -547,7 +547,7 @@ class DDMWriter
     /**
      * Write network short
      *
-     * @param     value    value to be written
+     * @param   value   value to be written
      */
     protected void writeNetworkShort (int value)
     {
@@ -558,7 +558,7 @@ class DDMWriter
     /**
      * Write network int
      *
-     * @param     value    value to be written
+     * @param   value   value to be written
      */
     protected void writeNetworkInt (int value)
     {
@@ -570,8 +570,8 @@ class DDMWriter
     /**
      * Write byte array
      *
-     * @param     buf    byte array to be written
-     * @param    length  - length to write
+     * @param   buf byte array to be written
+     * @param   length  - length to write
      */
     protected void writeBytes (byte[] buf, int length)
     {
@@ -583,9 +583,9 @@ class DDMWriter
     /**
      * Write byte array
      *
-     * @param     buf    byte array to be written
-     * @param    start  - starting position
-     * @param    length  - length to write
+     * @param   buf byte array to be written
+     * @param   start  - starting position
+     * @param   length  - length to write
      */
     protected void writeBytes (byte[] buf, int start, int length)
     {
@@ -604,7 +604,7 @@ class DDMWriter
     /**
      * Write byte array
      *
-     * @param     buf    byte array to be written
+     * @param   buf byte array to be written
      **/
     protected void writeBytes (byte[] buf)
     {
@@ -631,8 +631,8 @@ class DDMWriter
     /**
      * Write code point and 4 bytes
      *
-     * @param     codePoint - code point to write
-     * @param    value  - value to write after code point
+     * @param   codePoint - code point to write
+     * @param   value  - value to write after code point
      */
     void writeCodePoint4Bytes (int codePoint, int value)
     {
@@ -644,8 +644,8 @@ class DDMWriter
     /**
      * Write scalar 1 byte object includes length, codepoint and value
      *
-     * @param     codePoint - code point to write
-     * @param    value  - value to write after code point
+     * @param   codePoint - code point to write
+     * @param   value  - value to write after code point
      */
     void writeScalar1Byte (int codePoint, int value)
     {
@@ -658,8 +658,8 @@ class DDMWriter
     /**
      * Write scalar 2 byte object includes length, codepoint and value
      *
-     * @param     codePoint - code point to write
-     * @param    value  - value to write after code point
+     * @param   codePoint - code point to write
+     * @param   value  - value to write after code point
      */
     protected void writeScalar2Bytes (int codePoint, int value)
     {
@@ -748,7 +748,7 @@ class DDMWriter
     private void beginDss (boolean chainedToNextStructure,
                            int dssType)
     {
-        beginDss(dssType, false);    // false => don't ensure length.
+        beginDss(dssType, false);   // false => don't ensure length.
 
         // always turn on continuation flags... this is helpful for lobs...
         // these bytes will get rest if dss lengths are finalized.
@@ -841,7 +841,7 @@ class DDMWriter
                 try {
                 // Mark current DSS as continued, set its chaining state,
                 // then send the data across.
-                    markDssAsContinued(true);     // true => for lobs
+                    markDssAsContinued(true);   // true => for lobs
                     sendBytes (out,
                            false);
                 
@@ -881,8 +881,8 @@ class DDMWriter
     /**
      * Write scalar object header includes length and codepoint
      *
-     * @param     codePoint - code point to write
-     * @param    dataLength - length of object data
+     * @param   codePoint - code point to write
+     * @param   dataLength - length of object data
      */
     protected void writeScalarHeader (int codePoint, int dataLength)
     {
@@ -895,8 +895,8 @@ class DDMWriter
      * Write scalar string object includes length, codepoint and value
      * the string is converted into the appropriate codeset (EBCDIC)
      *
-     * @param     codePoint - code point to write
-     * @param    string - string to be written
+     * @param   codePoint - code point to write
+     * @param   string - string to be written
      */
     void writeScalarString (int codePoint, String string)
     {
@@ -911,9 +911,9 @@ class DDMWriter
      * Write padded scalar string object includes length, codepoint and value
      * the string is converted into the appropriate codeset (EBCDIC)
      *
-     * @param     codePoint - code point to write
-     * @param    string - string to be written
-     * @param     paddedLength - length to pad string to
+     * @param   codePoint - code point to write
+     * @param   string - string to be written
+     * @param   paddedLength - length to pad string to
      */
     void writeScalarPaddedString (int codePoint, String string, int paddedLength)
     {
@@ -946,10 +946,10 @@ class DDMWriter
     /**
      * Write padded scalar byte array object includes length, codepoint and value
      *
-     * @param     codePoint - code point to write
-     * @param    buf - byte array to be written
-     * @param     paddedLength - length to pad string to
-     * @param    padByte - byte to be used for padding
+     * @param   codePoint - code point to write
+     * @param   buf - byte array to be written
+     * @param   paddedLength - length to pad string to
+     * @param   padByte - byte to be used for padding
      */
     protected void writeScalarPaddedBytes (int codePoint, byte[] buf, int paddedLength, byte padByte)
     {
@@ -963,9 +963,9 @@ class DDMWriter
     /**
      * Write padded scalar byte array object  value
      *
-     * @param    buf - byte array to be written
-     * @param     paddedLength - length to pad string to
-     * @param    padByte - byte to be used for padding
+     * @param   buf - byte array to be written
+     * @param   paddedLength - length to pad string to
+     * @param   padByte - byte to be used for padding
      */
     protected void writeScalarPaddedBytes (byte[] buf, int paddedLength, byte padByte)
     {
@@ -977,8 +977,8 @@ class DDMWriter
     /**
      * Write scalar byte array object includes length, codepoint and value
      *
-     * @param     codePoint - code point to write
-     * @param    buf - byte array to be written
+     * @param   codePoint - code point to write
+     * @param   buf - byte array to be written
      */
     protected void writeScalarBytes (int codePoint, byte[] buf)
     {
@@ -995,7 +995,7 @@ class DDMWriter
     /**
      * Write platform short
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeShort (int v)
     {
@@ -1015,7 +1015,7 @@ class DDMWriter
     /**
      * Write platform int
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeInt (int v)
     {
@@ -1025,7 +1025,7 @@ class DDMWriter
     /**
      * Write platform long
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeLong (long v)
     {
@@ -1036,7 +1036,7 @@ class DDMWriter
     /**
      * Write platform float
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeFloat (float v)
     {
@@ -1046,7 +1046,7 @@ class DDMWriter
     /**
      * Write platform double
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeDouble (double v)
     {
@@ -1056,7 +1056,7 @@ class DDMWriter
     /**
      * Write platform boolean
      *
-     * @param     v    value to be written
+     * @param   v   value to be written
      */
     protected void writeBoolean (boolean v)
     {
@@ -1265,8 +1265,8 @@ class DDMWriter
     /**
      * Write pad bytes using spaceChar
      *
-     * @param   val    value to be written
-     * @param    length        length to be written
+     * @param   val value to be written
+     * @param   length      length to be written
      */
     protected void padBytes (byte val, int length)
     {
@@ -1323,24 +1323,24 @@ class DDMWriter
     /**
      * Write DSS header
      * DSS Header format is
-     *     2 bytes    - length
-     *    1 byte    - 'D0'    - indicates DDM data
-     *     1 byte    - DSS format
-     *        |---|---------|----------|
-     *        | 0    |    flags |    type     |
-     *        |---|---------|----------|
-     *        | 0 | 1    2    3 | 4 5 6 7     |
-     *        |---|---------|----------|
-     *        bit 0 - '0'
-     *        bit 1 - '0' - unchained, '1' - chained
-     *        bit 2 - '0'    - do not continue on error, '1' - continue on error
-     *        bit 3 - '0' - next DSS has different correlator, '1' - next DSS has
-     *                        same correlator
-     *        type - 1 - Request DSS
-     *             - 2 - Reply DSS
-     *             - 3 - Object DSS
-     *             - 4 - Communications DSS
-     *             - 5 - Request DSS where no reply is expected
+     *  2 bytes - length
+     *  1 byte  - 'D0'  - indicates DDM data
+     *  1 byte  - DSS format
+     *      |---|---------|----------|
+     *      | 0 |   flags | type     |
+     *      |---|---------|----------|
+     *      | 0 | 1 2   3 | 4 5 6 7  |
+     *      |---|---------|----------|
+     *      bit 0 - '0'
+     *      bit 1 - '0' - unchained, '1' - chained
+     *      bit 2 - '0' - do not continue on error, '1' - continue on error
+     *      bit 3 - '0' - next DSS has different correlator, '1' - next DSS has
+     *                      same correlator
+     *      type - 1 - Request DSS
+     *           - 2 - Reply DSS
+     *           - 3 - Object DSS
+     *           - 4 - Communications DSS
+     *           - 5 - Request DSS where no reply is expected
      */
     private void beginDss (int dssType, boolean ensureLen)
     {
@@ -1377,7 +1377,7 @@ class DDMWriter
      * Finish a DSS Layer A object.
      * The length of dss object will be calculated based on the difference between the
      * start of the dss, saved on the beginDss call, and the current
-     * offset into the buffer which marks the end of the data.    In the event
+     * offset into the buffer which marks the end of the data.  In the event
      * the length requires the use of continuation Dss headers, one for each 32k
      * chunk of data, the data will be shifted and the continuation headers
      * will be inserted with the correct values as needed.
@@ -1389,7 +1389,7 @@ class DDMWriter
 
         // calculate the total size of the dss and the number of bytes which would
         // require continuation dss headers.    The total length already includes the
-        // the 6 byte dss header located at the beginning of the dss.    It does not
+        // the 6 byte dss header located at the beginning of the dss.   It does not
         // include the length of any continuation headers.
         int totalSize = offset - dssLengthLocation;
         int bytesRequiringContDssHeader = totalSize - DssConstants.MAX_DSS_LENGTH;
@@ -1405,14 +1405,14 @@ class DDMWriter
             if (bytesRequiringContDssHeader % 32765 != 0)
                 contDssHeaderCount++;
 
-            // right now the code will shift to the right.    In the future we may want
+            // right now the code will shift to the right.  In the future we may want
             // to try something fancier to help reduce the copying (maybe keep
             // space in the beginning of the buffer??).
             // the offset points to the next available offset in the buffer to place
             // a piece of data, so the last dataByte is at offset -1.
             // various bytes will need to be shifted by different amounts
             // depending on how many dss headers to insert so the amount to shift
-            // will be calculated and adjusted as needed.    ensure there is enough room
+            // will be calculated and adjusted as needed.   ensure there is enough room
             // for all the conutinuation headers and adjust the offset to point to the
             // new end of the data.
             int dataByte = offset - 1;
@@ -1543,7 +1543,7 @@ class DDMWriter
      *
      * @param ddmSize - size of DDM command
      * @return minimum number of extended length bytes needed. 0 indicates no
-     *     extended length needed.
+     *  extended length needed.
      */
     private int calculateExtendedLengthByteCount (long ddmSize)
     {
@@ -1551,8 +1551,8 @@ class DDMWriter
             return 0;
         // JCC does not support 2 at this time, so we always send
         // at least 4
-        //        else if (ddmSize <= 0xffff)
-        //    return 2;
+        //      else if (ddmSize <= 0xffff)
+        //  return 2;
         else if (ddmSize <= 0xffffffffL)
             return 4;
         else if (ddmSize <= 0xffffffffffffL)
@@ -1621,19 +1621,19 @@ class DDMWriter
         String unscaledStr = b.unscaledValue().abs().toString();
 
         // get precision of the BigDecimal.
-          int bigPrecision = unscaledStr.length();
+        int bigPrecision = unscaledStr.length();
 
         if (bigPrecision > 31)
         {
             clearDdm ();
-              throw new SQLException ("The numeric literal \"" +
+            throw new SQLException ("The numeric literal \"" +
                              b.toString() +
                              "\" is not valid because its value is out of range.",
                              "42820",
                              -405);
         }
         int bigScale = b.scale();
-          int bigWholeIntegerLength = bigPrecision - bigScale;
+        int bigWholeIntegerLength = bigPrecision - bigScale;
         if ( (bigWholeIntegerLength > 0) && (!unscaledStr.equals ("0")) ) {
             // if whole integer part exists, check if overflow.
             int declaredWholeIntegerLength = declaredPrecision - declaredScale;
@@ -1896,7 +1896,7 @@ class DDMWriter
         // last remaining DSS had chaining, so we set "nextCorrelationID"
         // to be 1 greater than whatever the last remaining DSS had as
         // its correlation id.
-             nextCorrelationID =
+            nextCorrelationID =
                 (buffer.getShort(lastDSSBeforeMark + 4) & 0xFFFF) + 1;
         }
 



Mime
View raw message