db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r1371306 [2/2] - in /db/derby/code/trunk/java/client/org/apache/derby: client/ client/am/ client/net/ jdbc/
Date Thu, 09 Aug 2012 16:41:33 GMT
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=1371306&r1=1371305&r2=1371306&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 Thu Aug  9 16:41:32 2012
@@ -470,7 +470,7 @@ public class SqlException extends Except
     }
     
     public void setNextException(SQLException nextException)
-    {	
+    {    
         if ( wrappedException_ != null )
         {
             wrappedException_.setNextException(nextException);

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Statement.java Thu Aug  9 16:41:32 2012
@@ -1879,7 +1879,7 @@ public class Statement implements java.s
      * added to the list of open statements.
      */
     void markClosed() {
-    	markClosed(false);
+        markClosed(false);
     }
     
     /**
@@ -1921,7 +1921,7 @@ public class Statement implements java.s
         }
         
         if(removeListener)
-        	connection_.openStatements_.remove(this);
+            connection_.openStatements_.remove(this);
 
         if (setSpecialRegisterSection_ != null) {
             setSpecialRegisterSection_.free();
@@ -2735,10 +2735,10 @@ public class Statement implements java.s
             connection_.clientCursorNameCache_.put(cursorName_, 
                                                    cursorName_);
         } else {
-	    // canned cursor name
-	    agent_.sectionManager_.mapCursorNameToQuerySection
+        // canned cursor name
+        agent_.sectionManager_.mapCursorNameToQuerySection
                 (section_.getServerCursorName(), section_);
-	}
+    }
 
         // If client's cursor name is set, map the client's cursor name to the
         // result set, else map the server's cursor name to the result set.

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Types.java Thu Aug  9 16:41:32 2012
@@ -32,7 +32,7 @@ public class Types {
     public final static int BIT        =  java.sql.Types.BIT;          // -7;
 
     // Not currently supported as a DERBY column type.  Mapped to SMALLINT.
-    //public final static int TINYINT 	= java.sql.Types.TINYINT;       // -6;
+    //public final static int TINYINT     = java.sql.Types.TINYINT;       // -6;
 
     public final static int BOOLEAN = java.sql.Types.BOOLEAN;       // 16;
 
@@ -43,14 +43,14 @@ public class Types {
     public final static int BIGINT = java.sql.Types.BIGINT;        // -5;
 
     // We type using DOUBLE
-    //public final static int FLOAT 	= java.sql.Types.FLOAT;         // 6;
+    //public final static int FLOAT     = java.sql.Types.FLOAT;         // 6;
 
     public final static int REAL = java.sql.Types.REAL;          // 7;
 
     public final static int DOUBLE = java.sql.Types.DOUBLE;        // 8;
 
     // We type using DECIMAL
-    //public final static int NUMERIC 	= java.sql.Types.NUMERIC;       // 2;
+    //public final static int NUMERIC     = java.sql.Types.NUMERIC;       // 2;
 
     public final static int DECIMAL = java.sql.Types.DECIMAL;       // 3;
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePoint.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePoint.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePoint.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/CodePoint.java Thu Aug  9 16:41:32 2012
@@ -687,8 +687,8 @@ public class CodePoint {
     // XA Return Value
     public static final int XARETVAL = 0x1904;
 
-	// XA Timeout Value;
-	public static final int TIMEOUT = 0x1907;
+    // XA Timeout Value;
+    public static final int TIMEOUT = 0x1907;
 
     // new unit of work for XA
     public static final int SYNCTYPE_NEW_UOW = 0x09;

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/EncodedInputStream.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/EncodedInputStream.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/EncodedInputStream.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/EncodedInputStream.java Thu Aug  9 16:41:32 2012
@@ -72,7 +72,7 @@ public final class EncodedInputStream ex
     }
     
     private static final int BUFFERED_CHAR_LEN = 1024;
-	private static final ByteArrayInputStream suspendMarker = new ByteArrayInputStream( new byte[ 0 ] );
+    private static final ByteArrayInputStream suspendMarker = new ByteArrayInputStream( new byte[ 0 ] );
 
     private Reader reader_;
     private final char[] decodedBuffer_;
@@ -96,118 +96,118 @@ public final class EncodedInputStream ex
                                String encoding,
                                int charBufferSize,
                                int initialByteBufferSize) {
-	
-		reader_ = reader;
-		decodedBuffer_ = new char[charBufferSize];
-
-		encodedOutputStream_ = new PublicBufferOutputStream(
-				initialByteBufferSize);
-		
-		try{
-			encodedStreamWriter_ = new OutputStreamWriter(encodedOutputStream_,
+    
+        reader_ = reader;
+        decodedBuffer_ = new char[charBufferSize];
+
+        encodedOutputStream_ = new PublicBufferOutputStream(
+                initialByteBufferSize);
+        
+        try{
+            encodedStreamWriter_ = new OutputStreamWriter(encodedOutputStream_,
                                                           encoding);
-			
-		}catch(UnsupportedEncodingException e){
-			// Should never happen. It is up to the caller to ensure the
+            
+        }catch(UnsupportedEncodingException e){
+            // Should never happen. It is up to the caller to ensure the
             // specified encoding is available.
             if (SanityManager.DEBUG) {
                 SanityManager.THROWASSERT("Unavailable encoding specified: " +
                         encoding, e);
             }
-		}
-	
-		encodedInputStream_ = suspendMarker;
-	
+        }
+    
+        encodedInputStream_ = suspendMarker;
+    
     }
 
 
     private ByteArrayInputStream reEncode(Reader reader) 
-		throws IOException
+        throws IOException
     {
-	
-		int count;
-		do{
-			count = reader.read(decodedBuffer_, 0, decodedBuffer_.length);
-			
-		}while(count == 0);
-			
-		if(count < 0)
-			return null;
-	
-		encodedOutputStream_.reset();
-		encodedStreamWriter_.write(decodedBuffer_,0,count);
-		encodedStreamWriter_.flush();
-
-		int encodedLength = encodedOutputStream_.size();
-	
-		return new ByteArrayInputStream(encodedOutputStream_.getBuffer(),
-										0,
-										encodedLength);
+    
+        int count;
+        do{
+            count = reader.read(decodedBuffer_, 0, decodedBuffer_.length);
+            
+        }while(count == 0);
+            
+        if(count < 0)
+            return null;
+    
+        encodedOutputStream_.reset();
+        encodedStreamWriter_.write(decodedBuffer_,0,count);
+        encodedStreamWriter_.flush();
+
+        int encodedLength = encodedOutputStream_.size();
+    
+        return new ByteArrayInputStream(encodedOutputStream_.getBuffer(),
+                                        0,
+                                        encodedLength);
     }
     
     
     public int available() 
-		throws IOException {
-		
-		if(encodedInputStream_ == suspendMarker)
-			encodedInputStream_ = reEncode(reader_);
-
-		if(encodedInputStream_ == null){
-			return 0;
-		}
+        throws IOException {
+        
+        if(encodedInputStream_ == suspendMarker)
+            encodedInputStream_ = reEncode(reader_);
+
+        if(encodedInputStream_ == null){
+            return 0;
+        }
 
-		return encodedInputStream_.available();
-	
+        return encodedInputStream_.available();
+    
     }
     
 
     public void close() 
-		throws IOException {
-	
-		if(encodedInputStream_ != null ){
-			encodedInputStream_.close();
-			encodedInputStream_ = null;
-		}
-
-		if(reader_ != null ){
-			reader_.close();
-			reader_ = null;
-		}
-
-		if(encodedStreamWriter_ != null){
-			encodedStreamWriter_.close();
-			encodedStreamWriter_ = null;
-		}
-	
+        throws IOException {
+    
+        if(encodedInputStream_ != null ){
+            encodedInputStream_.close();
+            encodedInputStream_ = null;
+        }
+
+        if(reader_ != null ){
+            reader_.close();
+            reader_ = null;
+        }
+
+        if(encodedStreamWriter_ != null){
+            encodedStreamWriter_.close();
+            encodedStreamWriter_ = null;
+        }
+    
     }
     
     
     public int read() 
-		throws IOException {
-		
-		if(encodedInputStream_ == suspendMarker)
-			encodedInputStream_ = reEncode(reader_);
-
-		if(encodedInputStream_ == null){
-			return -1;
-		}
-	
-		int c = encodedInputStream_.read();
-
-		if(c > -1){
-			return c;
-	    
-		}else{
-			encodedInputStream_ = reEncode(reader_);
-	    
-			if(encodedInputStream_ == null){
-				return -1;
-			}
-	    
-			return encodedInputStream_.read();
+        throws IOException {
+        
+        if(encodedInputStream_ == suspendMarker)
+            encodedInputStream_ = reEncode(reader_);
+
+        if(encodedInputStream_ == null){
+            return -1;
+        }
+    
+        int c = encodedInputStream_.read();
+
+        if(c > -1){
+            return c;
+        
+        }else{
+            encodedInputStream_ = reEncode(reader_);
+        
+            if(encodedInputStream_ == null){
+                return -1;
+            }
+        
+            return encodedInputStream_.read();
 
-		}
-	
+        }
+    
     }
 
 }

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection.java Thu Aug  9 16:41:32 2012
@@ -219,7 +219,7 @@ public class NetConnection extends org.a
         securityMechanism_ = ClientBaseDataSource.getSecurityMechanism(properties);
         flowConnect(password, securityMechanism_);
         if(!isConnectionNull())
-        	completeConnect();
+            completeConnect();
         //DERBY-2026. reset timeout after connection is made
         netAgent_.setTimeout(0);
     }
@@ -1554,7 +1554,7 @@ public class NetConnection extends org.a
     // Allow local COMMIT/ROLLBACK only if we are not in an XA transaction
     protected boolean allowLocalCommitRollback_() {
        
-    	if (getXAState() == XA_T0_NOT_ASSOCIATED) {
+        if (getXAState() == XA_T0_NOT_ASSOCIATED) {
             return true;
         }
         return false;
@@ -1648,18 +1648,18 @@ public class NetConnection extends org.a
         agent_.endReadChain();
     }
     
-	/**
-	 * @return Returns the connectionNull.
-	 */
-	public boolean isConnectionNull() {
-		return connectionNull;
-	}
-	/**
-	 * @param connectionNull The connectionNull to set.
-	 */
-	public void setConnectionNull(boolean connectionNull) {
-		this.connectionNull = connectionNull;
-	}
+    /**
+     * @return Returns the connectionNull.
+     */
+    public boolean isConnectionNull() {
+        return connectionNull;
+    }
+    /**
+     * @param connectionNull The connectionNull to set.
+     */
+    public void setConnectionNull(boolean connectionNull) {
+        this.connectionNull = connectionNull;
+    }
 
     /**
      * Check whether the server has full support for the QRYCLSIMP

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnection40.java Thu Aug  9 16:41:32 2012
@@ -56,13 +56,13 @@ public class  NetConnection40 extends or
     public NetConnection40(NetLogWriter netLogWriter,
                          String databaseName,
                          java.util.Properties properties) throws SqlException {
-	super(netLogWriter,databaseName,properties);
+    super(netLogWriter,databaseName,properties);
     }
     public NetConnection40(NetLogWriter netLogWriter,
                          org.apache.derby.jdbc.ClientBaseDataSource dataSource,
                          String user,
                          String password) throws SqlException {
-	super(netLogWriter,dataSource,user,password);
+    super(netLogWriter,dataSource,user,password);
     }
      public NetConnection40(NetLogWriter netLogWriter,
                          int driverManagerLoginTimeout,
@@ -70,7 +70,7 @@ public class  NetConnection40 extends or
                          int portNumber,
                          String databaseName,
                          java.util.Properties properties) throws SqlException{
-	super(netLogWriter,driverManagerLoginTimeout,serverName,portNumber,databaseName,properties);
+    super(netLogWriter,driverManagerLoginTimeout,serverName,portNumber,databaseName,properties);
      }
      public NetConnection40(NetLogWriter netLogWriter,
                          String user,
@@ -78,7 +78,7 @@ public class  NetConnection40 extends or
                          org.apache.derby.jdbc.ClientBaseDataSource dataSource,
                          int rmId,
                          boolean isXAConn) throws SqlException{
-	super(netLogWriter,user,password,dataSource,rmId,isXAConn);
+    super(netLogWriter,user,password,dataSource,rmId,isXAConn);
     }
     public NetConnection40(NetLogWriter netLogWriter,
                          String ipaddr,
@@ -118,7 +118,7 @@ public class  NetConnection40 extends or
                          int rmId,
                          boolean isXAConn,
                          ClientPooledConnection cpc) throws SqlException{
-	super(netLogWriter,user,password,dataSource,rmId,isXAConn,cpc);
+    super(netLogWriter,user,password,dataSource,rmId,isXAConn,cpc);
     }
     
 
@@ -207,7 +207,7 @@ public class  NetConnection40 extends or
                 // we ignore the exception and return false.
                 return false;
             }
-	 }
+     }
 
         return true;  // The connection is valid
     }
@@ -237,12 +237,12 @@ public class  NetConnection40 extends or
     public void setClientInfo(String name, String value)
     throws SQLClientInfoException{
         Properties p = FailedProperties40.makeProperties(name,value); 
-	try { checkForClosedConnection(); }
-	catch (SqlException se) {
+    try { checkForClosedConnection(); }
+    catch (SqlException se) {
             throw new SQLClientInfoException
                 (se.getMessage(), se.getSQLState(),
-                		se.getErrorCode(),
-                		new FailedProperties40(p).getProperties());
+                        se.getErrorCode(),
+                        new FailedProperties40(p).getProperties());
         }
 
         if (name == null && value == null) {
@@ -267,27 +267,27 @@ public class  NetConnection40 extends or
      */
     public void setClientInfo(Properties properties)
     throws SQLClientInfoException {
-	FailedProperties40 fp = new FailedProperties40(properties);
-	try { checkForClosedConnection(); } 
-	catch (SqlException se) {
-	    throw new SQLClientInfoException(se.getMessage(), se.getSQLState(),
-	    		se.getErrorCode(),
-	    		fp.getProperties());
-	}
-	
-	if (properties == null || properties.isEmpty()) {
+    FailedProperties40 fp = new FailedProperties40(properties);
+    try { checkForClosedConnection(); } 
+    catch (SqlException se) {
+        throw new SQLClientInfoException(se.getMessage(), se.getSQLState(),
+                se.getErrorCode(),
+                fp.getProperties());
+    }
+    
+    if (properties == null || properties.isEmpty()) {
             return;
         }
 
-	SqlException se = 
-	    new SqlException(agent_.logWriter_,
-			     new ClientMessageId
-			     (SQLState.PROPERTY_UNSUPPORTED_CHANGE), 
-			     fp.getFirstKey(), fp.getFirstValue());
+    SqlException se = 
+        new SqlException(agent_.logWriter_,
+                 new ClientMessageId
+                 (SQLState.PROPERTY_UNSUPPORTED_CHANGE), 
+                 fp.getFirstKey(), fp.getFirstValue());
         throw new SQLClientInfoException(se.getMessage(),
-        		se.getSQLState(), 
-	    		se.getErrorCode(),
-	    		fp.getProperties());
+                se.getSQLState(), 
+                se.getErrorCode(),
+                fp.getProperties());
     }
 
     /**
@@ -301,11 +301,11 @@ public class  NetConnection40 extends or
      */
     public String getClientInfo(String name)
     throws SQLException{
-	try { 
-	    checkForClosedConnection(); 
-	    return null;
-	}
-	catch (SqlException se) { throw se.getSQLException(); }
+    try { 
+        checkForClosedConnection(); 
+        return null;
+    }
+    catch (SqlException se) { throw se.getSQLException(); }
     }
     
     /**
@@ -318,11 +318,11 @@ public class  NetConnection40 extends or
      */
     public Properties getClientInfo()
     throws SQLException{
-	try {
-	    checkForClosedConnection();
-	    return new Properties();
-	} 
-	catch (SqlException se) { throw se.getSQLException(); }
+    try {
+        checkForClosedConnection();
+        return new Properties();
+    } 
+    catch (SqlException se) { throw se.getSQLException(); }
     }
 
     /**

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetConnectionReply.java Thu Aug  9 16:41:32 2012
@@ -492,9 +492,9 @@ public class NetConnectionReply extends 
         
         //Check if the SQLCARD has null SQLException
         if(netSqlca.getSqlErrmc() == null)
-        	netConnection.setConnectionNull(true);
+            netConnection.setConnectionNull(true);
         else
-        	netConnection.completeSqlca(netSqlca);
+            netConnection.completeSqlca(netSqlca);
     }
 
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetCursor.java Thu Aug  9 16:41:32 2012
@@ -219,9 +219,9 @@ public class NetCursor extends org.apach
         // If data flows....
         if (daNullIndicator == 0x0) {
 
-	    if (SanityManager.DEBUG && receivedDeleteHoleWarning) {
-		SanityManager.THROWASSERT("Delete hole warning received: nulldata expected");
-	    }
+        if (SanityManager.DEBUG && receivedDeleteHoleWarning) {
+        SanityManager.THROWASSERT("Delete hole warning received: nulldata expected");
+        }
             incrementRowsReadEvent();
 
             // netResultSet_ is null if this method is invoked from Lob.position()
@@ -351,16 +351,16 @@ public class NetCursor extends org.apach
             }
         } else {
             if (netResultSet_ != null && netResultSet_.scrollable_) {
-		if (receivedDeleteHoleWarning) {
-		    setIsUpdataDeleteHole(rowIndex, true);
-		} else {
-		    if (SanityManager.DEBUG) {
-			// Invariant: for SUR, we introduced the warning
-			// in addition to null data.
-			SanityManager
-			    .THROWASSERT("Delete hole warning expected");
-		    }
-		}
+        if (receivedDeleteHoleWarning) {
+            setIsUpdataDeleteHole(rowIndex, true);
+        } else {
+            if (SanityManager.DEBUG) {
+            // Invariant: for SUR, we introduced the warning
+            // in addition to null data.
+            SanityManager
+                .THROWASSERT("Delete hole warning expected");
+            }
+        }
             }
         }
 

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/NetXAResource.java Thu Aug  9 16:41:32 2012
@@ -263,7 +263,7 @@ public class NetXAResource implements XA
             // to be thrown.
             throwXAException(rc, false);
         }else {
-        	conn_.setXAState(Connection.XA_T0_NOT_ASSOCIATED);
+            conn_.setXAState(Connection.XA_T0_NOT_ASSOCIATED);
         } 
     }
 
@@ -596,10 +596,10 @@ public class NetXAResource implements XA
         // DERBY-1025 - Flow an auto-commit if in auto-commit mode before 
         // entering a global transaction
         try {
-        	if(conn_.autoCommit_)
-        		conn_.flowAutoCommit();
+            if(conn_.autoCommit_)
+                conn_.flowAutoCommit();
         } catch (SqlException sqle) {
-        	rc = getSqlExceptionXAErrorCode(sqle);
+            rc = getSqlExceptionXAErrorCode(sqle);
             exceptionsOnXA = org.apache.derby.client.am.Utils.accumulateSQLException
                     (sqle, exceptionsOnXA);
         } 
@@ -783,9 +783,9 @@ public class NetXAResource implements XA
      * @throws XAException
      */
     private void setXaStateForXAException(int rc) {
-    	switch (rc)
-		{
-        	// Reset to T0, not  associated for XA_RB*, RM*
+        switch (rc)
+        {
+            // Reset to T0, not  associated for XA_RB*, RM*
            // XAER_RMFAIL and XAER_RMERR will be fatal to the connection
            // but that is not dealt with here
            case javax.transaction.xa.XAException.XAER_RMFAIL:
@@ -798,7 +798,7 @@ public class NetXAResource implements XA
            case javax.transaction.xa.XAException.XA_RBPROTO:
            case javax.transaction.xa.XAException.XA_RBTIMEOUT:
            case javax.transaction.xa.XAException.XA_RBTRANSIENT:
-           	conn_.setXAState(Connection.XA_T0_NOT_ASSOCIATED);
+               conn_.setXAState(Connection.XA_T0_NOT_ASSOCIATED);
            break;
             // No change for other XAExceptions
             // javax.transaction.xa.XAException.XA_NOMIGRATE
@@ -813,10 +813,10 @@ public class NetXAResource implements XA
            // javax.transaction.xa.XAException.XAER_INVAL                
            // javax.transaction.xa.XAException.XAER_PROTO
            // javax.transaction.xa.XAException.XAER_DUPID
-           // javax.transaction.xa.XAException.XAER_OUTSIDE            	
+           // javax.transaction.xa.XAException.XAER_OUTSIDE                
             default:
-  			  return;
-		}	
+                return;
+        }    
     }
 
     public boolean isSameRM(XAResource xares) throws XAException {

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Request.java Thu Aug  9 16:41:32 2012
@@ -203,7 +203,7 @@ public class Request {
 
         simpleDssFinalize = simpleFinalizeBuildingNextDss;
     }
-	
+    
     
     final void writeScalarStream(boolean chained,
                                  boolean chainedWithSameCorrelator,
@@ -219,10 +219,10 @@ public class Request {
                                writeNullByte,
                                parameterIndex);
         
-	}
+    }
     
-	
-	final void writeScalarStream(boolean chained,
+    
+    final void writeScalarStream(boolean chained,
                                  boolean chainedWithSameCorrelator,
                                  int codePoint,
                                  long length,
@@ -230,8 +230,8 @@ public class Request {
                                  boolean writeNullByte,
                                  int parameterIndex) throws DisconnectException, SqlException {
 
-		if (netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRIDDTA ||
-			netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRPWDDTA) {
+        if (netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRIDDTA ||
+            netAgent_.netConnection_.getSecurityMechanism() == NetConfiguration.SECMEC_EUSRPWDDTA) {
             // DERBY-4706
             // The network server doesn't support the security mechanisms above.
             // Further, the code in writeEncryptedScalarStream is/was in a bad
@@ -242,19 +242,19 @@ public class Request {
                     new ClientMessageId(SQLState.NOT_IMPLEMENTED),
                     "encrypted scalar streams");
 
-		}else{
-			
-			writePlainScalarStream(chained,
-								   chainedWithSameCorrelator,
-								   codePoint,
-								   length,
-								   in,
-								   writeNullByte,
-								   parameterIndex);
-			
-		}
+        }else{
+            
+            writePlainScalarStream(chained,
+                                   chainedWithSameCorrelator,
+                                   codePoint,
+                                   length,
+                                   in,
+                                   writeNullByte,
+                                   parameterIndex);
+            
+        }
 
-	}
+    }
     
     /**
      * Writes a stream with a known length onto the wire.
@@ -274,7 +274,7 @@ public class Request {
      * @throws DisconnectException if a severe error condition is encountered,
      *      causing the connection to be broken
      */
-	final private void writePlainScalarStream(boolean chained,
+    final private void writePlainScalarStream(boolean chained,
                                               boolean chainedWithSameCorrelator,
                                               int codePoint,
                                               long length,
@@ -291,9 +291,9 @@ public class Request {
         // send differs from the number of bytes to read (off by one byte).
         long leftToRead = length;
         long bytesToSend = writeEXTDTAStatusByte ? leftToRead + 1 : leftToRead;
-		int extendedLengthByteCount = prepScalarStream(chained,
-													   chainedWithSameCorrelator,
-													   writeNullByte,
+        int extendedLengthByteCount = prepScalarStream(chained,
+                                                       chainedWithSameCorrelator,
+                                                       writeNullByte,
                                                        bytesToSend);
         int nullIndicatorSize = writeNullByte ? 1 : 0;
         int dssMaxDataLength = DssConstants.MAX_DSS_LEN - 6 - 4 -
@@ -307,74 +307,74 @@ public class Request {
             bytesToRead--;
         }
 
-		buildLengthAndCodePointForLob(codePoint,
+        buildLengthAndCodePointForLob(codePoint,
                                       bytesToSend,
-									  writeNullByte,
-									  extendedLengthByteCount);
+                                      writeNullByte,
+                                      extendedLengthByteCount);
         byte status = DRDAConstants.STREAM_OK;
-		int bytesRead = 0;
-		do {
-			do {
-				try {
-					bytesRead =
+        int bytesRead = 0;
+        do {
+            do {
+                try {
+                    bytesRead =
                         in.read(buffer.array(), buffer.position(), bytesToRead);
-				} catch (Exception e) {
+                } catch (Exception e) {
                     status = DRDAConstants.STREAM_READ_ERROR;
                     padScalarStreamForError(leftToRead, bytesToRead,
                             writeEXTDTAStatusByte, status);
-					// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
+                    // set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
                     netAgent_.accumulateReadException(
                         new SqlException(
                             netAgent_.logWriter_,
                             new ClientMessageId(SQLState.NET_EXCEPTION_ON_READ),
                             parameterIndex, e.getMessage(), e));
 
-					return;
-				}
-				if (bytesRead == -1) {
+                    return;
+                }
+                if (bytesRead == -1) {
                     status = DRDAConstants.STREAM_TOO_SHORT;
                     padScalarStreamForError(leftToRead, bytesToRead,
                             writeEXTDTAStatusByte, status);
-					// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
+                    // set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
                     netAgent_.accumulateReadException(
                         new SqlException(netAgent_.logWriter_,
                             new ClientMessageId(SQLState.NET_PREMATURE_EOS),
                             parameterIndex));
-					return;
-				} else {
-					bytesToRead -= bytesRead;
+                    return;
+                } else {
+                    bytesToRead -= bytesRead;
                     buffer.position(buffer.position() + bytesRead);
-					leftToRead -= bytesRead;
-				}
-			} while (bytesToRead > 0);
-
-			bytesToRead = flushScalarStreamSegment(leftToRead, bytesToRead);
-		} while (leftToRead > 0);
-
-		// check to make sure that the specified length wasn't too small
-		try {
-			if (in.read() != -1) {
+                    leftToRead -= bytesRead;
+                }
+            } while (bytesToRead > 0);
+
+            bytesToRead = flushScalarStreamSegment(leftToRead, bytesToRead);
+        } while (leftToRead > 0);
+
+        // check to make sure that the specified length wasn't too small
+        try {
+            if (in.read() != -1) {
                 status = DRDAConstants.STREAM_TOO_LONG;
-				// set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
+                // set with SQLSTATE 01004: The value of a string was truncated when assigned to a host variable.
                 netAgent_.accumulateReadException(new SqlException(
                         netAgent_.logWriter_,
                         new ClientMessageId(
                             SQLState.NET_INPUTSTREAM_LENGTH_TOO_SMALL),
                         parameterIndex));
-			}
-		} catch (Exception e) {
+            }
+        } catch (Exception e) {
             status = DRDAConstants.STREAM_READ_ERROR;
             netAgent_.accumulateReadException(new SqlException(
                     netAgent_.logWriter_,
                     new ClientMessageId(
                         SQLState.NET_EXCEPTION_ON_STREAMLEN_VERIFICATION),
                     parameterIndex, e.getMessage(), e));
-		}
+        }
         // Write the status byte to the send buffer.
         if (writeEXTDTAStatusByte) {
             writeEXTDTAStatus(status);
         }
-	}
+    }
 
 
 
@@ -400,14 +400,14 @@ public class Request {
      * @throws DisconnectException if a severe error condition is encountered,
      *      causing the connection to be broken
      */
-	final private void writePlainScalarStream(boolean chained,
+    final private void writePlainScalarStream(boolean chained,
                                               boolean chainedWithSameCorrelator,
                                               int codePoint,
                                               java.io.InputStream in,
                                               boolean writeNullByte,
                                               int parameterIndex)
             throws DisconnectException {
-		
+        
         // We don't have the metadata available when we create this request
         // object, so we have to check here if we are going to write the status
         // byte or not.
@@ -417,7 +417,7 @@ public class Request {
         in = new BufferedInputStream( in );
 
         flushExistingDSS();
-		
+        
         ensureLength(DssConstants.MAX_DSS_LEN - buffer.position());
         
         buildDss(true,
@@ -429,14 +429,14 @@ public class Request {
         
         int spareInDss;
         
-		if (writeNullByte) {
-			spareInDss = DssConstants.MAX_DSS_LEN - 6 - 4 - 1;
-		} else {
-			spareInDss = DssConstants.MAX_DSS_LEN - 6 - 4;
-		}
-				
-		buildLengthAndCodePointForLob(codePoint,
-									  writeNullByte);
+        if (writeNullByte) {
+            spareInDss = DssConstants.MAX_DSS_LEN - 6 - 4 - 1;
+        } else {
+            spareInDss = DssConstants.MAX_DSS_LEN - 6 - 4;
+        }
+                
+        buildLengthAndCodePointForLob(codePoint,
+                                      writeNullByte);
         
         try{
             
@@ -474,13 +474,13 @@ public class Request {
 
             netAgent_.accumulateReadException(sqlex);
             
-					return;
+                    return;
         }
 
         if (writeEXTDTAStatusByte) {
             writeEXTDTAStatus(DRDAConstants.STREAM_OK);
         }
-	}
+    }
 
 
     // Throw DataTruncation, instead of closing connection if input size mismatches

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/net/Typdef.java Thu Aug  9 16:41:32 2012
@@ -259,11 +259,11 @@ public class Typdef implements java.lang
         /* 0x5F */ 0
     };
 
-	//
-	// FIXME: Instead of magic numbers, the first arg in each of these
-	// constructor calls should be the corresponding constant from
-	// DRDAConstants.
-	//
+    //
+    // FIXME: Instead of magic numbers, the first arg in each of these
+    // constructor calls should be the corresponding constant from
+    // DRDAConstants.
+    //
     protected static final FdocaSimpleDataArray[] environmentTables_ = {
         /* 0x00 Empties */
         null,

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java Thu Aug  9 16:41:32 2012
@@ -205,23 +205,23 @@ public abstract class ClientBaseDataSour
         throws SqlException
     {
         
-		if (s != null){
-			if (s.equalsIgnoreCase(SSL_OFF_STR)) {
-				return SSL_OFF;
+        if (s != null){
+            if (s.equalsIgnoreCase(SSL_OFF_STR)) {
+                return SSL_OFF;
             } else if (s.equalsIgnoreCase(SSL_BASIC_STR)) {
-				return SSL_BASIC;
-			} else if (s.equalsIgnoreCase(SSL_PEER_AUTHENTICATION_STR)) {
-				return SSL_PEER_AUTHENTICATION;
-			} else {
+                return SSL_BASIC;
+            } else if (s.equalsIgnoreCase(SSL_PEER_AUTHENTICATION_STR)) {
+                return SSL_PEER_AUTHENTICATION;
+            } else {
                 throw new SqlException(null,
                         new ClientMessageId(SQLState.INVALID_ATTRIBUTE),
                         Attribute.SSL_ATTR, s, SSL_OFF_STR + ", " +
                         SSL_BASIC_STR + ", " + SSL_PEER_AUTHENTICATION_STR);
-			}
-		} else {
-			// Default
-			return SSL_OFF;
-		}
+            }
+        } else {
+            // Default
+            return SSL_OFF;
+        }
     }
     
     /**
@@ -418,14 +418,14 @@ public abstract class ClientBaseDataSour
      * @return value of traceDirectory property
      */
     public static String getTraceDirectory(Properties properties) {
-    	String traceDirectoryString;
+        String traceDirectoryString;
        
-    	traceDirectoryString  = readSystemProperty(Attribute.CLIENT_JVM_PROPERTY_PREFIX+Attribute.CLIENT_TRACE_DIRECTORY);
+        traceDirectoryString  = readSystemProperty(Attribute.CLIENT_JVM_PROPERTY_PREFIX+Attribute.CLIENT_TRACE_DIRECTORY);
 
-		if (traceDirectoryString == null) 
-			return properties.getProperty(Attribute.CLIENT_TRACE_DIRECTORY);
-		else
-			return traceDirectoryString;
+        if (traceDirectoryString == null) 
+            return properties.getProperty(Attribute.CLIENT_TRACE_DIRECTORY);
+        else
+            return traceDirectoryString;
     }
     
     
@@ -435,15 +435,15 @@ public abstract class ClientBaseDataSour
      * @return value of the system property, null if there is no permission to read the property
      */
     private static String readSystemProperty(final String key) {
-    	//Using an anonymous class to read the system privilege because the
-    	//method java.security.AccessController.doPrivileged requires an 
-    	//instance of a class(which implements java.security.PrivilegedAction). 
-    	//Since readSystemProperty method is static, we can't simply pass "this"  
-    	//to doPrivileged method and have ClientBaseDataSource implement 
-    	//PrivilegedAction. To get around the static nature of method 
-    	//readSystemProperty, have an anonymous class implement PrivilegeAction.
-    	//This class will read the system property in it's run method and
-    	//return the value to the caller.
+        //Using an anonymous class to read the system privilege because the
+        //method java.security.AccessController.doPrivileged requires an 
+        //instance of a class(which implements java.security.PrivilegedAction). 
+        //Since readSystemProperty method is static, we can't simply pass "this"  
+        //to doPrivileged method and have ClientBaseDataSource implement 
+        //PrivilegedAction. To get around the static nature of method 
+        //readSystemProperty, have an anonymous class implement PrivilegeAction.
+        //This class will read the system property in it's run method and
+        //return the value to the caller.
         return AccessController.doPrivileged(new PrivilegedAction<String>() {
                 public String run() {
                     try {
@@ -454,9 +454,9 @@ public abstract class ClientBaseDataSour
                         // continue with the connection.  
                         return null;
                     }
-    		    }
-    	    }
-    	    );
+                }
+            }
+            );
     }
 
     // ---------------------------- traceFileAppend -----------------------------------
@@ -486,7 +486,7 @@ public abstract class ClientBaseDataSour
     }
     
     public final String getPassword() {
-    	return password;
+        return password;
     }
 
     //------------------------ interface methods ---------------------------------
@@ -1058,11 +1058,11 @@ public abstract class ClientBaseDataSour
      * @return value of traceLevel property
      */
     public static int getTraceLevel(Properties properties) {
-    	String traceLevelString;
-    	traceLevelString  = readSystemProperty(Attribute.CLIENT_JVM_PROPERTY_PREFIX+Attribute.CLIENT_TRACE_LEVEL);
-		if (traceLevelString == null) 
-			traceLevelString = properties.getProperty(Attribute.CLIENT_TRACE_LEVEL);
-		return parseInt(traceLevelString, propertyDefault_traceLevel);
+        String traceLevelString;
+        traceLevelString  = readSystemProperty(Attribute.CLIENT_JVM_PROPERTY_PREFIX+Attribute.CLIENT_TRACE_LEVEL);
+        if (traceLevelString == null) 
+            traceLevelString = properties.getProperty(Attribute.CLIENT_TRACE_LEVEL);
+        return parseInt(traceLevelString, propertyDefault_traceLevel);
     }
 
     synchronized public void setTraceLevel(int traceLevel) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDataSource40.java Thu Aug  9 16:41:32 2012
@@ -38,9 +38,9 @@ import org.apache.derby.shared.common.re
  * ClientConnectionPoolDataSource, and ClientXADataSource classes if
  * your application runs in the following environments:
  * <p/>
- *	<UL>
- *	<LI> JDBC 4.0 - Java SE 6
- *	<LI> JDBC 3.0 - J2SE 5.0
+ *    <UL>
+ *    <LI> JDBC 4.0 - Java SE 6
+ *    <LI> JDBC 3.0 - J2SE 5.0
  * </UL>
  *
  * <p>The example below registers a DNC data source object with a JNDI naming service.

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver.java Thu Aug  9 16:41:32 2012
@@ -47,8 +47,8 @@ public class ClientDriver implements jav
     // Keep track of the registere driver so that we can deregister it if we're a stored proc.
     static private ClientDriver registeredDriver__ = null;
 
-	static
-	{
+    static
+    {
         try {
             //
             // We'd rather load this slightly more capable driver.
@@ -61,10 +61,10 @@ public class ClientDriver implements jav
         {
             registerMe( new ClientDriver() );
         }
-	}
+    }
 
-	protected static void   registerMe( ClientDriver me )
-	{
+    protected static void   registerMe( ClientDriver me )
+    {
         // This may possibly hit the race-condition bug of java 1.1.
         // The Configuration static clause should execute before the following line does.
         if (Configuration.exceptionsOnLoadResources != null) {
@@ -179,27 +179,27 @@ public class ClientDriver implements jav
      * Other attributes will  be sent to the server with the database name
      * Assumes augmentedProperties is not null
      * 
-	 * @param database - Short database name
-	 * @param augmentedProperties - Set of properties to append as attributes
-	 * @return databaseName + attributes (e.g. mydb;create=true) 
-	 */
-	private String appendDatabaseAttributes(String database, Properties augmentedProperties) {
-	
-		StringBuffer longDatabase = new StringBuffer(database);
-		for (Enumeration keys = augmentedProperties.propertyNames();
-			 keys.hasMoreElements() ;)
-		{
-			String key = (String) keys.nextElement();
-			if (key.equals(Attribute.USERNAME_ATTR) || 
+     * @param database - Short database name
+     * @param augmentedProperties - Set of properties to append as attributes
+     * @return databaseName + attributes (e.g. mydb;create=true) 
+     */
+    private String appendDatabaseAttributes(String database, Properties augmentedProperties) {
+    
+        StringBuffer longDatabase = new StringBuffer(database);
+        for (Enumeration keys = augmentedProperties.propertyNames();
+             keys.hasMoreElements() ;)
+        {
+            String key = (String) keys.nextElement();
+            if (key.equals(Attribute.USERNAME_ATTR) || 
                 key.equals(Attribute.PASSWORD_ATTR) ||
                 key.equals(Attribute.SSL_ATTR))
-				continue;
-			longDatabase.append(";" + key + "=" + augmentedProperties.getProperty(key));
-		}
-		return longDatabase.toString();
-	}
+                continue;
+            longDatabase.append(";" + key + "=" + augmentedProperties.getProperty(key));
+        }
+        return longDatabase.toString();
+    }
 
-	public boolean acceptsURL(String url) throws java.sql.SQLException {
+    public boolean acceptsURL(String url) throws java.sql.SQLException {
         try
         {
             java.util.StringTokenizer urlTokenizer = 
@@ -351,7 +351,7 @@ public class ClientDriver implements jav
     private static String tokenizeDatabase(java.util.StringTokenizer urlTokenizer,
                                            String url) throws SqlException {
         try {
-        	// DERBY-618 - database name can contain spaces in the path
+            // DERBY-618 - database name can contain spaces in the path
             String databaseName = urlTokenizer.nextToken("\t\n\r\f;");
             return databaseName;
         } catch (java.util.NoSuchElementException e) {

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver40.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientDriver40.java Thu Aug  9 16:41:32 2012
@@ -35,10 +35,10 @@ import org.apache.derby.shared.common.re
  */
 public class ClientDriver40 extends ClientDriver
 {
-	static
-	{
+    static
+    {
         registerMe( new ClientDriver40() );
-	}
+    }
 
     ////////////////////////////////////////////////////////////////////
     //

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource.java Thu Aug  9 16:41:32 2012
@@ -34,7 +34,7 @@ import org.apache.derby.client.net.NetLo
  * </p>
  * An XADataSource is a factory for XAConnection objects.  It represents a
  * RM in a DTP environment.  An object that implements the XADataSource
- * interface is typically registered with a JNDI service provider.   	
+ * interface is typically registered with a JNDI service provider.       
  * <P>
  * ClientXADataSource automatically supports the correct JDBC specification version
  * for the Java Virtual Machine's environment.

Modified: db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java?rev=1371306&r1=1371305&r2=1371306&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientXADataSource40.java Thu Aug  9 16:41:32 2012
@@ -33,7 +33,7 @@ import org.apache.derby.shared.common.re
  * </p>
  * An XADataSource is a factory for XAConnection objects.  It represents a
  * RM in a DTP environment.  An object that implements the XADataSource
- * interface is typically registered with a JNDI service provider.   	
+ * interface is typically registered with a JNDI service provider.       
  * <P>
  * Use ClientXADataSource40 if your application runs at JDBC level 4.1 (or
  * higher). Use ClientXADataSource



Mime
View raw message