db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1478635 [2/5] - in /db/derby/code/trunk/java: client/org/apache/derby/client/ client/org/apache/derby/client/am/ client/org/apache/derby/client/net/ client/org/apache/derby/jdbc/ engine/org/apache/derby/iapi/services/info/ testing/org/apac...
Date Fri, 03 May 2013 03:42:16 GMT
Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientStatement.java Fri May  3 03:42:14 2013
@@ -75,7 +75,6 @@ public class ClientStatement implements 
 
     // Use -1, if there is no update count returned, ie. when result set is returned. 0 is a valid update count for DDL.
     long updateCount_ = -1L;
-    int returnValueFromProcedure_;
 
     // Enumeration of the flavors of statement execute call used.
     static final int executeQueryMethod__ = 1;
@@ -93,10 +92,12 @@ public class ClientStatement implements 
 
     // sqlUpdateMode_ is only set when the sqlMode_ == isUpdate__
     int sqlUpdateMode_ = 0;
+
     // Enum for sqlUpdateMode_:
-    public final static int isCommitSql__ = 0x1;
-    public final static int isRollbackSql__ = 0x2;
-    final static int isPositionedUpdateDeleteSql__ = 0x10;
+    //
+    // public final static int isCommitSql__ = 0x1;   (unused)
+    // public final static int isRollbackSql__ = 0x2; (unused)
+    // final static int isPositionedUpdateDeleteSql__ = 0x10;  (unused)
     final static int isInsertSql__ = 0x20;        // used to recognize "insert" for auto-generated keys
     final static int isDeleteSql__ = 0x40;        // used to recognize "delete" for parsing cursorname
     final static int isUpdateSql__ = 0x80;        // used to recognize "update" for parsing cursorname
@@ -180,32 +181,33 @@ public class ClientStatement implements 
     // Scrollable cursor attributes
     public int resultSetType_ = ResultSet.TYPE_FORWARD_ONLY;
     public int resultSetConcurrency_ = ResultSet.CONCUR_READ_ONLY;
-    public int resultSetHoldability_;
+    int resultSetHoldability_;
+
     // This is ignored by the driver if this is zero.
     // For the net forward-only result set, if fetchSize is unset, we let the server return however many rows will fit in a query block.
     // For the net scrollable result set, then we use a default of 64 rows.
-    public int fetchSize_ = 0;
-    public int fetchDirection_ = ResultSet.FETCH_FORWARD;
+    int fetchSize_ = 0;
+    int fetchDirection_ = ResultSet.FETCH_FORWARD;
 
     // Conceptually this doesn't belong in Statement, but belongs in PreparedStatement,
     // since Statement doesn't know about params, so we're just putting it here perhaps temporarily,
     // Used for callable statement OUT paramters.
-    public Cursor singletonRowData_ = null;
+    Cursor singletonRowData_ = null;
 
     // number of invisible result sets returned from a stored procedure.
-    public int numInvisibleRS_ = 0;
+    private int numInvisibleRS_ = 0;
 
     // This is a cache of the attributes to be sent on prepare.
     // Think about caching the entire prepare DDM string for the re-prepares
     public String cursorAttributesToSendOnPrepare_ = null;
 
     // The following members are for the exclusive use of prepared statements that require auto-generated keys to be returned
-    public ClientPreparedStatement preparedStatementForAutoGeneratedKeys_;
-    public ClientResultSet generatedKeysResultSet_;
-    public String[] generatedKeysColumnNames_;
-    public int[] generatedKeysColumnIndexes_;
+    ClientPreparedStatement preparedStatementForAutoGeneratedKeys_;
+    ClientResultSet generatedKeysResultSet_;
+    String[] generatedKeysColumnNames_;
+    int[] generatedKeysColumnIndexes_;
     
-    public int autoGeneratedKeys_ = Statement.NO_GENERATED_KEYS;
+    int autoGeneratedKeys_ = Statement.NO_GENERATED_KEYS;
 
     // This flag makes sure that only one copy of this statement
     // will be in connection_.commitListeners_.
@@ -266,7 +268,6 @@ public class ClientStatement implements 
         //section_ = null;
         resultSet_ = null;
         updateCount_ = -1L;
-        returnValueFromProcedure_ = 0;
         openOnClient_ = true;
         openOnServer_ = false;
         indexOfCurrentResultSet_ = -1;
@@ -359,7 +360,7 @@ public class ClientStatement implements 
         } finally {
             // If an exception is thrown above, the statement should not be put
             // back into the statement pool, as the state may not be consistent.
-            markResultSetsClosed();
+            markResultSetsClosed(false);
             // In case a cursorName was set on the Statement but the Statement
             // was never used to execute a query, the cursorName will not be
             // remove when the resultSets are mark closed, so we need to remove
@@ -668,7 +669,7 @@ public class ClientStatement implements 
      * 
      * @throws SqlException
      */
-    public void closeX() throws SqlException {
+    void closeX() throws SqlException {
         if (!openOnClient_) {
             return;
         }
@@ -1627,7 +1628,8 @@ public class ClientStatement implements 
      * Section is needed, and freed when the Statement is closed.
      */
     private Section setSpecialRegisterSection_ = null;
-    public void writeSetSpecialRegister(ArrayList sqlsttList)
+
+    void writeSetSpecialRegister(ArrayList sqlsttList)
         throws SqlException {
         if (setSpecialRegisterSection_ == null) {
             setSpecialRegisterSection_ = 
@@ -1638,19 +1640,19 @@ public class ClientStatement implements 
                                                     sqlsttList);
     }
 
-    public void readSetSpecialRegister() throws SqlException {
+    void readSetSpecialRegister() throws SqlException {
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(setSpecialRegisterSection_ != null);
         }
         materialStatement_.readSetSpecialRegister_();
     }
 
-    public void writeExecuteImmediate(String sql,
+    private void writeExecuteImmediate(String sql,
                                       Section section) throws SqlException {
         materialStatement_.writeExecuteImmediate_(sql, section);
     }
 
-    public void readExecuteImmediate() throws SqlException {
+    private void readExecuteImmediate() throws SqlException {
         materialStatement_.readExecuteImmediate_();
     }
 
@@ -1664,11 +1666,11 @@ public class ClientStatement implements 
         }
     }
 
-    public void readExecuteImmediateForBatch(String sql) throws SqlException {
+    private void readExecuteImmediateForBatch(String sql) throws SqlException {
         materialStatement_.readExecuteImmediateForBatch_(sql);
     }
 
-    public void writePrepareDescribeOutput(String sql,
+    void writePrepareDescribeOutput(String sql,
                                            Section section) throws SqlException {
         materialStatement_.writePrepareDescribeOutput_(sql, section);
     }
@@ -1687,11 +1689,11 @@ public class ClientStatement implements 
     }
 
     // Used for re-prepares across commit only
-    public void writePrepare(String sql, Section section) throws SqlException {
+    void writePrepare(String sql, Section section) throws SqlException {
         materialStatement_.writePrepare_(sql, section);
     }
 
-    public void readPrepare() throws SqlException {
+    void readPrepare() throws SqlException {
         materialStatement_.readPrepare_();
     }
 
@@ -1703,7 +1705,7 @@ public class ClientStatement implements 
         markPrepared();
     }
 
-    public void writeOpenQuery(Section section,
+    void writeOpenQuery(Section section,
                                int fetchSize,
                                int resultSetType) throws SqlException {
         materialStatement_.writeOpenQuery_(section,
@@ -1711,7 +1713,7 @@ public class ClientStatement implements 
                 resultSetType);
     }
 
-    public void readOpenQuery() throws SqlException {
+    void readOpenQuery() throws SqlException {
         materialStatement_.readOpenQuery_();
     }
 
@@ -1786,7 +1788,7 @@ public class ClientStatement implements 
         }
     }
 
-    public void writeExecuteCall(boolean outputExpected,
+    void writeExecuteCall(boolean outputExpected,
                                  String procedureName,
                                  Section section,
                                  int fetchSize,
@@ -1804,7 +1806,7 @@ public class ClientStatement implements 
                 inputs);
     }
 
-    public void readExecuteCall() throws SqlException {
+    void readExecuteCall() throws SqlException {
         materialStatement_.readExecuteCall_();
     }
 
@@ -1843,14 +1845,12 @@ public class ClientStatement implements 
         int sqlcode = sqlca.getSqlCode();
         if (sqlcode < 0) {
             agent_.accumulateReadException(new SqlException(agent_.logWriter_, sqlca));
-            returnValueFromProcedure_ = sqlcode;
         } else {
             updateCount_ = sqlca.getUpdateCount();
             // sometime for call statement, protocol will return updateCount_, we will always set that to 0
             // sqlMode_ is not set for statements, only for prepared statements
             if (sqlMode_ == isCall__) {
                 updateCount_ = -1L;
-                returnValueFromProcedure_ = sqlca.getReturnValue();
             }
             // Sqlcode 466 indicates a call statement has issued and result sets returned.
             // This is a good place to set some state variable to indicate result sets are open
@@ -1945,28 +1945,41 @@ public class ClientStatement implements 
         readCloseResultSets(allowAutoCommits);
     }
 
+    /**
+     * The connection close processing passes allowAutoCommits=false
+     * because if we drove an auto-commits after each statement close,
+     * then when we issue close requests on non-held cursors the
+     * server would complain that the non-held cursor was already
+     * closed from the previous statement's auto-commit.
+     * So the solution is to never auto-commit statements during
+     * connection close processing.
+     * <p/>
+     * Here's the operative explanation:
+     * <p/>
+     * Given a sequence of open statements S1, S2, .... a logic
+     * problem is occurring after S1 close-query drives an auto-commit,
+     * and S2 close-query is driven against a non-held cursor.
+     * <p/>
+     * The first auto-commit driven by S1 triggers a callback that
+     * closes S2's non-held cursor, and so the subsequent S2
+     * close-query request generates an error from the server saying
+     * that the cursor is already closed.
+     * <p/>
+     * This is fixed by passing a flag to our statement close
+     * processing that prevents driving additional auto-commits after
+     * each statement close.  Connection close drives its own final
+     * auto-commit.
+     *
+     * @param allowAutoCommits
+     */
     final boolean writeCloseResultSets(boolean allowAutoCommits) throws SqlException {
         int numberOfResultSetsToClose = (resultSetList_ == null) ? 0 : resultSetList_.length;
         return writeCloseResultSets(numberOfResultSetsToClose, allowAutoCommits);
     }
 
-    // The connection close processing passes allowAutoCommits=false because if we drove an
-    // autocommits after each statement close, then when we issue close requests on non-held cursors
-    // the server would complain that the non-held cursor was already closed from the previous statement's auto-commit.
-    // So the solution is to never autocommit statements during connection close processing.
-    //
-    // Here's the operative explanation:
-    // Given a sequence of open statements S1, S2, .... a logic problem is occuring after S1 close-query
-    // drives an auto-commit, and S2 close-query is driven against a non-held cursor.
-    // The first auto-commit driven by S1 triggers a callback that closes S2's non-held cursor,
-    // and so the subsequent S2 close-query request generates an error from the server saying
-    // that the cursor is already closed.
-    //
-    // This is fixed by passing a flag to our statement close processing that prevents
-    // driving additional auto-commits after each statement close.
-    // Connectino close drives its own final auto-commit.
-    //
-    boolean writeCloseResultSets(int number, boolean allowAutoCommits) throws SqlException {
+
+    private boolean writeCloseResultSets(int number, boolean allowAutoCommits)
+            throws SqlException {
         boolean requiresAutocommit = false;
         if (resultSetList_ != null) {
             for (int i = 0; i < number; i++) {
@@ -2001,13 +2014,16 @@ public class ClientStatement implements 
         return false;
     }
 
-    // Helper method for S.flowCloseResultSets() and PS.flowExecute()
+    /*
+     * Helper method for S.flowCloseResultSets() and PS.flowExecute()
+     */
     final void readCloseResultSets(boolean allowAutoCommits) throws SqlException {
         int numberOfResultSetsToClose = (resultSetList_ == null) ? 0 : resultSetList_.length;
         readCloseResultSets(numberOfResultSetsToClose, allowAutoCommits);
     }
 
-    void readCloseResultSets(int number, boolean allowAutoCommits) throws SqlException {
+    private void readCloseResultSets(int number, boolean allowAutoCommits)
+            throws SqlException {
         boolean requiredAutocommit = false;
         if (resultSetList_ != null) {
             for (int i = 0; i < number; i++) {
@@ -2086,7 +2102,7 @@ public class ClientStatement implements 
     public void completeExecuteSetStatement(Sqlca sqlca) {
     }
 
-    void markClosedOnServer() {
+    private void markClosedOnServer() {
         if (section_ != null) {
             section_.free();
             section_ = null;
@@ -2134,7 +2150,7 @@ public class ClientStatement implements 
      */
     void markClosed(boolean removeListener) {
         openOnClient_ = false;
-        markResultSetsClosed();
+        markResultSetsClosed(false);
         closeEverythingExceptResultSets( removeListener );
     }
 
@@ -2168,7 +2184,7 @@ public class ClientStatement implements 
         }
     }
 
-    void markPreparedStatementForAutoGeneratedKeysClosed() {
+    private void markPreparedStatementForAutoGeneratedKeysClosed() {
         if (preparedStatementForAutoGeneratedKeys_ != null) {
             preparedStatementForAutoGeneratedKeys_.markClosed();
         }
@@ -2176,16 +2192,6 @@ public class ClientStatement implements 
 
     /**
      * Mark all ResultSets associated with this statement as
-     * closed. The ResultSets will not be removed from the commit and
-     * rollback listeners list in
-     * <code>org.apache.derby.client.am.Connection</code>.
-     */
-    void markResultSetsClosed() {
-        markResultSetsClosed(false);
-    }
-
-    /**
-     * Mark all ResultSets associated with this statement as
      * closed.
      *
      * @param removeListener if true the ResultSets will be removed
@@ -2437,7 +2443,7 @@ public class ClientStatement implements 
         }
     }
 
-    void flowExecuteBatch(long[] updateCounts)
+    private void flowExecuteBatch(long[] updateCounts)
             throws SqlException, BatchUpdateException {
         SqlException chainBreaker = null;
         boolean isCallCataloguedBestGuess = true;
@@ -2784,48 +2790,6 @@ public class ClientStatement implements 
         }
     }
 
-    // the sql is assumed to start with CALL... or ?=CALL...
-    String getProcedureName(String sql) throws SqlException {
-        StringTokenizer tokenizer = new StringTokenizer(sql, "\t\n\r\f= (?");
-        if (!tokenizer.hasMoreTokens()) {
-            throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.NO_TOKENS_IN_SQL_TEXT), sql);
-        }
-        String firstToken = tokenizer.nextToken();
-        if (!firstToken.equalsIgnoreCase("call")) {
-            throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.LANG_INVALID_CALL_STATEMENT));
-        }
-        if (!tokenizer.hasMoreTokens()) {
-            throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.LANG_INVALID_CALL_STATEMENT));
-        }
-        return tokenizer.nextToken();
-    }
-
-    // Try to enforce the use of this method later.
-    public static String upperCaseProcedureName(String procedureName) throws SqlException {
-        // upper case the parts of a 3-part procedure name unless the part is in a double quotes
-
-        // Loop thru every character, if we're in double quotes just echo it,
-        // if we're not in double quotes, upper case it.
-        char[] charArray = null;
-        if (procedureName.indexOf("\"") == -1) {
-            return procedureName.toUpperCase();
-        } else {
-            charArray = procedureName.toCharArray();
-            boolean inStringLiteral = false;
-            for (int i = 0; i < charArray.length; i++) {
-                if (charArray[i] == '"') {
-                    inStringLiteral = !inStringLiteral;
-                } else if (!inStringLiteral && charArray[i] != '.') {
-                    charArray[i] = Character.toUpperCase(charArray[i]);
-                }
-            }
-        }
-        return new String(charArray);
-    }
-
     final void checkForAppropriateSqlMode(int executeType, int sqlMode) throws SqlException {
         if (executeType == executeQueryMethod__ && sqlMode == isUpdate__) {
             throw new SqlException(agent_.logWriter_, 
@@ -2928,7 +2892,7 @@ public class ClientStatement implements 
     }
 
     // precondition: parseSqlAndSetSqlModes() must be called on the supplied sql string before invoking this method
-    void checkForInvalidBatchedSql(String sql) throws SqlException {
+    private void checkForInvalidBatchedSql(String sql) throws SqlException {
         if (sql == null) {
             throw new SqlException(agent_.logWriter_, 
                 new ClientMessageId(SQLState.NULL_SQL_TEXT));
@@ -3073,7 +3037,7 @@ public class ClientStatement implements 
         //cursorName_ = null;
     }
 
-    void mapCursorNameToResultSet() {
+    private void mapCursorNameToResultSet() {
         if (cursorName_ != null) {
             agent_.sectionManager_.mapCursorNameToResultSet(cursorName_, resultSet_);
         } else {
@@ -3135,7 +3099,8 @@ public class ClientStatement implements 
 
   
 
-    void getPreparedStatementForAutoGeneratedKeys() throws SqlException {
+    private void getPreparedStatementForAutoGeneratedKeys()
+            throws SqlException {
         if (preparedStatementForAutoGeneratedKeys_ == null) {
             String s = "select IDENTITY_VAL_LOCAL() from SYSIBM.SYSDUMMY1";
             preparedStatementForAutoGeneratedKeys_ =
@@ -3224,7 +3189,7 @@ public class ClientStatement implements 
      * @param closingRS The ResultSet to be closed
      * @throws SqlException
      */
-    public void resultSetCommitting(ClientResultSet closingRS)
+    void resultSetCommitting(ClientResultSet closingRS)
             throws SqlException {
         resultSetCommitting(closingRS, false);
     }
@@ -3238,7 +3203,7 @@ public class ClientStatement implements 
      * is part of a chain of write from client to Server
      * @throws SqlException
      */
-    public boolean resultSetCommitting(
+    boolean resultSetCommitting(
             ClientResultSet closingRS,
             boolean writeChain) throws SqlException {
 
@@ -3279,7 +3244,7 @@ public class ClientStatement implements 
     /**
      * Mark all ResultSets associated with this statement as auto-committed.   
      */
-    public void markAutoCommitted() {
+    private void markAutoCommitted() {
         if (resultSetList_ != null) {
             for (int i = 0; i < resultSetList_.length; i++)
                 if (resultSetList_[i] != null) {
@@ -3289,29 +3254,7 @@ public class ClientStatement implements 
             resultSet_.markAutoCommitted();
         }
     }
-    
-    protected SQLException jdbc3FeatureNotSupported(boolean checkStatement)
-        throws SQLException
-    {
-        try
-        {
-            if ( checkStatement )
-                checkForClosedStatement();
-            
-            throw new SqlException(agent_.logWriter_, 
-                new ClientMessageId(SQLState.JDBC_METHOD_NOT_IMPLEMENTED));
-        }
-        catch ( SqlException se )
-        {
-            throw se.getSQLException();
-        }
-    }
-    
-    protected SQLException jdbc3FeatureNotSupported() throws SQLException
-    {
-        return jdbc3FeatureNotSupported(true);
-    }
-    
+
     ////////////////////////////////////////////////////////////////////
     //
     // INTRODUCED BY JDBC 4.1 IN JAVA 7

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClientTypes.java Fri May  3 03:42:14 2013
@@ -30,30 +30,30 @@ import org.apache.derby.iapi.reference.J
 public class ClientTypes {
     // -------------------------------- Driver types -------------------------------------------------
 
-    public final static int BIT        =  Types.BIT;          // -7;
+    final static int BIT        =  Types.BIT;          // -7;
 
     // Not currently supported as a DERBY column type.  Mapped to SMALLINT.
-    //public final static int TINYINT   = Types.TINYINT;       // -6;
+    //final static int TINYINT   = Types.TINYINT;       // -6;
 
-    public final static int BOOLEAN = Types.BOOLEAN;       // 16;
+    final static int BOOLEAN = Types.BOOLEAN;       // 16;
 
-    public final static int SMALLINT = Types.SMALLINT;      // 5;
+    final static int SMALLINT = Types.SMALLINT;      // 5;
 
-    public final static int INTEGER = Types.INTEGER;       // 4;
+    final static int INTEGER = Types.INTEGER;       // 4;
 
-    public final static int BIGINT = Types.BIGINT;        // -5;
+    final static int BIGINT = Types.BIGINT;        // -5;
 
     // We type using DOUBLE
-    //public final static int FLOAT     = Types.FLOAT;         // 6;
+    //final static int FLOAT     = Types.FLOAT;         // 6;
 
-    public final static int REAL = Types.REAL;          // 7;
+    final static int REAL = Types.REAL;          // 7;
 
-    public final static int DOUBLE = Types.DOUBLE;        // 8;
+    final static int DOUBLE = Types.DOUBLE;        // 8;
 
     // We type using DECIMAL
-    //public final static int NUMERIC   = Types.NUMERIC;       // 2;
+    //final static int NUMERIC   = Types.NUMERIC;       // 2;
 
-    public final static int DECIMAL = Types.DECIMAL;       // 3;
+    final static int DECIMAL = Types.DECIMAL;       // 3;
 
     public final static int CHAR = Types.CHAR;          // 1;
 
@@ -61,11 +61,11 @@ public class ClientTypes {
 
     public final static int LONGVARCHAR = Types.LONGVARCHAR;   // -1;
 
-    public final static int DATE = Types.DATE;          // 91;
+    final static int DATE = Types.DATE;          // 91;
 
-    public final static int TIME = Types.TIME;          // 92;
+    final static int TIME = Types.TIME;          // 92;
 
-    public final static int TIMESTAMP = Types.TIMESTAMP;     // 93;
+    final static int TIMESTAMP = Types.TIMESTAMP;     // 93;
 
     public final static int BINARY = Types.BINARY;        // -2;
 
@@ -81,9 +81,9 @@ public class ClientTypes {
 
     // hide the default constructor
     private ClientTypes() {
-   }
+    }
     
-    static public String getTypeString(int type)
+    static String getTypeString(int type)
     {
         switch (type )
         {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorInputStream.java Fri May  3 03:42:14 2013
@@ -42,7 +42,7 @@ import org.apache.derby.shared.common.sa
  * straight-forward.
  */
 
-public class ClobLocatorInputStream extends InputStream {
+class ClobLocatorInputStream extends InputStream {
     
     /**
      * Connection used to read Clob from server.
@@ -69,8 +69,8 @@ public class ClobLocatorInputStream exte
      * @param clob <code>Clob</code> object that contains locator for
      *        the <code>Clob</code> value on the server.
      */
-    public ClobLocatorInputStream(ClientConnection connection, ClientClob clob)
-    throws SqlException{
+    ClobLocatorInputStream(ClientConnection connection, ClientClob clob)
+            throws SqlException {
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(clob.isLocator());
         }
@@ -91,7 +91,7 @@ public class ClobLocatorInputStream exte
      * @param pos the position inside the <code>Clob<code> from which
      *            the reading must begin.
      */
-    public ClobLocatorInputStream(
+    ClobLocatorInputStream(
             ClientConnection connection,
             ClientClob clob,
             long pos) throws SqlException{

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorOutputStream.java Fri May  3 03:42:14 2013
@@ -36,12 +36,7 @@ import java.io.OutputStream;
  * buffering of data is done.  Hence, for efficiency #write(byte[])
  * should be used instead of #write(int).
  */
-public class ClobLocatorOutputStream extends OutputStream {
-    
-    /**
-     * Connection used to read Clob from server.
-     */
-    private final ClientConnection connection;
+class ClobLocatorOutputStream extends OutputStream {
     
     /**
      * The Clob to be accessed.
@@ -59,15 +54,12 @@ public class ClobLocatorOutputStream ext
      * Create an <code>OutputStream</code> for writing to the
      * <code>Clob</code> value represented by the given locator based
      * <code>Clob</code> object.
-     * @param connection connection to be used to write to the
-     *        <code>Clob</code> value on the server
      * @param clob <code>Clob</code> object that contains locator for
      *        the <code>Clob</code> value on the server.
      * @param pos the position in the <code>CLOB</code> value at which
      *        to start writing; the first position is 1
      */
-    public ClobLocatorOutputStream(
-            ClientConnection connection,
+    ClobLocatorOutputStream(
             ClientClob clob,
             long pos) throws SqlException {
 
@@ -75,7 +67,6 @@ public class ClobLocatorOutputStream ext
             throw new IndexOutOfBoundsException();
         }
         
-        this.connection = connection;
         this.clob = clob;
         this.currentPos = pos;
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorReader.java Fri May  3 03:42:14 2013
@@ -37,7 +37,7 @@ import org.apache.derby.shared.common.sa
  * this.  A more efficient skip implementation should also be
  * straight-forward.
  */
-public class ClobLocatorReader extends Reader {
+class ClobLocatorReader extends Reader {
     /**
      * Connection used to read Clob from server.
      */
@@ -76,7 +76,7 @@ public class ClobLocatorReader extends R
      * @param clob <code>Clob</code> object that contains locator for
      *        the <code>Clob</code> value on the server.
      */
-    public ClobLocatorReader(ClientConnection connection, ClientClob clob)
+    ClobLocatorReader(ClientConnection connection, ClientClob clob)
     throws SqlException {
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(clob.isLocator());
@@ -106,7 +106,7 @@ public class ClobLocatorReader extends R
      *            retrieved.
      * @param len The length in characters of the partial value to be retrieved.
      */
-    public ClobLocatorReader(ClientConnection connection, ClientClob clob,
+    ClobLocatorReader(ClientConnection connection, ClientClob clob,
             long pos, long len) throws SqlException {
         if (SanityManager.DEBUG) {
             SanityManager.ASSERT(clob.isLocator());

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ClobLocatorWriter.java Fri May  3 03:42:14 2013
@@ -126,7 +126,7 @@ class ClobLocatorWriter extends Writer {
     /**
      * @see java.io.Writer#write(char[])
      */
-    public void write(char[] c) throws IOException {
+    public void wriUSLte(char[] c) throws IOException {
         checkClosed();
         writeCharacters(c, 0, c.length);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ColumnMetaData.java Fri May  3 03:42:14 2013
@@ -40,9 +40,6 @@ public class ColumnMetaData implements R
 
     public boolean[] nullable_;
 
-    // Although this is describe information, it is tagged transient for now becuase it is not currently used.
-    transient public int[] singleMixedByteOrDouble_; // 1 means single, 2 means double, 3 means mixed-byte, 0 not applicable
-
     // All of the following state data comes from the SQLDA reply.
 
     //Data from SQLDHGRP
@@ -89,18 +86,16 @@ public class ColumnMetaData implements R
 
     // For performance only, not part of logical model.
     public transient int[][] protocolTypesCache_ = null;
-    public transient Hashtable protocolTypeToOverrideLidMapping_ = null;
-    public transient ArrayList mddOverrideArray_ = null;
 
     public transient int[] types_;
     public transient int[] clientParamtertype_;
 
-    public transient LogWriter logWriter_;
+    private transient LogWriter logWriter_;
 
     // only set on execute replies, this is not describe information.
     // only used for result set meta data.
 
-    public transient int resultSetConcurrency_;
+    transient int resultSetConcurrency_;
 
     transient private Hashtable<String, Integer> columnNameToIndexCache_;
 
@@ -111,7 +106,7 @@ public class ColumnMetaData implements R
         nullDataForGC();
     }
 
-    void checkForClosedStatement() throws SqlException {
+    private void checkForClosedStatement() throws SqlException {
         // agent_.checkForDeferredExceptions();
         if (statementClosed_) {
             throw new SqlException(logWriter_, 
@@ -144,7 +139,6 @@ public class ColumnMetaData implements R
         nullable_ = new boolean[upperBound];
         types_ = new int[upperBound];
         clientParamtertype_ = new int[upperBound];
-        singleMixedByteOrDouble_ = new int[upperBound]; // 1 means single, 2 means double, 3 means mixed-byte, 0 not applicable
 
         sqlPrecision_ = new int[upperBound];
         sqlScale_ = new int[upperBound];
@@ -755,14 +749,6 @@ public class ColumnMetaData implements R
         }
     }
 
-    // Does OUT parm registration rely on extended describe?
-    // If the output parameter has been registered, return true, else return false.
-    public boolean isParameterModeGuessedAsOutput(int parameterIndex) {
-        return
-            sqlxParmmode_[parameterIndex - 1] >=
-            ClientParameterMetaData.parameterModeInOut;
-    }
-
     public void setLogWriter(LogWriter logWriter) {
         logWriter_ = logWriter;
     }
@@ -771,7 +757,6 @@ public class ColumnMetaData implements R
         columns_ = 0;
         nullable_ = null;
         types_ = null;
-        singleMixedByteOrDouble_ = null;
         sqldRdbnam_ = null;
         sqldSchema_ = null;
         sqlPrecision_ = null;
@@ -798,7 +783,7 @@ public class ColumnMetaData implements R
         types_ = null;
     }
 
-    public boolean hasLobColumns() {
+    boolean hasLobColumns() {
         for (int i = 0; i < columns_; i++) {
             switch (Utils.getNonNullableSqlType(sqlType_[i])) {
             case DRDAConstants.DB2_SQLTYPE_BLOB:
@@ -838,7 +823,7 @@ public class ColumnMetaData implements R
     }
 
     // assign ordinal position as the column name if null.
-    void assignColumnName(int column) {
+    private void assignColumnName(int column) {
         if (columnNameToIndexCache_ == null) {
             columnNameToIndexCache_ = new Hashtable<String, Integer>();
         }
@@ -847,10 +832,6 @@ public class ColumnMetaData implements R
         sqlName_[column - 1] = columnName;
     }
 
-    public boolean columnIsNotInUnicode(int index) {
-        return (sqlCcsid_[index] != 1208);
-    }
-
     // JDBC 4.0 java.sql.Wrapper interface methods
 
     /**

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Configuration.java Fri May  3 03:42:14 2013
@@ -35,10 +35,6 @@ import org.apache.derby.shared.common.re
 
 public class Configuration {
 
-    public static final String jreLevel;// = "1.3.0"; // default level if unable to read
-    public static final int jreLevelMajor;// = 1;
-    public static final int jreLevelMinor;// = 3;
-
     private Configuration() {
     }
 
@@ -46,13 +42,14 @@ public class Configuration {
 
     private static ProductVersionHolder dncProductVersionHolder__;
 
-    public static ProductVersionHolder getProductVersionHolder() {
+    static ProductVersionHolder getProductVersionHolder() {
         return dncProductVersionHolder__;
     }
 
 
     // for DatabaseMetaData.getDriverName()
-    public final static String dncDriverName = "Apache Derby Network Client JDBC Driver";
+    final static String
+        dncDriverName = "Apache Derby Network Client JDBC Driver";
 
 
     // Hard-wired for JDBC
@@ -65,10 +62,6 @@ public class Configuration {
         return dncPackageConsistencyToken.clone();
     }
 
-    // We will not set package VERSION in the initial release.
-    // If we have to change the package version in the future then we can.
-    public static final String dncPackageVersion = null;
-
     // for ClientDriver.jdbcCompliant()
     public final static boolean jdbcCompliant = true;
 
@@ -90,8 +83,6 @@ public class Configuration {
 
     // -------------------------- compiled in properties -------------------------
 
-    public final static boolean enableNetConnectionPooling = true;
-
     final static boolean rangeCheckCrossConverters = true;
 
     // Define different levels of bug checking, for now turn all bits on.
@@ -100,30 +91,21 @@ public class Configuration {
     // --------------------------- connection defaults ---------------------------
 
     // This is the DERBY default and maps to DERBY's "Cursor Stability".
-    public final static int defaultIsolation =
-            Connection.TRANSACTION_READ_COMMITTED;
+    final static int defaultIsolation = Connection.TRANSACTION_READ_COMMITTED;
 
     // ---------------------------- statement defaults----------------------------
 
     public static final int defaultFetchSize = 64;
 
     // Prepare attribute constants
-    public static final String cursorAttribute_SensitiveStatic = "SENSITIVE STATIC SCROLL ";
-    public static final String cursorAttribute_SensitiveStaticRowset = cursorAttribute_SensitiveStatic;
-    public static final String cursorAttribute_SensitiveDynamic = "SENSITIVE DYNAMIC SCROLL ";
-    public static final String cursorAttribute_SensitiveDynamicRowset = "SENSITIVE DYNAMIC SCROLL WITH ROWSET POSITIONING ";
-    public static final String cursorAttribute_Insensitive = "INSENSITIVE SCROLL ";
-    public static final String cursorAttribute_InsensitiveRowset = cursorAttribute_Insensitive;
-
-    // uncomment the following when we want to use multi-row fetch to support sensitive static and
-    // insensitve cursors whenever the server has support for it.
-    //public static final String cursorAttribute_SensitiveStaticRowset = "SENSITIVE STATIC SCROLL WITH ROWSET POSITIONING ";
-    //public static final String cursorAttribute_InsensitiveRowset = "INSENSITIVE SCROLL WITH ROWSET POSITIONING ";
-
-    public static final String cursorAttribute_ForUpdate = "FOR UPDATE ";
-    public static final String cursorAttribute_ForReadOnly = "FOR READ ONLY ";
-
-    public static final String cursorAttribute_WithHold = "WITH HOLD ";
+    static final String
+            cursorAttribute_SensitiveStatic = "SENSITIVE STATIC SCROLL ";
+    static final String
+            cursorAttribute_Insensitive = "INSENSITIVE SCROLL ";
+    static final String
+            cursorAttribute_ForUpdate = "FOR UPDATE ";
+    static final String
+            cursorAttribute_WithHold = "WITH HOLD ";
 
     // -----------------------Load resource bundles for the driver asap-----------
 
@@ -138,37 +120,6 @@ public class Configuration {
         } catch (SqlException e) {
             exceptionsOnLoadResources = e;
         }
-        String _jreLevel;
-        try {
-            _jreLevel = System.getProperty("java.version");
-        } catch (SecurityException e) {
-            _jreLevel = "1.3.0";
-        } // ignore it, assume 1.3.0
-        jreLevel = _jreLevel;
-        StringTokenizer st = new StringTokenizer(jreLevel, ".");
-        int jreState = 0;
-        int _jreLevelMajor = 1;
-        int _jreLevelMinor = 3;
-        while (st.hasMoreTokens()) {
-            int i;
-            try {
-                i = Integer.parseInt(st.nextToken()); // get int value
-            } catch (NumberFormatException e) {
-                i = 0;
-            }
-            switch (jreState++) {
-            case 0:
-                _jreLevelMajor = i; // state 0, this is the major version
-                break;
-            case 1:
-                _jreLevelMinor = i; // state 1, this is the minor version
-                break;
-            default:
-                break; // state >1, ignore
-            }
-        }
-        jreLevelMajor = _jreLevelMajor;
-        jreLevelMinor = _jreLevelMinor;
     }
 
     public static SqlException getExceptionOnLoadResources() {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Fri May  3 03:42:14 2013
@@ -96,7 +96,7 @@ final class CrossConverters {
 
     // ---------------------- state ----------------------------------------------
 
-    Agent agent_;
+    private final Agent agent_;
 
     // ----------------------constructors/finalizer-------------------------------
 
@@ -779,7 +779,7 @@ final class CrossConverters {
     }
 
     // create a String by reading all of the bytes from reader
-    private final String setStringFromReader(Reader r, int length)
+    private String setStringFromReader(Reader r, int length)
             throws SqlException {
         StringWriter sw = new StringWriter();
         try {
@@ -833,7 +833,7 @@ final class CrossConverters {
 
 
     // create a String by reading all of the bytes from inputStream, applying encoding
-    private final String setStringFromStream(
+    private String setStringFromStream(
             InputStream is,
             String encoding,
             int length) throws SqlException {
@@ -907,7 +907,7 @@ final class CrossConverters {
     }
 
     // create a byte[] by reading all of the bytes from inputStream
-    private final byte[] setBytesFromStream(InputStream is, int length)
+    private byte[] setBytesFromStream(InputStream is, int length)
             throws SqlException {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         int totalRead = 0;
@@ -1011,10 +1011,6 @@ final class CrossConverters {
 
     //---------------------------- getBoolean*() methods -------------------------
 
-    final boolean getBooleanFromByte(byte source) throws SqlException {
-        return source != 0;
-    }
-
     final boolean getBooleanFromShort(short source) throws SqlException {
         return source != 0;
     }
@@ -1306,11 +1302,6 @@ final class CrossConverters {
 
     //---------------------------- getBigDecimal*() methods ----------------------
 
-    final BigDecimal getBigDecimalFromBoolean(boolean source)
-            throws SqlException {
-        return source ? bdOne__ : bdZero__;
-    }
-
     final BigDecimal getBigDecimalFromString(String source)
             throws SqlException {
         try {
@@ -1326,10 +1317,6 @@ final class CrossConverters {
 
     //---------------------------- getString*() methods --------------------------
 
-    final String getStringFromBoolean(boolean source) throws SqlException {
-        return source ? "1" : "0";
-    }
-
     final String getStringFromBytes(byte[] bytes) throws SqlException {
         StringBuffer stringBuffer = new StringBuffer(bytes.length * 2);
         for (int i = 0; i < bytes.length; i++) {
@@ -1358,14 +1345,6 @@ final class CrossConverters {
         }
     }
 
-    final Date getDateFromTime(Time source) throws SqlException {
-        return new Date(source.getTime());
-    }
-
-    final Date getDateFromTimestamp(Timestamp source) throws SqlException {
-        return new Date(source.getTime());
-    }
-
     //---------------------------- getTime*() methods ----------------------------
 
     final Time getTimeFromString(String source, Calendar cal)
@@ -1378,10 +1357,6 @@ final class CrossConverters {
         }
     }
 
-    final Time getTimeFromTimestamp(Timestamp source) throws SqlException {
-        return new Time(source.getTime());
-    }
-
     //---------------------------- getTimestamp*() methods -----------------------
 
     final Timestamp getTimestampFromString(String source, Calendar cal)
@@ -1394,14 +1369,6 @@ final class CrossConverters {
         }
     }
 
-    final Timestamp getTimestampFromTime(Time source) throws SqlException {
-        return new Timestamp(source.getTime());
-    }
-
-    final Timestamp getTimestampFromDate(Date source) throws SqlException {
-        return new Timestamp(source.getTime());
-    }
-
     /**
      * Convert a string to a date in the specified calendar. Accept the same
      * format as {@code Date.valueOf()}.
@@ -1412,7 +1379,7 @@ final class CrossConverters {
      * calendar {@code cal}
      * @throws IllegalArgumentException if the format of the string is invalid
      */
-    final Date date_valueOf(String s, Calendar cal) {
+    private static Date date_valueOf(String s, Calendar cal) {
         String formatError = "JDBC Date format must be yyyy-mm-dd";
         if (s == null) {
             throw new IllegalArgumentException(formatError);
@@ -1496,8 +1463,7 @@ final class CrossConverters {
      * calendar {@code cal}
      * @throws IllegalArgumentException if the format of the string is invalid
      */
-    final Time time_valueOf(String s, Calendar cal) {
-        String formatError = "JDBC Time format must be hh:mm:ss";
+    private static Time time_valueOf(String s, Calendar cal) {
         if (s == null) {
             throw new IllegalArgumentException();
         }
@@ -1525,7 +1491,7 @@ final class CrossConverters {
      * @throws IllegalArgumentException if the time string is not on the
      * format HH:MM:SS
      */
-    private void initTimePortion(Calendar cal, String time) {
+    private static void initTimePortion(Calendar cal, String time) {
         // Expect string on format HH:MM:SS
         if (time.length() != 8 ||
                 time.charAt(2) != ':' || time.charAt(5) != ':') {
@@ -1551,8 +1517,7 @@ final class CrossConverters {
      * in the calendar {@code cal}
      * @throws IllegalArgumentException if the format of the string is invalid
      */
-    final Timestamp timestamp_valueOf(String s, Calendar cal) {
-        String formatError = "JDBC Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff";
+    private static Timestamp timestamp_valueOf(String s, Calendar cal) {
         if (s == null) {
             throw new IllegalArgumentException();
         }
@@ -1608,7 +1573,7 @@ final class CrossConverters {
         return ts;
     }
 
-    private final byte parseByte(String s) throws NumberFormatException {
+    private static byte parseByte(String s) throws NumberFormatException {
         int i = parseInt(s);
         if (i < Byte.MIN_VALUE || i > Byte.MAX_VALUE) {
             throw new NumberFormatException();
@@ -1616,7 +1581,7 @@ final class CrossConverters {
         return (byte) i;
     }
 
-    private final short parseShort(String s) throws NumberFormatException {
+    private static short parseShort(String s) throws NumberFormatException {
         int i = parseInt(s);
         if (i < Short.MIN_VALUE || i > Short.MAX_VALUE) {
             throw new NumberFormatException();
@@ -1625,7 +1590,7 @@ final class CrossConverters {
     }
 
     // Custom version of java.lang.parseInt() that allows for space padding of char fields.
-    private final int parseInt(String s) throws NumberFormatException {
+    private static int parseInt(String s) throws NumberFormatException {
         if (s == null) {
             throw new NumberFormatException("null");
         }
@@ -1691,7 +1656,7 @@ final class CrossConverters {
         }
     }
 
-    private final long parseLong(String s) throws NumberFormatException {
+    private static long parseLong(String s) throws NumberFormatException {
         if (s == null) {
             throw new NumberFormatException("null");
         }
@@ -1754,7 +1719,8 @@ final class CrossConverters {
         }
     }
 
-    private final void skipPadding(String s, int i, int length) throws NumberFormatException {
+    private static void skipPadding(String s, int i, int length)
+            throws NumberFormatException {
         while (i < length) {
             if (s.charAt(i++) != ' ') {
                 throw new NumberFormatException(s);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Fri May  3 03:42:14 2013
@@ -312,11 +312,11 @@ public abstract class Cursor {
     
     //---------------------------cursor positioning-------------------------------
 
-    public final void markNextRowPosition() {
+    protected final void markNextRowPosition() {
         nextRowPosition_ = position_;
     }
 
-    public final void makeNextRowPositionCurrent() {
+    protected final void makeNextRowPositionCurrent() {
         currentRowPosition_ = nextRowPosition_;
     }
 
@@ -333,7 +333,7 @@ public abstract class Cursor {
     // Direct conversions only, cross conversions are handled by another set of getters.
 
     // Build a Java boolean from a 1-byte signed binary representation.
-    private final boolean get_BOOLEAN(int column) {
+    private boolean get_BOOLEAN(int column) {
         if ( SignedBinary.getByte
              ( dataBuffer_, columnDataPosition_[column - 1] ) == 0 )
         { return false; }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTime.java Fri May  3 03:42:14 2013
@@ -66,11 +66,11 @@ public class DateTime {
      * @return  Date translated from  buffer with specified encoding
      * @throws UnsupportedEncodingException
      */
-    public static final Date dateBytesToDate(byte[] buffer,
-                                                      int offset,
-                                                      Calendar recyclableCal, 
-                                                      String encoding) 
-    throws UnsupportedEncodingException {
+    static final Date dateBytesToDate(byte[] buffer,
+            int offset,
+            Calendar recyclableCal,
+            String encoding) throws UnsupportedEncodingException {
+
         int year, month, day;
 
         String date = new String(buffer, offset, 
@@ -160,7 +160,7 @@ public class DateTime {
      * @return TimeStamp translated from buffer with specified encoding
      * @throws UnsupportedEncodingException
      */
-    public static final Timestamp timestampBytesToTimestamp(byte[] buffer,
+    static final Timestamp timestampBytesToTimestamp(byte[] buffer,
                                                                      int offset,
                                                                      Calendar recyclableCal, 
                                                                      String encoding,
@@ -435,7 +435,7 @@ public class DateTime {
      * @return Timestamp translated from buffer with specified encoding
      * @throws UnsupportedEncodingException
      */
-    public static final Timestamp dateBytesToTimestamp(byte[] buffer,
+    static final Timestamp dateBytesToTimestamp(byte[] buffer,
                                                                 int offset,
                                                                 Calendar recyclableCal,
                                                                 String encoding) 
@@ -487,7 +487,7 @@ public class DateTime {
      * @throws UnsupportedEncodingException
      * 
      */
-    public static final Timestamp timeBytesToTimestamp(byte[] buffer,
+    static final Timestamp timeBytesToTimestamp(byte[] buffer,
                                                                 int offset,
                                                                 Calendar recyclableCal, 
                                                                 String encoding)
@@ -538,7 +538,7 @@ public class DateTime {
      * @return Date translated from buffer with specified encoding
      * @throws UnsupportedEncodingException
      */
-    public static final Date timestampBytesToDate(byte[] buffer,
+    static final Date timestampBytesToDate(byte[] buffer,
                                                            int offset,
                                                            Calendar recyclableCal, 
                                                            String encoding) 
@@ -580,7 +580,7 @@ public class DateTime {
      * @return  Time translated from buffer with specified Encoding
      * @throws UnsupportedEncodingException
      */
-    public static final Time timestampBytesToTime(byte[] buffer,
+    static final Time timestampBytesToTime(byte[] buffer,
                                                            int offset,
                                                            Calendar recyclableCal, 
                                                            String encoding) 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTimeValue.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTimeValue.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTimeValue.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DateTimeValue.java Fri May  3 03:42:14 2013
@@ -72,7 +72,7 @@ public class DateTimeValue {
      * Create an instance from a {@code java.sql.Timestamp} using the specified
      * {@code java.util.Calendar}.
      */
-    public DateTimeValue(Date date, Calendar cal) {
+    DateTimeValue(Date date, Calendar cal) {
         this(initCalendar(cal, date), 0);
     }
 
@@ -80,7 +80,7 @@ public class DateTimeValue {
      * Create an instance from a {@code java.sql.Time} using the specified
      * {@code java.util.Calendar}.
      */
-    public DateTimeValue(Time time, Calendar cal) {
+    DateTimeValue(Time time, Calendar cal) {
         this(initCalendar(cal, time), 0);
     }
 
@@ -88,7 +88,7 @@ public class DateTimeValue {
      * Create an instance from a {@code java.sql.Timestamp} using the specified
      * {@code java.util.Calendar}.
      */
-    public DateTimeValue(Timestamp ts, Calendar cal) {
+    DateTimeValue(Timestamp ts, Calendar cal) {
         this(initCalendar(cal, ts), ts.getNanos());
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Decimal.java Fri May  3 03:42:14 2013
@@ -147,7 +147,7 @@ public class Decimal {
      *
      * @throws IllegalArgumentException if the specified representation is not recognized.
      */
-    public static final BigDecimal getBigDecimal(
+    static BigDecimal getBigDecimal(
             byte[] buffer,
             int offset,
             int precision,
@@ -243,7 +243,7 @@ public class Decimal {
      *
      * @throws IllegalArgumentException if the specified representation is not recognized.
      */
-    public static final double getDouble(
+    static double getDouble(
             byte[] buffer,
             int offset,
             int precision,
@@ -308,7 +308,7 @@ public class Decimal {
      * @throws IllegalArgumentException if the specified representation is not recognized.
      * @throws ArithmeticException if value is too large for a long
      */
-    public static final long getLong(
+    static long getLong(
             byte[] buffer,
             int offset,
             int precision,

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Diagnosable.java Fri May  3 03:42:14 2013
@@ -23,7 +23,7 @@ package org.apache.derby.client.am;
 
 import java.io.PrintWriter;
 
-public interface Diagnosable {
+interface Diagnosable {
     public Sqlca getSqlca();
 
     public void printTrace(PrintWriter printWriter, String messageHeader);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/DisconnectException.java Fri May  3 03:42:14 2013
@@ -24,7 +24,7 @@ package org.apache.derby.client.am;
 import org.apache.derby.shared.common.reference.SQLState;
 
 public class DisconnectException extends SqlException {
-    public DisconnectException(Agent agent, ClientMessageId msgid,
+    private DisconnectException(Agent agent, ClientMessageId msgid,
         Object[] args, SqlCode sqlcode, Throwable t)  {
         super(agent != null ? agent.logWriter_ : null, msgid,
             args, sqlcode, t);
@@ -35,17 +35,12 @@ public class DisconnectException extends
         }
     }
     
-    public DisconnectException(Agent agent, ClientMessageId msgid,
+    private DisconnectException(Agent agent, ClientMessageId msgid,
         Object[] args, SqlCode sqlcode) {
         this(agent, msgid, args, sqlcode, (Throwable)null);
     }
 
-    public DisconnectException(Agent agent, ClientMessageId msgid, SqlCode sqlcode) {
-        this(agent, msgid, (Object[]) null, sqlcode);
-    }
-
-        
-    public DisconnectException(Agent agent, ClientMessageId msgid,
+    private DisconnectException(Agent agent, ClientMessageId msgid,
         Object[] args) {
         this(agent, msgid, args, SqlCode.disconnectError);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ExceptionFormatter.java Fri May  3 03:42:14 2013
@@ -27,13 +27,13 @@ import java.sql.SQLException;
 import java.sql.SQLWarning;
 import javax.transaction.xa.XAException;
 
-public class ExceptionFormatter {
+class ExceptionFormatter {
     // returnTokensOnly is true only when exception tracing is enabled so
     // that we don't try to go to the server for a message while we're in
     // the middle of parsing an Sqlca reply.
     // Without this, if e.getMessage() fails, we would have infinite recursion
     // when TRACE_DIAGNOSTICS is on  because tracing occurs within the exception constructor.
-    static public void printTrace(SqlException e,
+    static void printTrace(SqlException e,
                                   PrintWriter printWriter,
                                   String messageHeader,
                                   boolean returnTokensOnly) {
@@ -102,7 +102,7 @@ public class ExceptionFormatter {
         }
     }
 
-    static public void printTrace(SQLException e,
+    static void printTrace(SQLException e,
                                   PrintWriter printWriter,
                                   String messageHeader,
                                   boolean returnTokensOnly) {
@@ -157,7 +157,7 @@ public class ExceptionFormatter {
         }
     }
 
-    static public void printTrace(Sqlca sqlca,
+    static void printTrace(Sqlca sqlca,
                                   PrintWriter printWriter,
                                   String messageHeader) {
         String header = messageHeader + "[" + "Sqlca@" + Integer.toHexString(sqlca.hashCode()) + "]";
@@ -172,7 +172,7 @@ public class ExceptionFormatter {
         }
     }
 
-    static public void printTrace(Throwable e,
+    static void printTrace(Throwable e,
                                   PrintWriter printWriter,
                                   String messageHeader) {
         String header = messageHeader + "[" + "Throwable@" + Integer.toHexString(e.hashCode()) + "]";
@@ -184,7 +184,7 @@ public class ExceptionFormatter {
         }
     }
 
-    static public void printTrace(XAException e,
+    static void printTrace(XAException e,
                                   PrintWriter printWriter,
                                   String messageHeader) {
         String header = messageHeader + "[" + "XAException@" + Integer.toHexString(e.hashCode()) + "]";

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/FloatingPoint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/FloatingPoint.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/FloatingPoint.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/FloatingPoint.java Fri May  3 03:42:14 2013
@@ -70,7 +70,7 @@ public class FloatingPoint {
      *
      * @throws IllegalArgumentException if the specified representation is not recognized.
      */
-    public static final float getFloat(byte[] buffer, int offset) {
+    static float getFloat(byte[] buffer, int offset) {
         return Float.intBitsToFloat(convertFromByteToInt(buffer, offset));
     }
 
@@ -82,7 +82,7 @@ public class FloatingPoint {
      *
      * @throws IllegalArgumentException if the specified representation is not recognized.
      */
-    public static final double getDouble(byte[] buffer, int offset) {
+    static double getDouble(byte[] buffer, int offset) {
         return Double.longBitsToDouble(convertFromByteToLong(buffer, offset));
     }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Lob.java Fri May  3 03:42:14 2013
@@ -35,13 +35,13 @@ import org.apache.derby.shared.common.re
 
 public abstract class Lob implements UnitOfWorkListener {
     // The following flags specify the data type(s) a LOB instance currently contains
-    public static final int STRING = 2;
-    public static final int ASCII_STREAM = 4;
-    public static final int UNICODE_STREAM = 8;
-    public static final int CHARACTER_STREAM = 16;
-    public static final int BINARY_STREAM = 32;
-    public static final int BINARY_STRING = 64;
-    public static final int LOCATOR = 128;
+    static final int STRING = 2;
+    static final int ASCII_STREAM = 4;
+    static final int UNICODE_STREAM = 8;
+    static final int CHARACTER_STREAM = 16;
+    static final int BINARY_STREAM = 32;
+    static final int BINARY_STRING = 64;
+    static final int LOCATOR = 128;
 
     public static final int INVALID_LOCATOR = -1;
     //---------------------navigational members-----------------------------------

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogWriter.java Fri May  3 03:42:14 2013
@@ -228,7 +228,9 @@ public class LogWriter {
         }
     }
 
-    public void traceDeprecatedExit(Object instance, String methodName, Object returnValue) {
+    void traceDeprecatedExit(Object instance,
+                             String methodName,
+                             Object returnValue) {
         String className = getClassNameOfInstanceIfTraced(instance);
         if (className == null) {
             return;
@@ -240,7 +242,7 @@ public class LogWriter {
         }
     }
 
-    public void traceExit(
+    void traceExit(
             Object instance,
             String methodName,
             ClientResultSet resultSet) {
@@ -249,23 +251,7 @@ public class LogWriter {
         traceExit(instance, methodName, returnValue);
     }
 
-    public void traceExit(
-            Object instance,
-            String methodName,
-            ClientCallableStatement returnValue) {
-
-        traceExit(instance, methodName, "CallableStatement@" + Integer.toHexString(returnValue.hashCode()));
-    }
-
-    public void traceExit(
-            Object instance,
-            String methodName,
-            ClientPreparedStatement returnValue) {
-
-        traceExit(instance, methodName, "PreparedStatement@" + Integer.toHexString(returnValue.hashCode()));
-    }
-
-    public void traceExit(
+    void traceExit(
             Object instance,
             String methodName,
             ClientStatement returnValue) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData.java Fri May  3 03:42:14 2013
@@ -34,7 +34,7 @@ import java.sql.SQLException;
  * lifetime of the metadata object equal to the logical connection instead
  * of the underlying physical connection.
  */
-public class LogicalDatabaseMetaData implements DatabaseMetaData {
+class LogicalDatabaseMetaData implements DatabaseMetaData {
 
     /** The associated logical connection. */
     private final LogicalConnection logicalCon;
@@ -52,8 +52,8 @@ public class LogicalDatabaseMetaData imp
      * @param logWriter destination for log/error messages
      * @throws SQLException if obtaining the JDBC driver versions fail
      */
-    public LogicalDatabaseMetaData(LogicalConnection logicalCon,
-                                   LogWriter logWriter)
+    LogicalDatabaseMetaData(LogicalConnection logicalCon,
+                            LogWriter logWriter)
             throws SQLException {
         this.logicalCon = logicalCon;
         this.logWriter = logWriter;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalDatabaseMetaData40.java Fri May  3 03:42:14 2013
@@ -31,7 +31,7 @@ import org.apache.derby.shared.common.re
  *
  * @see LogicalDatabaseMetaData
  */
-public class LogicalDatabaseMetaData40
+class LogicalDatabaseMetaData40
     extends LogicalDatabaseMetaData {
 
     /**

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/LogicalStatementEntity.java Fri May  3 03:42:14 2013
@@ -154,7 +154,7 @@ abstract class LogicalStatementEntity
      * @return A statement.
      * @throws SQLException if the logical statement has been closed
      */
-    synchronized Statement getPhysStmt()
+    private synchronized Statement getPhysStmt()
             throws SQLException
     {
         if ( hasCallableStmt ) { return getPhysCs(); }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/ProductLevel.java Fri May  3 03:42:14 2013
@@ -21,13 +21,13 @@
 package org.apache.derby.client.am;
 
 public class ProductLevel {
-    public String databaseProductName_;
-    public int versionLevel_;
-    public int releaseLevel_;
-    public int modificationLevel_;
+    String databaseProductName_;
+    int versionLevel_;
+    int releaseLevel_;
+    private int modificationLevel_;
 
     // The following value is sent in the srvrlslv level
-    public String databaseProductVersion_;
+    String databaseProductVersion_;
 
     // The productID is set by the constructors.
     // dabaseProductVersion added by derby to include  srvrlslv
@@ -64,7 +64,9 @@ public class ProductLevel {
         }
     }
 
-    public boolean greaterThanOrEqualTo(int versionLevel, int releaseLevel, int modificationLevel) {
+    boolean greaterThanOrEqualTo(int versionLevel,
+                                 int releaseLevel,
+                                 int modificationLevel) {
         if (versionLevel_ > versionLevel) {
             return true;
         } else if (versionLevel_ == versionLevel) {
@@ -79,7 +81,9 @@ public class ProductLevel {
         return false;
     }
 
-    public boolean lessThan(int versionLevel, int releaseLevel, int modificationLevel) {
+    boolean lessThan(int versionLevel,
+                     int releaseLevel,
+                     int modificationLevel) {
         if (versionLevel_ < versionLevel) {
             return true;
         } else if (versionLevel_ == versionLevel) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SectionManager.java Fri May  3 03:42:14 2013
@@ -29,16 +29,7 @@ import org.apache.derby.shared.common.re
 
 
 public class SectionManager {
-    String collection_;
-    Agent agent_;
-
-    // Cursor holdability attributes used as package cluster indices.
-    // Not defined in PackageBindOptions because this attribute is part of the
-    // declare cursor [with hold] sql string based on section binds.
-    // By convention, we bind all sections in the same package with
-    // the same holdability.
-    final static int HOLD = 0;
-    final static int NO_HOLD = 1;
+    private Agent agent_;
 
     // The following stack of available sections is
     // for pooling and recycling previously used sections.
@@ -48,21 +39,21 @@ public class SectionManager {
     private final Stack<Section> freeSectionsNonHold_;
     private final Stack<Section> freeSectionsHold_;
 
-    int nextAvailableSectionNumber_ = 1;
+    private int nextAvailableSectionNumber_ = 1;
 
     // store package consistency token information and initialized in
     // setPKGNAMCBytes
     // holdPKGNAMCBytes stores PKGNAMCBytes when holdability is hold
     // noHoldPKGNAMCBytes stores PKGNAMCBytes when holdability is no hold
-    public byte[] holdPKGNAMCBytes = null;
-    public byte[] noHoldPKGNAMCBytes = null;
+    byte[] holdPKGNAMCBytes = null;
+    byte[] noHoldPKGNAMCBytes = null;
 
 
-    final static String packageNameWithHold__ = "SYSLH000";
-    final static String packageNameWithNoHold__ = "SYSLN000";
+    private final static String packageNameWithHold__ = "SYSLH000";
+    private final static String packageNameWithNoHold__ = "SYSLN000";
 
-    final static String cursorNamePrefixWithHold__ = "SQL_CURLH000C";
-    final static String cursorNamePrefixWithNoHold__ = "SQL_CURLN000C";
+    private final static String cursorNamePrefixWithHold__ = "SQL_CURLH000C";
+    private final static String cursorNamePrefixWithNoHold__ = "SQL_CURLN000C";
 
     // Jdbc 1 positioned updates are implemented via
     // sql scan for "...where current of <users-cursor-name>",
@@ -85,14 +76,10 @@ public class SectionManager {
         positionedUpdateCursorNameToResultSet_ =
             new Hashtable<String, WeakReference<ClientResultSet>>();
 
-    String databaseName;
-
-    int maxNumSections_ = 32768;
+    private final int maxNumSections_ = 32768;
 
-    public SectionManager(String collection, Agent agent, String databaseName) {
-        collection_ = collection;
+    public SectionManager(Agent agent) {
         agent_ = agent;
-        this.databaseName = databaseName;
         freeSectionsNonHold_ = new Stack<Section>();
         freeSectionsHold_ = new Stack<Section>();
     }
@@ -106,7 +93,7 @@ public class SectionManager {
      *                             is stored in holdPKGNAMCBytes and in noHoldPKGNAMCBytes when holdability is set to
      *                             CLOSE_CURSORS_AT_COMMIT
      */
-    public void setPKGNAMCBytes(byte[] b, int resultSetHoldability) {
+    void setPKGNAMCBytes(byte[] b, int resultSetHoldability) {
         if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             agent_.sectionManager_.holdPKGNAMCBytes = b;
         } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {
@@ -118,8 +105,7 @@ public class SectionManager {
     //------------------------entry points----------------------------------------
 
     // Get a section for either a jdbc update or query statement.
-    public Section getDynamicSection(int resultSetHoldability) throws SqlException {
-        int cursorHoldIndex;
+    Section getDynamicSection(int resultSetHoldability) throws SqlException {
         if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             return getSection(freeSectionsHold_, packageNameWithHold__, cursorNamePrefixWithHold__, resultSetHoldability);
         } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {
@@ -131,7 +117,7 @@ public class SectionManager {
         }
     }
 
-    protected Section getSection(
+    private Section getSection(
             Stack freeSections,
             String packageName,
             String cursorNamePrefix,
@@ -153,7 +139,7 @@ public class SectionManager {
         }
     }
 
-    public void freeSection(Section section, int resultSetHoldability) {
+    void freeSection(Section section, int resultSetHoldability) {
         if (resultSetHoldability == ResultSet.HOLD_CURSORS_OVER_COMMIT) {
             this.freeSectionsHold_.push(section);
         } else if (resultSetHoldability == ResultSet.CLOSE_CURSORS_AT_COMMIT) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SignedBinary.java Fri May  3 03:42:14 2013
@@ -38,7 +38,7 @@ public class SignedBinary {
     /**
      * Get a byte from the buffer.
      */
-    public static final byte getByte(byte[] buffer, int offset) {
+    static byte getByte(byte[] buffer, int offset) {
         return buffer[ offset ];
     }
 
@@ -47,7 +47,7 @@ public class SignedBinary {
      *
      * @throws IllegalArgumentException if the specified byte order is not recognized.
      */
-    public static final short getShort(byte[] buffer, int offset) {
+    public static short getShort(byte[] buffer, int offset) {
         return (short) (((buffer[offset + 0] & 0xff) << 8) +
                 ((buffer[offset + 1] & 0xff) << 0));
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlCode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlCode.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlCode.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlCode.java Fri May  3 03:42:14 2013
@@ -31,7 +31,7 @@ package org.apache.derby.client.am;
 public class SqlCode {
     private int code_;
 
-    public SqlCode(int code) {
+    SqlCode(int code) {
         code_ = code;
     }
 
@@ -44,16 +44,10 @@ public class SqlCode {
         return code_;
     }
 
-    public final static SqlCode invalidCommitOrRollbackUnderXA = new SqlCode(-4200);
-
-    public final static SqlCode invalidSetAutoCommitUnderXA = new SqlCode(-4201);
-
     public final static SqlCode queuedXAError = new SqlCode(-4203);
 
-    public final static SqlCode disconnectError = new SqlCode(40000);
+    final static SqlCode disconnectError = new SqlCode(40000);
 
-    public final static SqlCode undefinedError = new SqlCode(-99999);
-    
     /** SQL code for SQL state 02000 (end of data). DRDA does not
      * specify the SQL code for this SQL state, but Derby uses 100. */
     public final static SqlCode END_OF_DATA = new SqlCode(100);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlException.java Fri May  3 03:42:14 2013
@@ -73,17 +73,17 @@ import org.apache.derby.shared.common.re
 // the constructor <code>new SqlException(java.sql.SQLException wrapMe)</code)
 //
 public class SqlException extends Exception implements Diagnosable {
-    protected static final int DEFAULT_ERRCODE = 99999;
-    protected transient Sqlca sqlca_ = null; // for engine generated errors only
+    private static final int DEFAULT_ERRCODE = 99999;
+    private transient Sqlca sqlca_ = null; // for engine generated errors only
     /** Tells which of the messages in the SQLCA this exception refers to
      * (counting from 0). For engine generated errors only. */
     private transient int messageNumber_;
-    protected String message_ = null;
-    protected String cachedMessage_ = null;
+    private String message_ = null;
+    private String cachedMessage_ = null;
     private String batchPositionLabel_; // for batched exceptions only
-    protected String sqlstate_ = null;
-    protected int errorcode_ = DEFAULT_ERRCODE;
-    protected String causeString_ = null;
+    private String sqlstate_ = null;
+    private int errorcode_ = DEFAULT_ERRCODE;
+    private String causeString_ = null;
     protected SqlException nextException_;
     
     public static final String CLIENT_MESSAGE_RESOURCE_NAME =
@@ -94,7 +94,7 @@ public class SqlException extends Except
      * It will be over written by the SQLException factory of the
      * supported JDBC version.
      */
-    static SQLExceptionFactory
+    private static SQLExceptionFactory
             exceptionFactory = new SQLExceptionFactory ();
     
     /** 
@@ -163,7 +163,7 @@ public class SqlException extends Except
      *      a non-SQL exception can not be chained.  Instead, the exception class
      *      and message text is appended to the message for this exception.
      */
-    public SqlException(LogWriter logwriter, 
+    SqlException(LogWriter logwriter,
         ClientMessageId msgid, Object[] args, Throwable cause)
     {
         this(
@@ -178,7 +178,7 @@ public class SqlException extends Except
 
     // Use the following SQLExceptions when you want to override the error
     // code that is derived from the severity of the message id.
-    public SqlException(LogWriter logWriter, ClientMessageId msgid, Object[] args,
+    SqlException(LogWriter logWriter, ClientMessageId msgid, Object[] args,
         SqlCode sqlcode, Throwable t) {
         this(logWriter, msgid, args, t);
         this.errorcode_ = sqlcode.getCode();
@@ -189,10 +189,6 @@ public class SqlException extends Except
         this(logWriter, msgid, args, sqlcode, (Throwable)null);
     }
         
-    public SqlException(LogWriter logWriter, ClientMessageId msgid, SqlCode sqlcode) {
-        this(logWriter, msgid, (Object[])null, sqlcode);
-    }
-    
     public SqlException(LogWriter logWriter, ClientMessageId msgid, Object arg1,
         SqlCode sqlcode) {
         this(logWriter, msgid, new Object[] {arg1}, sqlcode);
@@ -212,7 +208,9 @@ public class SqlException extends Except
         this (logwriter, msgid, (Object[])null, cause);
     }
     
-    public SqlException(LogWriter logwriter, ClientMessageId msgid, Object[] args)
+    private SqlException(LogWriter logwriter,
+                         ClientMessageId msgid,
+                         Object[] args)
     {
         this(logwriter, msgid, args, (Throwable)null);
     }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/SqlWarning.java Fri May  3 03:42:14 2013
@@ -34,45 +34,28 @@ public class SqlWarning extends SqlExcep
 
     protected SqlWarning nextWarning_;
     
-    public SqlWarning(LogWriter logwriter, 
-        ClientMessageId msgid, Object[] args, Throwable cause)
-    {
-        super(logwriter, msgid, args, cause);
-    }
-    
-    public SqlWarning(LogWriter logwriter, ClientMessageId msgid, Object[] args)
-    {
-        this(logwriter, msgid, args, null);
-    }
-    
-    public SqlWarning (LogWriter logwriter, ClientMessageId msgid)
+    SqlWarning (LogWriter logwriter, ClientMessageId msgid)
     {
         super(logwriter, msgid);
     }
     
-    public SqlWarning(LogWriter logwriter, ClientMessageId msgid, Object arg1)
+    SqlWarning(LogWriter logwriter, ClientMessageId msgid, Object arg1)
     {
         super(logwriter, msgid, arg1);
     }
     
-    public SqlWarning(LogWriter logwriter,
+    SqlWarning(LogWriter logwriter,
         ClientMessageId msgid, Object arg1, Object arg2)
     {
         super(logwriter, msgid, arg1, arg2);
     }
     
-    public SqlWarning(LogWriter logwriter,
-        ClientMessageId msgid, Object arg1, Object arg2, Object arg3)
-    {
-        super(logwriter, msgid, arg1, arg2, arg3);
-    }
-    
     public SqlWarning(LogWriter logWriter, Sqlca sqlca)
     {
         super(logWriter, sqlca);
     }
     
-    public void setNextWarning(SqlWarning warning)
+    void setNextWarning(SqlWarning warning)
     {
         // Add this warning to the end of the chain
         SqlWarning theEnd = this;
@@ -82,11 +65,6 @@ public class SqlWarning extends SqlExcep
         theEnd.nextWarning_ = warning;
     }
     
-    public SqlWarning getNextWarning()
-    {
-        return nextWarning_;
-    }
-    
     /**
      * Get the java.sql.SQLWarning for this SqlWarning
      */

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java?rev=1478635&r1=1478634&r2=1478635&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Sqlca.java Fri May  3 03:42:14 2013
@@ -32,12 +32,12 @@ import org.apache.derby.shared.common.re
 public abstract class Sqlca {
 
     // Indexes into sqlErrd_
-    public  static  final   int HIGH_ORDER_ROW_COUNT = 0;
-    public  static  final   int LOW_ORDER_ROW_COUNT = 1;
-    public  static  final   int LOW_ORDER_UPDATE_COUNT = 2;
-    public  static  final   int HIGH_ORDER_UPDATE_COUNT = 3;
+    private  static  final   int HIGH_ORDER_ROW_COUNT = 0;
+    private  static  final   int LOW_ORDER_ROW_COUNT = 1;
+    private  static  final   int LOW_ORDER_UPDATE_COUNT = 2;
+    private  static  final   int HIGH_ORDER_UPDATE_COUNT = 3;
     public  static  final   int SQL_ERR_LENGTH = 6;
-    transient protected ClientConnection connection_;
+    transient private ClientConnection connection_;
     SqlException exceptionThrownOnStoredProcInvocation_;
     boolean messageTextRetrievedContainsTokensOnly_ = true;
 
@@ -232,11 +232,6 @@ public abstract class Sqlca {
         return Utils.getStringFromInts(getSqlErrd());
     }
 
-    // what is this for??
-    public int getReturnValue() {
-        return getSqlErrd()[0];
-    }
-
     private final static String elevenBlanks = "           ";
 
     synchronized public String getSqlWarn() {
@@ -418,15 +413,6 @@ public abstract class Sqlca {
         }
     }
 
-    public boolean includesSqlCode(int[] codes) {
-        for (int i = 0; i < codes.length; i++) {
-            if (codes[i] == getSqlCode()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
     /**
      * Get a {@code java.sql.DataTruncation} warning based on the information
      * in this SQLCA.



Mime
View raw message