harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r531782 - in /harmony/enhanced/classlib/trunk/modules/sql/src: main/java/javax/sql/rowset/ main/java/org/apache/harmony/sql/internal/nls/ test/java/org/apache/harmony/sql/tests/javax/sql/rowset/
Date Tue, 24 Apr 2007 06:19:14 GMT
Author: pyang
Date: Mon Apr 23 23:19:12 2007
New Revision: 531782

URL: http://svn.apache.org/viewvc?view=rev&rev=531782
Log:
Apply patch for HARMONY-3733([classlib][sql]new constructor, methods in RowSetMetaDataImpl
- isAutoIncrement, isCaseSensitive, setAutoIncrement, setCaseSensitive, setColumnCount, getColumnCount)

Added:
    harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/RowSetMetaDataImpl.java
    harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/RowSetMetaDataImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/RowSetMetaDataImpl.java?view=diff&rev=531782&r1=531781&r2=531782
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/RowSetMetaDataImpl.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/main/java/javax/sql/rowset/RowSetMetaDataImpl.java
Mon Apr 23 23:19:12 2007
@@ -1,215 +1,285 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package javax.sql.rowset;
-
-import java.io.Serializable;
-import java.sql.SQLException;
-
-import javax.sql.RowSetMetaData;
-
-import org.apache.harmony.luni.util.NotImplementedException;
-
-/**
- * This class is a concrete implementation of javax.sql.RowSetMetatData, which
- * provides methods that get and set column information.
- * 
- * A RowSetMetaDataImpl object can be obtained by the getMetaData() method in
- * javax.sql.RowSet.
- * 
- */
-public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
-
-    private static final long serialVersionUID = 6893806403181801867L;
-
-    private int colCount;
-
-    private ColInfo[] colInfo;
-
-    public RowSetMetaDataImpl() {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnCount(int columnCount) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setAutoIncrement(int columnIndex, boolean property)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setCaseSensitive(int columnIndex, boolean property)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setSearchable(int columnIndex, boolean property)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setCurrency(int columnIndex, boolean property)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setNullable(int columnIndex, int property) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setSigned(int columnIndex, boolean property)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnDisplaySize(int columnIndex, int size)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnLabel(int columnIndex, String label)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnName(int columnIndex, String columnName)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setSchemaName(int columnIndex, String schemaName)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setPrecision(int columnIndex, int precision)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setScale(int columnIndex, int scale) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setTableName(int columnIndex, String tableName)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setCatalogName(int columnIndex, String catalogName)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnType(int columnIndex, int SQLType) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public void setColumnTypeName(int columnIndex, String typeName)
-            throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int getColumnCount() throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isAutoIncrement(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isCaseSensitive(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isSearchable(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isCurrency(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int isNullable(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isSigned(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int getColumnDisplaySize(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getColumnLabel(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getColumnName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getSchemaName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int getPrecision(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int getScale(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getTableName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getCatalogName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public int getColumnType(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getColumnTypeName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isReadOnly(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isWritable(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public boolean isDefinitelyWritable(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    public String getColumnClassName(int columnIndex) throws SQLException {
-        throw new NotImplementedException();
-    }
-
-    private class ColInfo {
-
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package javax.sql.rowset;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+
+import javax.sql.RowSetMetaData;
+
+import org.apache.harmony.luni.util.NotImplementedException;
+import org.apache.harmony.sql.internal.nls.Messages;
+
+/**
+ * This class is a concrete implementation of javax.sql.RowSetMetatData, which
+ * provides methods that get and set column information.
+ * 
+ * A RowSetMetaDataImpl object can be obtained by the getMetaData() method in
+ * javax.sql.RowSet.
+ * 
+ */
+public class RowSetMetaDataImpl implements RowSetMetaData, Serializable {
+
+    private static final int DEFAULT_COLUMN_COUNT = 4;
+
+    private static final long serialVersionUID = 6893806403181801867L;
+
+    private int colCount;
+
+    private ColInfo[] colInfo;
+
+    /**
+     * The default constructor. 
+     */
+    public RowSetMetaDataImpl() {
+        // do nothing
+    }
+    
+    private void checkColumnIndex(int arrayIndex) throws SQLException {
+        if (null == colInfo || arrayIndex < 0 || arrayIndex >= colInfo.length) {
+            throw new SQLException(Messages.getString("sql.27", arrayIndex + 1)); //$NON-NLS-1$
+        }
+        // lazy initialization
+        if (null == colInfo[arrayIndex]) {
+            colInfo[arrayIndex] = new ColInfo();
+        }
+    }
+    
+    /**
+     * {@inheritDoc}
+     * 
+     * @see javax.sql.RowSetMetaData#setColumnCount(int)
+     */
+    public void setColumnCount(int columnCount) throws SQLException {
+        if (columnCount <= 0) {
+            throw new SQLException(Messages.getString("sql.26")); //$NON-NLS-1$
+        }
+        try {
+            colInfo = new ColInfo[columnCount];            
+        } catch (OutOfMemoryError e) {
+            // For compatibility, use same default value as RI
+            colInfo = new ColInfo[DEFAULT_COLUMN_COUNT];
+        }                        
+        colCount = columnCount;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see javax.sql.RowSetMetaData#setAutoIncrement(int, boolean)
+     */
+    public void setAutoIncrement(int columnIndex, boolean property)
+            throws SQLException {
+        int arrayIndex = columnIndex - 1;
+        checkColumnIndex(arrayIndex);
+        colInfo[arrayIndex].autoIncrement = property;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see javax.sql.RowSetMetaData#setCaseSensitive(int, boolean)
+     */
+    public void setCaseSensitive(int columnIndex, boolean property)
+            throws SQLException {
+        int arrayIndex = columnIndex - 1;
+        checkColumnIndex(arrayIndex);
+        colInfo[arrayIndex].caseSensitive = property;
+    }
+
+    public void setSearchable(int columnIndex, boolean property)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setCurrency(int columnIndex, boolean property)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setNullable(int columnIndex, int property) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setSigned(int columnIndex, boolean property)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setColumnDisplaySize(int columnIndex, int size)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setColumnLabel(int columnIndex, String label)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setColumnName(int columnIndex, String columnName)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setSchemaName(int columnIndex, String schemaName)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setPrecision(int columnIndex, int precision)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setScale(int columnIndex, int scale) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setTableName(int columnIndex, String tableName)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setCatalogName(int columnIndex, String catalogName)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setColumnType(int columnIndex, int SQLType) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public void setColumnTypeName(int columnIndex, String typeName)
+            throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see java.sql.ResultSetMetaData#getColumnCount()
+     */
+    public int getColumnCount() throws SQLException {
+        return colCount;
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see java.sql.ResultSetMetaData#isAutoIncrement(int)
+     */
+    public boolean isAutoIncrement(int columnIndex) throws SQLException {
+        int arrayIndex = columnIndex - 1;
+        checkColumnIndex(arrayIndex);
+        return colInfo[arrayIndex].autoIncrement; 
+    }
+
+    /**
+     * {@inheritDoc}
+     * 
+     * @see java.sql.ResultSetMetaData#isCaseSensitive(int)
+     */
+    public boolean isCaseSensitive(int columnIndex) throws SQLException {
+        int arrayIndex = columnIndex - 1;
+        checkColumnIndex(arrayIndex);
+        return colInfo[arrayIndex].caseSensitive;
+    }
+
+    public boolean isSearchable(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public boolean isCurrency(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public int isNullable(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public boolean isSigned(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public int getColumnDisplaySize(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getColumnLabel(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getColumnName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getSchemaName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public int getPrecision(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public int getScale(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getTableName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getCatalogName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public int getColumnType(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getColumnTypeName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public boolean isReadOnly(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public boolean isWritable(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public boolean isDefinitelyWritable(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    public String getColumnClassName(int columnIndex) throws SQLException {
+        throw new NotImplementedException();
+    }
+
+    /**
+     * The inner class to store meta information of columns.
+     */
+    private class ColInfo {
+        
+        public boolean autoIncrement;
+
+        public boolean caseSensitive;
+
+    }
 }

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties?view=diff&rev=531782&r1=531781&r2=531782
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
(original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/main/java/org/apache/harmony/sql/internal/nls/messages.properties
Mon Apr 23 23:19:12 2007
@@ -40,3 +40,5 @@
 sql.23=Buffer is not sufficient to hold the value
 sql.24=Invalid length for truncate
 sql.25=Unsupported operation. SerialClob is not instantiated with a fully implemented Clob
object.
+sql.26=Invalid column count. Cannot be less or equal to zero
+sql.27=Invalid column index :{0}
\ No newline at end of file

Added: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java?view=auto&rev=531782
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java
Mon Apr 23 23:19:12 2007
@@ -0,0 +1,200 @@
+package org.apache.harmony.sql.tests.javax.sql.rowset;
+
+
+import java.sql.SQLException;
+
+import javax.sql.rowset.RowSetMetaDataImpl;
+import junit.framework.TestCase;
+
+/**
+ * Test class for javax.sql.rowset.RowSetMetaDataImpl 
+ *
+ */
+public class RowSetMetaDataImplTest extends TestCase {
+    
+    private static RowSetMetaDataImpl metaDataImpl = null;
+    
+    /**
+     * @tests javax.sql.rowset.RowSetMetaDataImpl#RowSetMetaDataImpl()
+     */
+    public void test_Constructor() {
+        assertNotNull(metaDataImpl);        
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#getColumnCount()}
+     */
+    public void test_getColumnCount() throws SQLException {
+        assertEquals(0, metaDataImpl.getColumnCount());
+        try {
+            metaDataImpl.isAutoIncrement(1);
+            fail("should throw SQLException");
+        } catch (SQLException e) {            
+            // expected
+        }
+        
+        metaDataImpl.setColumnCount(4);
+        assertEquals(4, metaDataImpl.getColumnCount());
+        assertFalse(metaDataImpl.isAutoIncrement(4));
+        
+        metaDataImpl.setColumnCount(Integer.MAX_VALUE);
+        assertFalse(metaDataImpl.isAutoIncrement(4));
+        assertEquals(Integer.MAX_VALUE, metaDataImpl.getColumnCount());
+        // RI throws ArrayIndexOutOfBoundsException here, which is a RI's bug
+        try {
+            metaDataImpl.isAutoIncrement(5);
+            fail("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#setColumnCount(int)}
+     */
+    public void test_setColumnCountI() throws SQLException {
+        try {
+            metaDataImpl.setColumnCount(-1);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {            
+            // expected
+        }
+        
+        try {
+            metaDataImpl.setColumnCount(0);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+        
+        metaDataImpl.setColumnCount(18);
+        assertEquals(18, metaDataImpl.getColumnCount());
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#isAutoIncrement(int)}
+     */
+    public void test_isAutoIncrementI() throws SQLException {
+        try {
+            metaDataImpl.isAutoIncrement(1);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {            
+            // expected
+        }
+        
+        metaDataImpl.setColumnCount(3);      
+        assertFalse(metaDataImpl.isAutoIncrement(1));
+        assertFalse(metaDataImpl.isAutoIncrement(3));
+        metaDataImpl.setAutoIncrement(3, true);
+        assertTrue(metaDataImpl.isAutoIncrement(3));
+        
+        try {
+            metaDataImpl.isAutoIncrement(-1);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {            
+            // expected
+        }
+        
+        try {
+            metaDataImpl.isAutoIncrement(4);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#isCaseSensitive(int)}
+     */
+    public void test_isCaseSensitiveI() throws SQLException {
+        metaDataImpl.setColumnCount(5);
+        assertFalse(metaDataImpl.isCaseSensitive(2));
+        assertFalse(metaDataImpl.isCaseSensitive(5));
+        
+        metaDataImpl.setCaseSensitive(2, true);
+        assertTrue(metaDataImpl.isCaseSensitive(2));
+        metaDataImpl.setCaseSensitive(2, false);
+        assertFalse(metaDataImpl.isCaseSensitive(2));
+        
+        try {
+            metaDataImpl.isCaseSensitive(0);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+        
+        try {
+            metaDataImpl.isCaseSensitive(6);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#setAutoIncrement(int, boolean)}
+     */
+    public void test_setAutoIncrementIZ() throws SQLException {
+        try {
+            metaDataImpl.setAutoIncrement(1, true);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+        
+        metaDataImpl.setColumnCount(2);
+        assertFalse(metaDataImpl.isAutoIncrement(1));
+        metaDataImpl.setAutoIncrement(1, false);
+        assertFalse(metaDataImpl.isAutoIncrement(1));
+        metaDataImpl.setAutoIncrement(1, true);
+        assertTrue(metaDataImpl.isAutoIncrement(1));
+        
+        try {
+            metaDataImpl.setAutoIncrement(-1, false);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+    }
+    
+    /**
+     * @tests {@link javax.sql.rowset.RowSetMetaDataImpl#setCaseSensitive(int, boolean)}
+     */
+    public void test_setCaseSensitiveIZ() throws SQLException {
+        try {
+            metaDataImpl.setCaseSensitive(2, false);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+        
+        metaDataImpl.setColumnCount(9);
+        assertFalse(metaDataImpl.isCaseSensitive(9));
+        metaDataImpl.setCaseSensitive(9, false);
+        assertFalse(metaDataImpl.isCaseSensitive(9));
+        metaDataImpl.setCaseSensitive(9, true);
+        assertTrue(metaDataImpl.isCaseSensitive(9));
+        metaDataImpl.setAutoIncrement(9, false);
+        assertTrue(metaDataImpl.isCaseSensitive(9));
+        
+        try {
+            metaDataImpl.setCaseSensitive(10, true);
+            fail ("should throw SQLException");
+        } catch (SQLException e) {
+            // expected
+        }
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        metaDataImpl = new RowSetMetaDataImpl();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        metaDataImpl = null;
+        super.tearDown();
+    }
+
+}

Propchange: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/javax/sql/rowset/RowSetMetaDataImplTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message