harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r556825 [5/10] - in /harmony/enhanced/classlib/branches/java6/modules: archive/src/main/java/java/util/jar/ archive/src/main/java/java/util/zip/ archive/src/main/java/org/apache/harmony/archive/internal/nls/ archive/src/main/java/org/apache...
Date Tue, 17 Jul 2007 06:31:04 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/SqlUtil.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/SqlUtil.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/SqlUtil.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/SqlUtil.java Mon Jul 16 23:30:22 2007
@@ -21,52 +21,52 @@
 import java.sql.Types;
 import org.apache.harmony.sql.internal.nls.Messages;
 
-
-class SqlUtil{
+class SqlUtil {
     /*
-     * FIXME:Validate column types is defined by java.sql.Types, current implementation is ugly, need to find 
-     * an elegant and effient way to check all constants defined in java.util.sql.Types 
+     * FIXME:Validate column types is defined by java.sql.Types, current
+     * implementation is ugly, need to find an elegant and effient way to check
+     * all constants defined in java.util.sql.Types
      */
     static void validateType(int type) throws SQLException {
-        switch(type){
-            case Types.ARRAY:
-            case Types.BIGINT:
-            case Types.BINARY:
-            case Types.BIT:
-            case Types.BLOB:
-            case Types.BOOLEAN:
-            case Types.CHAR:
-            case Types.CLOB:
-            case Types.DATALINK:
-            case Types.DATE:
-            case Types.DECIMAL:
-            case Types.DISTINCT:
-            case Types.DOUBLE:
-            case Types.FLOAT:
-            case Types.INTEGER:
-            case Types.JAVA_OBJECT:
-            case Types.LONGVARBINARY:
-            case Types.LONGVARCHAR:
-            case Types.NULL:
-            case Types.NUMERIC:
-            case Types.OTHER:
-            case Types.REAL:
-            case Types.REF:
-            case Types.SMALLINT:
-            case Types.STRUCT:
-            case Types.TIME:
-            case Types.TIMESTAMP:
-            case Types.TINYINT:
-            case Types.VARBINARY:
-            case Types.VARCHAR:
-                return;
+        switch (type) {
+        case Types.ARRAY:
+        case Types.BIGINT:
+        case Types.BINARY:
+        case Types.BIT:
+        case Types.BLOB:
+        case Types.BOOLEAN:
+        case Types.CHAR:
+        case Types.CLOB:
+        case Types.DATALINK:
+        case Types.DATE:
+        case Types.DECIMAL:
+        case Types.DISTINCT:
+        case Types.DOUBLE:
+        case Types.FLOAT:
+        case Types.INTEGER:
+        case Types.JAVA_OBJECT:
+        case Types.LONGVARBINARY:
+        case Types.LONGVARCHAR:
+        case Types.NULL:
+        case Types.NUMERIC:
+        case Types.OTHER:
+        case Types.REAL:
+        case Types.REF:
+        case Types.SMALLINT:
+        case Types.STRUCT:
+        case Types.TIME:
+        case Types.TIMESTAMP:
+        case Types.TINYINT:
+        case Types.VARBINARY:
+        case Types.VARCHAR:
+            return;
         }
         throw new SQLException(Messages.getString("sql.28")); //$NON-NLS-1$
     }
 
-    static String getClassNameByType(int type){ 
+    static String getClassNameByType(int type) {
         String className = null;
-        switch (type) {        
+        switch (type) {
         case Types.BINARY:
         case Types.BLOB:
         case Types.LONGVARBINARY:

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/WebRowSet.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/WebRowSet.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/WebRowSet.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/WebRowSet.java Mon Jul 16 23:30:22 2007
@@ -37,7 +37,8 @@
 
     void writeXml(ResultSet rs, Writer writer) throws SQLException;
 
-    void writeXml(ResultSet rs, OutputStream oStream) throws SQLException, IOException;
+    void writeXml(ResultSet rs, OutputStream oStream) throws SQLException,
+            IOException;
 
     void writeXml(Writer writer) throws SQLException;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/DefaultUDTMap.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/DefaultUDTMap.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/DefaultUDTMap.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/DefaultUDTMap.java Mon Jul 16 23:30:22 2007
@@ -39,7 +39,7 @@
             throws SerialException {
         SerialDatalink[] ret = new SerialDatalink[elements.length];
         for (int i = 0; i < elements.length; i++) {
-            ret[i] = new SerialDatalink((URL)elements[i]);
+            ret[i] = new SerialDatalink((URL) elements[i]);
         }
         return ret;
     }
@@ -48,7 +48,7 @@
             throws SerialException {
         Struct[] ret = new Struct[elements.length];
         for (int i = 0; i < elements.length; i++) {
-            ret[i] = (Struct)elements[i];
+            ret[i] = (Struct) elements[i];
         }
         return ret;
     }
@@ -57,7 +57,7 @@
             throws SerialException {
         Array[] ret = new Array[elements.length];
         for (int i = 0; i < elements.length; i++) {
-            ret[i] = (Array)elements[i];
+            ret[i] = (Array) elements[i];
         }
         return ret;
     }
@@ -65,7 +65,7 @@
     public static Clob[] processClob(Object[] elements) throws SQLException {
         Clob[] ret = new Clob[elements.length];
         for (int i = 0; i < elements.length; i++) {
-            ret[i] = new SerialClob((Clob)elements[i]);
+            ret[i] = new SerialClob((Clob) elements[i]);
         }
         return ret;
     }
@@ -73,7 +73,7 @@
     public static Blob[] processBlob(Object[] elements) throws SQLException {
         Blob[] ret = new Blob[elements.length];
         for (int i = 0; i < elements.length; i++) {
-            ret[i] = new SerialBlob((Blob)elements[i]);
+            ret[i] = new SerialBlob((Blob) elements[i]);
         }
         return ret;
     }
@@ -90,4 +90,3 @@
         return ret;
     }
 }
-

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLInputImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLInputImpl.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLInputImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLInputImpl.java Mon Jul 16 23:30:22 2007
@@ -38,22 +38,24 @@
 import org.apache.harmony.sql.internal.nls.Messages;
 
 /**
- * A concrete implementation of SQLInput. The readXXX methods will be called
- * by SQLData.readSQL, which read different objects such as Array, BigDecimal
- * from this SQLInputImpl object.
+ * A concrete implementation of SQLInput. The readXXX methods will be called by
+ * SQLData.readSQL, which read different objects such as Array, BigDecimal from
+ * this SQLInputImpl object.
  * 
  * Different JDBC drivers may have their own implementation of SQLInput and
  * won't use this class.
  */
 public class SQLInputImpl implements SQLInput {
-    
+
     private Object[] attributes;
-    private Map<String,Class<?>> map;
+
+    private Map<String, Class<?>> map;
+
     private int readPosition = 0;
-    
+
     /**
      * Constructs a new SQLInputImpl object using an array of attributes and a
-     * custom name-type map. 
+     * custom name-type map.
      * 
      * @param attributes -
      *            the array of given attribute objects.
@@ -62,7 +64,8 @@
      * @throws SQLException -
      *             if the attributes or the map is null
      */
-    public SQLInputImpl(Object[] attributes, Map<String,Class<?>> map)throws SQLException {
+    public SQLInputImpl(Object[] attributes, Map<String, Class<?>> map)
+            throws SQLException {
         if (null == attributes || null == map) {
             throw new SQLException(Messages.getString("sql.34")); //$NON-NLS-1$
         }
@@ -76,10 +79,10 @@
      * @see java.sql.SQLInput#readArray()
      */
     public Array readArray() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];        
+        Object o = attributes[readPosition++];
         return (Array) o;
     }
 
@@ -89,7 +92,7 @@
      * @see java.sql.SQLInput#readAsciiStream()
      */
     public InputStream readAsciiStream() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -102,7 +105,7 @@
      * @see java.sql.SQLInput#readBigDecimal()
      */
     public BigDecimal readBigDecimal() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -115,7 +118,7 @@
      * @see java.sql.SQLInput#readBinaryStream()
      */
     public InputStream readBinaryStream() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -128,7 +131,7 @@
      * @see java.sql.SQLInput#readBlob()
      */
     public Blob readBlob() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -141,7 +144,7 @@
      * @see java.sql.SQLInput#readBoolean()
      */
     public boolean readBoolean() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -154,10 +157,10 @@
      * @see java.sql.SQLInput#readByte()
      */
     public byte readByte() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];        
+        Object o = attributes[readPosition++];
         return o == null ? (byte) 0 : ((Byte) o).byteValue();
     }
 
@@ -167,10 +170,10 @@
      * @see java.sql.SQLInput#readBytes()
      */
     public byte[] readBytes() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];        
+        Object o = attributes[readPosition++];
         return (byte[]) o;
     }
 
@@ -180,23 +183,23 @@
      * @see java.sql.SQLInput#readCharacterStream()
      */
     public Reader readCharacterStream() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
         return (Reader) o;
     }
 
-    /** 
+    /**
      * {@inheritDoc}
      * 
      * @see java.sql.SQLInput#readClob()
      */
     public Clob readClob() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];       
+        Object o = attributes[readPosition++];
         return (Clob) o;
     }
 
@@ -206,7 +209,7 @@
      * @see java.sql.SQLInput#readDate()
      */
     public Date readDate() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -219,7 +222,7 @@
      * @see java.sql.SQLInput#readDouble()
      */
     public double readDouble() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -232,7 +235,7 @@
      * @see java.sql.SQLInput#readFloat()
      */
     public float readFloat() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -245,7 +248,7 @@
      * @see java.sql.SQLInput#readInt()
      */
     public int readInt() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -258,7 +261,7 @@
      * @see java.sql.SQLInput#readLong()
      */
     public long readLong() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -271,18 +274,19 @@
      * @see java.sql.SQLInput#readObject()
      */
     public Object readObject() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
         if (o instanceof Struct) {
-            Struct structuredType = (Struct)o;
+            Struct structuredType = (Struct) o;
             String typeName = structuredType.getSQLTypeName();
             Class<?> c = map.get(typeName);
-            if(c != null) {
+            if (c != null) {
                 try {
-                    SQLData data = (SQLData)c.newInstance();
-                    SQLInputImpl input = new SQLInputImpl(structuredType.getAttributes(), map);
+                    SQLData data = (SQLData) c.newInstance();
+                    SQLInputImpl input = new SQLInputImpl(structuredType
+                            .getAttributes(), map);
                     data.readSQL(input, typeName);
                     return data;
                 } catch (IllegalAccessException e) {
@@ -290,7 +294,7 @@
                 } catch (InstantiationException e) {
                     throw new SQLException(e.getMessage());
                 }
-                
+
             }
         }
         return o;
@@ -302,10 +306,10 @@
      * @see java.sql.SQLInput#readRef()
      */
     public Ref readRef() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];        
+        Object o = attributes[readPosition++];
         return (Ref) o;
     }
 
@@ -315,7 +319,7 @@
      * @see java.sql.SQLInput#readShort()
      */
     public short readShort() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -328,10 +332,10 @@
      * @see java.sql.SQLInput#readString()
      */
     public String readString() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
-        Object o = attributes[readPosition++];        
+        Object o = attributes[readPosition++];
         return (String) o;
     }
 
@@ -341,7 +345,7 @@
      * @see java.sql.SQLInput#readTime()
      */
     public Time readTime() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -354,7 +358,7 @@
      * @see java.sql.SQLInput#readTimestamp()
      */
     public Timestamp readTimestamp() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
         }
         Object o = attributes[readPosition++];
@@ -367,9 +371,9 @@
      * @see java.sql.SQLInput#readURL()
      */
     public URL readURL() throws SQLException {
-        if(readPosition >= attributes.length) {
+        if (readPosition >= attributes.length) {
             throw new SQLException(Messages.getString("sql.35")); //$NON-NLS-1$
-        } 
+        }
         throw new SQLException(Messages.getString("sql.37")); //$NON-NLS-1$
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SQLOutputImpl.java Mon Jul 16 23:30:22 2007
@@ -46,7 +46,7 @@
     private Vector attributes;
 
     private Map map;
-    
+
     /**
      * Constructs a new SQLOutputImpl object using a list of attributes and a
      * custom name-type map. JDBC drivers will use this map to identify which
@@ -102,7 +102,7 @@
             attributes.addElement(stringBuffer.toString());
         } catch (IOException e) {
             throw new SQLException();
-        } 
+        }
     }
 
     /**
@@ -137,19 +137,19 @@
     @SuppressWarnings("unchecked")
     public void writeBlob(Blob theBlob) throws SQLException {
         if (theBlob != null) {
-            SerialBlob serialBlob = new SerialBlob (theBlob);
+            SerialBlob serialBlob = new SerialBlob(theBlob);
             attributes.addElement(serialBlob);
         } else {
             attributes.addElement(theBlob);
         }
     }
-    
+
     /**
      * {@inheritDoc}
      * 
      * @see java.sql.SQLOutput#writeBoolean(boolean)
      */
-    @SuppressWarnings({ "boxing", "unchecked" })
+    @SuppressWarnings( { "boxing", "unchecked" })
     public void writeBoolean(boolean theFlag) throws SQLException {
         attributes.addElement(theFlag);
     }
@@ -159,7 +159,7 @@
      * 
      * @see java.sql.SQLOutput#writeByte(byte)
      */
-    @SuppressWarnings({ "boxing", "unchecked" })
+    @SuppressWarnings( { "boxing", "unchecked" })
     public void writeByte(byte theByte) throws SQLException {
         attributes.addElement(theByte);
     }
@@ -169,7 +169,7 @@
      * 
      * @see java.sql.SQLOutput#writeBytes(byte[])
      */
-    @SuppressWarnings({ "boxing", "unchecked" })
+    @SuppressWarnings( { "boxing", "unchecked" })
     public void writeBytes(byte[] theBytes) throws SQLException {
         attributes.addElement(theBytes);
     }
@@ -193,7 +193,7 @@
             attributes.addElement(stringBuffer.toString());
         } catch (IOException e) {
             throw new SQLException();
-        } 
+        }
     }
 
     /**
@@ -220,7 +220,7 @@
     public void writeDate(Date theDate) throws SQLException {
         attributes.addElement(theDate);
     }
-    
+
     /**
      * {@inheritDoc}
      * 
@@ -268,10 +268,11 @@
      */
     @SuppressWarnings("unchecked")
     public void writeObject(SQLData theObject) throws SQLException {
-        if(theObject == null) {
+        if (theObject == null) {
             attributes.addElement(null);
         } else {
-            attributes.addElement(new SerialStruct(theObject, new HashMap(map)));
+            attributes
+                    .addElement(new SerialStruct(theObject, new HashMap(map)));
         }
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialArray.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialArray.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialArray.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialArray.java Mon Jul 16 23:30:22 2007
@@ -70,57 +70,59 @@
             transferElements(baseType, element);
         }
     }
-    
+
     /**
-	 * Transfers primitive objects to SerialXXX objects according to the given
-	 * type.
-     * @throws SQLException 
-	 */
-    private void transferElements(int type, Object[] element) throws SQLException {
-    	switch (type) {
-		case Types.STRUCT:
-			elements = DefaultUDTMap.processStruct(element);
-			break;
-		case Types.ARRAY:
-			elements = DefaultUDTMap.processArray(element);
-			break;
-		case Types.CLOB:
-			elements = DefaultUDTMap.processClob(element);
-			break;
-		case Types.BLOB:
-			elements = DefaultUDTMap.processBlob(element);
-			break;
-		case Types.DATALINK:
-			elements = DefaultUDTMap.processDatalink(element);
-			break;
-		case Types.JAVA_OBJECT:
-			elements = DefaultUDTMap.processObject(element);
-			break;
-		default:
-			elements = new Object[element.length];
-			for (int i = 0; i < element.length; i++) {
-				elements[i] = element[i];
-			}
-		}
+     * Transfers primitive objects to SerialXXX objects according to the given
+     * type.
+     * 
+     * @throws SQLException
+     */
+    private void transferElements(int type, Object[] element)
+            throws SQLException {
+        switch (type) {
+        case Types.STRUCT:
+            elements = DefaultUDTMap.processStruct(element);
+            break;
+        case Types.ARRAY:
+            elements = DefaultUDTMap.processArray(element);
+            break;
+        case Types.CLOB:
+            elements = DefaultUDTMap.processClob(element);
+            break;
+        case Types.BLOB:
+            elements = DefaultUDTMap.processBlob(element);
+            break;
+        case Types.DATALINK:
+            elements = DefaultUDTMap.processDatalink(element);
+            break;
+        case Types.JAVA_OBJECT:
+            elements = DefaultUDTMap.processObject(element);
+            break;
+        default:
+            elements = new Object[element.length];
+            for (int i = 0; i < element.length; i++) {
+                elements[i] = element[i];
+            }
+        }
     }
 
     /**
-	 * The constructor
-	 * 
-	 * @param array
-	 *            array to be serializated
-	 * @throws SerialException
-	 *             when any error occurs during serializing
-	 * @throws SQLException
-	 *             if array is null
-	 */
+     * The constructor
+     * 
+     * @param array
+     *            array to be serializated
+     * @throws SerialException
+     *             when any error occurs during serializing
+     * @throws SQLException
+     *             if array is null
+     */
     public SerialArray(Array array) throws SerialException, SQLException {
-    	if (null == array || null == array.getArray()) {
+        if (null == array || null == array.getArray()) {
             throw new SQLException(Messages.getString("sql.39")); //$NON-NLS-1$
         }
         baseType = array.getBaseType();
         baseTypeName = array.getBaseTypeName();
-        
+
         Object[] element = (Object[]) array.getArray();
         if (element.length == 0) {
             elements = new Object[0];
@@ -179,7 +181,7 @@
      */
     public Object getArray(long index, int count, Map<String, Class<?>> map)
             throws SerialException {
-        if (index < 0 || count + index > elements.length ) {
+        if (index < 0 || count + index > elements.length) {
             throw new SerialException(Messages.getString("sql.40")); //$NON-NLS-1$
         }
         Object[] ret = new Object[count];

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialClob.java Mon Jul 16 23:30:22 2007
@@ -61,9 +61,9 @@
             throw new SQLException(Messages.getString("sql.19"));//$NON-NLS-1$
         }
         if ((characterStream = clob.getCharacterStream()) == null
-				&& (asciiStream = clob.getAsciiStream()) == null) {
-			throw new SQLException(Messages.getString("sql.20"));//$NON-NLS-1$
-		}
+                && (asciiStream = clob.getAsciiStream()) == null) {
+            throw new SQLException(Messages.getString("sql.20"));//$NON-NLS-1$
+        }
 
         this.clob = clob;
         origLen = clob.length();
@@ -72,8 +72,8 @@
         try {
             characterStream.read(buf);
         } catch (IOException e) {
-            SerialException se = new SerialException(
-                    "SerialClob: " + e.getMessage());
+            SerialException se = new SerialException("SerialClob: "
+                    + e.getMessage());
 
             se.initCause(e);
             throw se;
@@ -116,12 +116,13 @@
     public long position(Clob searchClob, long start) throws SerialException,
             SQLException {
         checkValidation();
-        String searchString = searchClob.getSubString(1, (int)searchClob.length());
+        String searchString = searchClob.getSubString(1, (int) searchClob
+                .length());
         return position(searchString, start);
     }
 
-    public long position(String searchString, long start) throws SerialException,
-            SQLException {
+    public long position(String searchString, long start)
+            throws SerialException, SQLException {
         checkValidation();
         if (start < 1 || len - (start - 1) < searchString.length()) {
             return -1;
@@ -156,7 +157,7 @@
             throw new SerialException(Messages.getString("sql.25")); // $NON-NLS-1$
         }
         OutputStream os = clob.setAsciiStream(pos);
-        if(os == null){
+        if (os == null) {
             throw new SerialException(Messages.getString("sql.46")); // $NON-NLS-1$
         }
         return os;
@@ -169,7 +170,7 @@
             throw new SerialException(Messages.getString("sql.25")); // $NON-NLS-1$
         }
         Writer writer = clob.setCharacterStream(pos);
-        if(writer == null){
+        if (writer == null) {
             throw new SerialException(Messages.getString("sql.45")); // $NON-NLS-1$
         }
         return writer;
@@ -186,29 +187,29 @@
         if (pos < 1 || length < 0 || pos > (len - length + 1)) {
             throw new SerialException(Messages.getString("sql.21")); // $NON-NLS-1$
         }
-        if (offset < 0  || offset > (str.length() - length)) {
+        if (offset < 0 || offset > (str.length() - length)) {
             throw new SerialException(Messages.getString("sql.21")); // $NON-NLS-1$
         }
         if (length > len + offset) {
             throw new SerialException(Messages.getString("sql.23")); // $NON-NLS-1$
         }
-        str.getChars(offset, offset+length, buf, (int)pos-1);
+        str.getChars(offset, offset + length, buf, (int) pos - 1);
         return length;
     }
 
     public void truncate(long length) throws SerialException {
         checkValidation();
-        if(length > len || length < 0) {
+        if (length > len || length < 0) {
             throw new SerialException(Messages.getString("sql.24"));
         }
         char[] truncatedBuffer = new char[(int) length];
-        System.arraycopy(buf, 0, truncatedBuffer, 0, (int)length);
+        System.arraycopy(buf, 0, truncatedBuffer, 0, (int) length);
         buf = truncatedBuffer;
-        len = length;   
+        len = length;
     }
-    
+
     private void checkValidation() throws SerialException {
-        if(len == -1){
+        if (len == -1) {
             throw new SerialException(Messages.getString("sql.38")); //$NON-NLS-1$
         }
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialDatalink.java Mon Jul 16 23:30:22 2007
@@ -39,8 +39,10 @@
     /**
      * Constructor.
      * 
-     * @param url The URL to link to.
-     * @throws SerialException if <code>url</code> is null
+     * @param url
+     *            The URL to link to.
+     * @throws SerialException
+     *             if <code>url</code> is null
      */
     public SerialDatalink(URL url) throws SerialException {
         if (url == null) {
@@ -52,9 +54,10 @@
     /**
      * Gets a copied url object of this SerialDatalink object.
      * 
-     * @return a url object in the java programming language which represents this
-     *         SerialDatalink object.
-     * @throws SerialException if <code>url</code> can not be copied.
+     * @return a url object in the java programming language which represents
+     *         this SerialDatalink object.
+     * @throws SerialException
+     *             if <code>url</code> can not be copied.
      */
     public URL getDatalink() throws SerialException {
         URL copyUrl;

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialException.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialException.java Mon Jul 16 23:30:22 2007
@@ -26,13 +26,13 @@
  */
 
 public class SerialException extends SQLException {
-	private static final long serialVersionUID = -489794565168592690L;
+    private static final long serialVersionUID = -489794565168592690L;
 
-	public SerialException() {
-		super();
-	}
+    public SerialException() {
+        super();
+    }
 
-	public SerialException(String msg) {
-		super(msg);
-	}
+    public SerialException(String msg) {
+        super(msg);
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialJavaObject.java Mon Jul 16 23:30:22 2007
@@ -25,19 +25,20 @@
 
 public class SerialJavaObject implements Serializable, Cloneable {
 
-	private static final long serialVersionUID = -1465795139032831023L;
+    private static final long serialVersionUID = -1465795139032831023L;
 
-	/**
-	 * obj and chain are defined in serialized form.
-	 */
-	private Object obj;
+    /**
+     * obj and chain are defined in serialized form.
+     */
+    private Object obj;
 
-	@SuppressWarnings({ "unchecked", "unused" }) // Required by serialized form
+    @SuppressWarnings( { "unchecked", "unused" })
+    // Required by serialized form
     private Vector chain;
 
-	private transient Field[] fields;
+    private transient Field[] fields;
 
-	public SerialJavaObject(Object obj) throws SerialException {
+    public SerialJavaObject(Object obj) throws SerialException {
         if (null == obj) {
             throw new NullPointerException();
         }
@@ -47,14 +48,14 @@
         this.obj = obj;
     }
 
-	public Field[] getFields() throws SerialException {
-		if (fields == null) {
-			fields = obj.getClass().getFields();
-		}
-		return fields;
-	}
-
-	public Object getObject() throws SerialException {
-		return obj;
-	}
+    public Field[] getFields() throws SerialException {
+        if (fields == null) {
+            fields = obj.getClass().getFields();
+        }
+        return fields;
+    }
+
+    public Object getObject() throws SerialException {
+        return obj;
+    }
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/serial/SerialRef.java Mon Jul 16 23:30:22 2007
@@ -25,60 +25,60 @@
 import org.apache.harmony.sql.internal.nls.Messages;
 
 public class SerialRef implements Ref, Serializable, Cloneable {
-	private static final long serialVersionUID = -4727123500609662274L;
+    private static final long serialVersionUID = -4727123500609662274L;
 
-	/**
-	 * required by serialized form
-	 */
-	private String baseTypeName;
-
-	/**
-	 * store <code> reference </code> as an object, required by serialized form.
-	 */
-	private Object object;
-
-	/**
-	 * required by serialized form
-	 */
-	private Ref reference;
-
-	public SerialRef(Ref ref) throws SerialException, SQLException {
-		if (ref == null) {
-			throw new SQLException(Messages.getString("sql.9")); //$NON-NLS-1$
-		}
-		reference = ref;
-		object = ref;
-		baseTypeName = ref.getBaseTypeName();
-		if (baseTypeName == null) {
-			throw new SQLException(Messages.getString("sql.10"));//$NON-NLS-1$
-		}
-	}
-
-	public String getBaseTypeName() throws SerialException {
-		return baseTypeName;
-	}
-
-	public Object getObject() throws SerialException {
-		try {
-			return reference.getObject();
-		} catch (SQLException e) {
-			throw new SerialException(Messages.getString(
-					"sql.11", e.getMessage())); //$NON-NLS-1$
-		}
-	}
-
-	public Object getObject(Map<String, Class<?>> map) throws SerialException {
-		return map.get(object);
-	}
-
-	public void setObject(Object value) throws SerialException {
-		try {
-			reference.setObject(value);
-			object = value;
-		} catch (SQLException e) {
-			throw new SerialException(Messages.getString(
-					"sql.11", e.getMessage())); //$NON-NLS-1$
-		}
-	}
+    /**
+     * required by serialized form
+     */
+    private String baseTypeName;
+
+    /**
+     * store <code> reference </code> as an object, required by serialized form.
+     */
+    private Object object;
+
+    /**
+     * required by serialized form
+     */
+    private Ref reference;
+
+    public SerialRef(Ref ref) throws SerialException, SQLException {
+        if (ref == null) {
+            throw new SQLException(Messages.getString("sql.9")); //$NON-NLS-1$
+        }
+        reference = ref;
+        object = ref;
+        baseTypeName = ref.getBaseTypeName();
+        if (baseTypeName == null) {
+            throw new SQLException(Messages.getString("sql.10"));//$NON-NLS-1$
+        }
+    }
+
+    public String getBaseTypeName() throws SerialException {
+        return baseTypeName;
+    }
+
+    public Object getObject() throws SerialException {
+        try {
+            return reference.getObject();
+        } catch (SQLException e) {
+            throw new SerialException(Messages.getString(
+                    "sql.11", e.getMessage())); //$NON-NLS-1$
+        }
+    }
+
+    public Object getObject(Map<String, Class<?>> map) throws SerialException {
+        return map.get(object);
+    }
+
+    public void setObject(Object value) throws SerialException {
+        try {
+            reference.setObject(value);
+            object = value;
+        } catch (SQLException e) {
+            throw new SerialException(Messages.getString(
+                    "sql.11", e.getMessage())); //$NON-NLS-1$
+        }
+    }
 
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/ProviderImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/ProviderImpl.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/ProviderImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/ProviderImpl.java Mon Jul 16 23:30:22 2007
@@ -25,8 +25,8 @@
         className = name;
 
         try {
-			Class<?> implClass = Class.forName(className, true, Thread
-					.currentThread().getContextClassLoader());
+            Class<?> implClass = Class.forName(className, true, Thread
+                    .currentThread().getContextClassLoader());
             impl = (SyncProvider) implClass.newInstance();
         } catch (ClassNotFoundException e) {
             errMsg = Messages.getString("sql.40", className); //$NON-NLS-1$
@@ -34,19 +34,19 @@
             // ignore
         }
     }
-    
+
     public ProviderImpl(String name, String vendor, String version) {
         this(name);
-        
+
         this.vendor = vendor;
         this.version = version;
     }
 
     public SyncProvider getImpl() throws SyncFactoryException {
-		if (null == impl) {
-			throw new SyncFactoryException(Messages.getString(
-					"sql.40", className)); //$NON-NLS-1$
-		}
+        if (null == impl) {
+            throw new SyncFactoryException(Messages.getString(
+                    "sql.40", className)); //$NON-NLS-1$
+        }
         return impl;
     }
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncFactory.java Mon Jul 16 23:30:22 2007
@@ -37,7 +37,7 @@
  * three places to search SyncProviders: system properties, resource files and
  * the JNDI context.
  * 
- * Applications can also use it to add and remove SyncProviders at runtime. 
+ * Applications can also use it to add and remove SyncProviders at runtime.
  */
 public class SyncFactory {
     public static String ROWSET_SYNC_PROVIDER = "rowset.provider.classname"; //$NON-NLS-1$
@@ -54,15 +54,16 @@
 
     private static Context ctx;
 
-    private static String resLocation;    
-    
-    //TODO: the default provider hasn't been implemented yet
+    private static String resLocation;
+
+    // TODO: the default provider hasn't been implemented yet
     private static String defaultProviderName = "org.apache.harmony.sql.rowset.providers.RIOptimisticProvider"; //$NON-NLS-1$
 
-    private static ProviderImpl defaultProvider = new ProviderImpl(defaultProviderName);
-    
+    private static ProviderImpl defaultProvider = new ProviderImpl(
+            defaultProviderName);
+
     private static Logger logger;
-    
+
     private static boolean initialized;
 
     static {
@@ -86,13 +87,13 @@
     private static Enumeration<SyncProvider> getRegisteredProvidersImpl() {
         if (!initialized) {
             // 1. load from System property
-        	String rowsetPropStr = System.getProperty(ROWSET_SYNC_PROVIDER);
-        	if (rowsetPropStr != null) {
-        		String[] sysProviders = rowsetPropStr.split(":"); //$NON-NLS-1$    			
-				for (String sysProvider : sysProviders) {
-					providers.put(sysProvider, new ProviderImpl(sysProvider));
-				}   		
-        	}
+            String rowsetPropStr = System.getProperty(ROWSET_SYNC_PROVIDER);
+            if (rowsetPropStr != null) {
+                String[] sysProviders = rowsetPropStr.split(":"); //$NON-NLS-1$    			
+                for (String sysProvider : sysProviders) {
+                    providers.put(sysProvider, new ProviderImpl(sysProvider));
+                }
+            }
 
             // 2. looks in the resource file
             Properties rowsetProp = new Properties();
@@ -137,7 +138,7 @@
         }
         return providers.elements();
     }
-    
+
     /**
      * Initializes the registeration table if it is still empty.
      */
@@ -236,7 +237,7 @@
      *            the logging object
      */
     public static void setLogger(Logger logger) {
-        SyncFactory.logger = logger; 
+        SyncFactory.logger = logger;
     }
 
     /**

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/sql/rowset/spi/SyncProvider.java Mon Jul 16 23:30:22 2007
@@ -55,7 +55,8 @@
 
     public abstract int getProviderGrade();
 
-    public abstract void setDataSourceLock(int dataSourceLock) throws SyncProviderException;
+    public abstract void setDataSourceLock(int dataSourceLock)
+            throws SyncProviderException;
 
     public abstract int getDataSourceLock() throws SyncProviderException;
 

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/transaction/xa/XAException.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/transaction/xa/XAException.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/transaction/xa/XAException.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/javax/transaction/xa/XAException.java Mon Jul 16 23:30:22 2007
@@ -166,7 +166,7 @@
      * global transaction.
      */
     public static final int XAER_OUTSIDE = -9;
-    
+
     /**
      * The errorCode which details the error that has occurred
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/Messages.java Mon Jul 16 23:30:22 2007
@@ -23,7 +23,6 @@
 
 package org.apache.harmony.sql.internal.nls;
 
-
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.Locale;
@@ -143,7 +142,7 @@
 
         return format(format, args);
     }
-    
+
     /**
      * Generates a formatted text string given a source string containing
      * "argument markers" of the form "{argNum}" where each argNum must be in
@@ -166,7 +165,7 @@
         String[] argStrings = new String[args.length];
         for (int i = 0; i < args.length; ++i) {
             if (args[i] == null)
-                argStrings[i] = "<null>";	//$NON-NLS-1$
+                argStrings[i] = "<null>"; //$NON-NLS-1$
             else
                 argStrings[i] = args[i].toString();
         }
@@ -190,16 +189,16 @@
                             10);
                     if (argnum < 0 || format.charAt(i + 2) != '}') {
                         // Bad format, just print and loop.
-						answer.append(format.substring(lastI, i + 1));
-						lastI = i + 1;
+                        answer.append(format.substring(lastI, i + 1));
+                        lastI = i + 1;
                     } else {
                         // Got a good one!
                         answer.append(format.substring(lastI, i));
                         if (argnum >= argStrings.length)
-                            answer.append("<missing argument>");	//$NON-NLS-1$
+                            answer.append("<missing argument>"); //$NON-NLS-1$
                         else
                             answer.append(argStrings[argnum]);
-						lastI = i + 3;
+                        lastI = i + 3;
                     }
                 }
             }
@@ -223,7 +222,8 @@
                     .doPrivileged(new PrivilegedAction<Object>() {
                         public Object run() {
                             return ResourceBundle.getBundle(resource, locale,
-                                    loader != null ? loader : ClassLoader.getSystemClassLoader());
+                                    loader != null ? loader : ClassLoader
+                                            .getSystemClassLoader());
                         }
                     });
         } catch (MissingResourceException e) {

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java Mon Jul 16 23:30:22 2007
@@ -28,265 +28,265 @@
 
 public class BatchUpdateExceptionTest extends TestCase {
 
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateException() {
-
-		int[] theFinalStates1 = { 0 }; // Error Code state
-		int[][] theFinalStates2 = { null }; // Update Counts array state
-		String[] theFinalStates3 = { null }; // SQL State state value
-		String[] theFinalStates4 = { null }; // Message state
-
-		Exception[] theExceptions = { null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException();
-				if (theExceptions[i] != null) {
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateException() {
+
+        int[] theFinalStates1 = { 0 }; // Error Code state
+        int[][] theFinalStates2 = { null }; // Update Counts array state
+        String[] theFinalStates3 = { null }; // SQL State state value
+        String[] theFinalStates4 = { null }; // Message state
+
+        Exception[] theExceptions = { null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException();
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateException
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionintArray() {
-
-		int[][] init1 = { { 1, 2, 3 }, null };
-
-		int[] theFinalStates1 = { 0, 0 }; // Error Code state
-		int[][] theFinalStates2 = init1; // Update Counts array state
-		String[] theFinalStates3 = { null, null }; // SQL State state value
-		String[] theFinalStates4 = { null, null }; // Message state
-
-		Exception[] theExceptions = { null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateException
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionintArray() {
+
+        int[][] init1 = { { 1, 2, 3 }, null };
+
+        int[] theFinalStates1 = { 0, 0 }; // Error Code state
+        int[][] theFinalStates2 = init1; // Update Counts array state
+        String[] theFinalStates3 = { null, null }; // SQL State state value
+        String[] theFinalStates4 = { null, null }; // Message state
+
+        Exception[] theExceptions = { null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a" };
-		int[][] init2 = { { 1, 2, 3 }, {}, { 3 }, null, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 } };
-
-		int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error Code
-																// state
-		// Update Counts array state
-		int[][] theFinalStates2 = init2;
-		// SQL State state value
-		String[] theFinalStates3 = { null, null, null, null, null, null, null,
-				null, null };
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a" };
+        int[][] init2 = { { 1, 2, 3 }, {}, { 3 }, null, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 } };
+
+        int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error Code
+        // state
+        // Update Counts array state
+        int[][] theFinalStates2 = init2;
+        // SQL State state value
+        String[] theFinalStates3 = { null, null, null, null, null, null, null,
+                null, null };
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionStringintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringStringintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a", "a" };
-		String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
-				"", ".", "a" };
-		int[][] init3 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
-
-		int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error
-																		// Code
-																		// state
-		// Update Counts array state
-		int[][] theFinalStates2 = init3;
-		// SQL State state value
-		String[] theFinalStates3 = init2;
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null, null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i], init3[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionStringintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringStringintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a", "a" };
+        String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
+                "", ".", "a" };
+        int[][] init3 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
+
+        int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error
+        // Code
+        // state
+        // Update Counts array state
+        int[][] theFinalStates2 = init3;
+        // SQL State state value
+        String[] theFinalStates3 = init2;
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null, null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i], init3[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionStringStringintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringStringintintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a", "a" };
-		String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
-				"", ".", "a" };
-		int[] init3 = { -2147483648, 2147483647, 0, -492417162, -156220255,
-				-173012890, -631026360, -2147483648, -2147483648, -2147483648,
-				-2147483648 };
-		int[][] init4 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
-
-		int[] theFinalStates1 = init3; // Error Code state
-		// Update Counts array state
-		int[][] theFinalStates2 = init4;
-		// SQL State state value
-		String[] theFinalStates3 = init2;
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null, null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i], init3[i], init4[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionStringStringintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringStringintintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a", "a" };
+        String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
+                "", ".", "a" };
+        int[] init3 = { -2147483648, 2147483647, 0, -492417162, -156220255,
+                -173012890, -631026360, -2147483648, -2147483648, -2147483648,
+                -2147483648 };
+        int[][] init4 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
+
+        int[] theFinalStates1 = init3; // Error Code state
+        // Update Counts array state
+        int[][] theFinalStates2 = init4;
+        // SQL State state value
+        String[] theFinalStates3 = init2;
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null, null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i], init3[i], init4[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
 
-	} // end method testBatchUpdateExceptionStringStringintintArray
+    } // end method testBatchUpdateExceptionStringStringintintArray
 	
 	/**
 	 * @tests {@link java.sql.BatchUpdateException#BatchUpdateException(Throwable)}
@@ -377,59 +377,59 @@
 		assertNull(batchUpdateException.getCause());
 	}
 
-	/*
-	 * Method test for getUpdateCounts
-	 */
-	public void testGetUpdateCounts() {
-
-		BatchUpdateException aBatchUpdateException;
-		int[][] init1 = { { 1, 2, 3 }, {}, null };
-
-		int[] theReturn;
-		int[][] theReturns = init1;
-
-		int[] theFinalStates1 = { 0, 0, 0 }; // Error Code state
-		int[][] theFinalStates2 = init1; // Update Counts array state
-		String[] theFinalStates3 = { null, null, null }; // SQL State state
-															// value
-		String[] theFinalStates4 = { null, null, null }; // Message state
-
-		Exception[] theExceptions = { null, null, null };
-
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i]);
-				theReturn = aBatchUpdateException.getUpdateCounts();
-				if (theExceptions[i] != null) {
+    /*
+     * Method test for getUpdateCounts
+     */
+    public void testGetUpdateCounts() {
+
+        BatchUpdateException aBatchUpdateException;
+        int[][] init1 = { { 1, 2, 3 }, {}, null };
+
+        int[] theReturn;
+        int[][] theReturns = init1;
+
+        int[] theFinalStates1 = { 0, 0, 0 }; // Error Code state
+        int[][] theFinalStates2 = init1; // Update Counts array state
+        String[] theFinalStates3 = { null, null, null }; // SQL State state
+        // value
+        String[] theFinalStates4 = { null, null, null }; // Message state
+
+        Exception[] theExceptions = { null, null, null };
+
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i]);
+                theReturn = aBatchUpdateException.getUpdateCounts();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetUpdateCounts
 
-	} // end method testGetUpdateCounts
-    
     /**
      * @tests serialization/deserialization compatibility.
      */

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java?view=diff&rev=556825&r1=556824&r2=556825
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java Mon Jul 16 23:30:22 2007
@@ -25,65 +25,65 @@
 
 public class ConnectionTest extends TestCase {
 
-	/*
-	 * Public statics test
-	 */
-	public void testPublicStatics() {
-
-		HashMap<String, Integer> thePublicStatics = new HashMap<String, Integer>();
-		thePublicStatics.put("TRANSACTION_SERIALIZABLE", new Integer(8));
-		thePublicStatics.put("TRANSACTION_REPEATABLE_READ", new Integer(4));
-		thePublicStatics.put("TRANSACTION_READ_COMMITTED", new Integer(2));
-		thePublicStatics.put("TRANSACTION_READ_UNCOMMITTED", new Integer(1));
-		thePublicStatics.put("TRANSACTION_NONE", new Integer(0));
-
-		/*
-		 * System.out.println( "TRANSACTION_SERIALIZABLE: " +
-		 * Connection.TRANSACTION_SERIALIZABLE ); System.out.println(
-		 * "TRANSACTION_REPEATABLE_READ: " +
-		 * Connection.TRANSACTION_REPEATABLE_READ ); System.out.println(
-		 * "TRANSACTION_READ_COMMITTED: " +
-		 * Connection.TRANSACTION_READ_COMMITTED ); System.out.println(
-		 * "TRANSACTION_READ_UNCOMMITTED: " +
-		 * Connection.TRANSACTION_READ_UNCOMMITTED ); System.out.println(
-		 * "TRANSACTION_NONE: " + Connection.TRANSACTION_NONE );
-		 */
-
-		Class<?> connectionClass;
-		try {
-			connectionClass = Class.forName("java.sql.Connection");
-		} catch (ClassNotFoundException e) {
-			fail("java.sql.Connection class not found!");
-			return;
-		} // end try
-
-		Field[] theFields = connectionClass.getDeclaredFields();
-		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
-				+ Modifier.FINAL;
-
-		int countPublicStatics = 0;
-		for (Field element : theFields) {
-			String fieldName = element.getName();
-			int theMods = element.getModifiers();
-			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
-				try {
-					Object fieldValue = element.get(null);
-					Object expectedValue = thePublicStatics.get(fieldName);
-					if (expectedValue == null) {
-						fail("Field " + fieldName + " missing!");
-					} // end
-					assertEquals("Field " + fieldName + " value mismatch: ",
-							expectedValue, fieldValue);
-					assertEquals("Field " + fieldName + " modifier mismatch: ",
-							requiredModifier, theMods);
-					countPublicStatics++;
-				} catch (IllegalAccessException e) {
-					fail("Illegal access to Field " + fieldName);
-				} // end try
-			} // end if
-		} // end for
+    /*
+     * Public statics test
+     */
+    public void testPublicStatics() {
+
+        HashMap<String, Integer> thePublicStatics = new HashMap<String, Integer>();
+        thePublicStatics.put("TRANSACTION_SERIALIZABLE", new Integer(8));
+        thePublicStatics.put("TRANSACTION_REPEATABLE_READ", new Integer(4));
+        thePublicStatics.put("TRANSACTION_READ_COMMITTED", new Integer(2));
+        thePublicStatics.put("TRANSACTION_READ_UNCOMMITTED", new Integer(1));
+        thePublicStatics.put("TRANSACTION_NONE", new Integer(0));
+
+        /*
+         * System.out.println( "TRANSACTION_SERIALIZABLE: " +
+         * Connection.TRANSACTION_SERIALIZABLE ); System.out.println(
+         * "TRANSACTION_REPEATABLE_READ: " +
+         * Connection.TRANSACTION_REPEATABLE_READ ); System.out.println(
+         * "TRANSACTION_READ_COMMITTED: " +
+         * Connection.TRANSACTION_READ_COMMITTED ); System.out.println(
+         * "TRANSACTION_READ_UNCOMMITTED: " +
+         * Connection.TRANSACTION_READ_UNCOMMITTED ); System.out.println(
+         * "TRANSACTION_NONE: " + Connection.TRANSACTION_NONE );
+         */
+
+        Class<?> connectionClass;
+        try {
+            connectionClass = Class.forName("java.sql.Connection");
+        } catch (ClassNotFoundException e) {
+            fail("java.sql.Connection class not found!");
+            return;
+        } // end try
+
+        Field[] theFields = connectionClass.getDeclaredFields();
+        int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+                + Modifier.FINAL;
+
+        int countPublicStatics = 0;
+        for (Field element : theFields) {
+            String fieldName = element.getName();
+            int theMods = element.getModifiers();
+            if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+                try {
+                    Object fieldValue = element.get(null);
+                    Object expectedValue = thePublicStatics.get(fieldName);
+                    if (expectedValue == null) {
+                        fail("Field " + fieldName + " missing!");
+                    } // end
+                    assertEquals("Field " + fieldName + " value mismatch: ",
+                            expectedValue, fieldValue);
+                    assertEquals("Field " + fieldName + " modifier mismatch: ",
+                            requiredModifier, theMods);
+                    countPublicStatics++;
+                } catch (IllegalAccessException e) {
+                    fail("Illegal access to Field " + fieldName);
+                } // end try
+            } // end if
+        } // end for
 
-	} // end method testPublicStatics
+    } // end method testPublicStatics
 
 } // end class ConnectionTest
 



Mime
View raw message