You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by to...@apache.org on 2008/06/04 05:07:36 UTC

svn commit: r662954 - in /harmony/enhanced/classlib/branches/java6/modules/sql/src: main/java/org/apache/harmony/sql/internal/rowset/ test/java/org/apache/harmony/sql/tests/internal/rowset/

Author: tonywu
Date: Tue Jun  3 20:07:36 2008
New Revision: 662954

URL: http://svn.apache.org/viewvc?rev=662954&view=rev
Log:
Apply patch HARMONY-5857 ([java6][classlib][sql][rowset] - implement java6 new API in AbstractRowSetImpl)

Added:
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java   (with props)
Modified:
    harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/AbstractRowSetImpl.java
    harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetJoinTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/AbstractRowSetImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/AbstractRowSetImpl.java?rev=662954&r1=662953&r2=662954&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/AbstractRowSetImpl.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/main/java/org/apache/harmony/sql/internal/rowset/AbstractRowSetImpl.java Tue Jun  3 20:07:36 2008
@@ -32,6 +32,7 @@
 import java.sql.ResultSetMetaData;
 import java.sql.RowId;
 import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
 import java.sql.SQLWarning;
 import java.sql.SQLXML;
 import java.sql.Statement;
@@ -841,293 +842,259 @@
     }
 
     public int getHoldability() throws SQLException {
-        // TODO Auto-generated method stub
-        return 0;
+        throw new UnsupportedOperationException();
     }
-    
+
     public int getConcurrency() throws SQLException {
         if (resultSet == null) {
             throw new NullPointerException();
         }
+
         return resultSet.getConcurrency();
     }
-    
+
     public Reader getNCharacterStream(int columnIndex) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public Reader getNCharacterStream(String columnLabel) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public NClob getNClob(int columnIndex) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public NClob getNClob(String columnLabel) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public String getNString(int columnIndex) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public String getNString(String columnLabel) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public RowId getRowId(int columnIndex) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public RowId getRowId(String columnLabel) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public SQLXML getSQLXML(int columnIndex) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public SQLXML getSQLXML(String columnLabel) throws SQLException {
-        // TODO Auto-generated method stub
-        return null;
+        throw new UnsupportedOperationException();
     }
 
     public boolean isClosed() throws SQLException {
-        // TODO Auto-generated method stub
-        return false;
+        throw new UnsupportedOperationException();
     }
 
     public void updateAsciiStream(int columnIndex, InputStream x, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateAsciiStream(String columnLabel, InputStream x, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateAsciiStream(int columnIndex, InputStream x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateAsciiStream(String columnLabel, InputStream x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBinaryStream(int columnIndex, InputStream x, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBinaryStream(String columnLabel, InputStream x,
             long length) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBinaryStream(int columnIndex, InputStream x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBinaryStream(String columnLabel, InputStream x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBlob(int columnIndex, InputStream inputStream, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBlob(String columnLabel, InputStream inputStream,
             long length) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBlob(int columnIndex, InputStream inputStream)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateBlob(String columnLabel, InputStream inputStream)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateCharacterStream(int columnIndex, Reader x, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateCharacterStream(String columnLabel, Reader reader,
             long length) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateCharacterStream(int columnIndex, Reader x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateCharacterStream(String columnLabel, Reader reader)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateClob(int columnIndex, Reader reader, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateClob(String columnLabel, Reader reader, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateClob(int columnIndex, Reader reader) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateClob(String columnLabel, Reader reader)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateNCharacterStream(int columnIndex, Reader x, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateNCharacterStream(String columnLabel, Reader reader,
             long length) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateNCharacterStream(int columnIndex, Reader x)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateNCharacterStream(String columnLabel, Reader reader)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
-    public void updateNClob(int columnIndex, NClob clob) throws SQLException {
-        // TODO Auto-generated method stub
-        
+    public void updateNClob(int columnIndex, NClob nClob) throws SQLException {
+        throw new UnsupportedOperationException();
     }
 
-    public void updateNClob(String columnLabel, NClob clob) throws SQLException {
-        // TODO Auto-generated method stub
-        
+    public void updateNClob(String columnLabel, NClob nClob)
+            throws SQLException {
+        throw new UnsupportedOperationException();
     }
 
     public void updateNClob(int columnIndex, Reader reader, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateNClob(String columnLabel, Reader reader, long length)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateNClob(int columnIndex, Reader reader) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
     public void updateNClob(String columnLabel, Reader reader)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new SQLFeatureNotSupportedException();
     }
 
-    public void updateNString(int columnIndex, String string)
+    public void updateNString(int columnIndex, String nString)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
-    public void updateNString(String columnLabel, String string)
+    public void updateNString(String columnLabel, String nString)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateRowId(int columnIndex, RowId x) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateRowId(String columnLabel, RowId x) throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateSQLXML(int columnIndex, SQLXML xmlObject)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
     }
 
     public void updateSQLXML(String columnLabel, SQLXML xmlObject)
             throws SQLException {
-        // TODO Auto-generated method stub
-        
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public void setType(int type) throws SQLException {
+        switch (type) {
+        case ResultSet.TYPE_FORWARD_ONLY:
+        case ResultSet.TYPE_SCROLL_INSENSITIVE:
+        case ResultSet.TYPE_SCROLL_SENSITIVE: {
+            return;
+        }
+        default: {
+            // rowset.42=Invalid type
+            throw new SQLException(Messages.getString("rowset.42")); //$NON-NLS-1$
+        }
+        }
     }
 
     public boolean isWrapperFor(Class<?> iface) throws SQLException {
-        // TODO Auto-generated method stub
         return false;
     }
 
     public <T> T unwrap(Class<T> iface) throws SQLException {
-        // TODO Auto-generated method stub
         return null;
     }
 
-
     public int getFetchDirection() throws SQLException {
         if (resultSet == null) {
             throw new NullPointerException();

Modified: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetJoinTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetJoinTest.java?rev=662954&r1=662953&r2=662954&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetJoinTest.java (original)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetJoinTest.java Tue Jun  3 20:07:36 2008
@@ -1219,6 +1219,39 @@
         }
     }
 
+    public void testSetMatchColumn_Initial() throws Exception {
+        JdbcRowSet noInitalJrs = noInitalJdbcRowSet();
+        JdbcRowSet jrs = newJdbcRowSet();
+        String[] names = { "1", "2", "3" };
+        jrs.setMatchColumn(names);
+
+        names = jrs.getMatchColumnNames();
+        assertEquals(13, names.length);
+        assertEquals("1", names[0]);
+        assertEquals("2", names[1]);
+        assertEquals("3", names[2]);
+        try {
+            jrs.unsetMatchColumn(new String[] { "3", "2", "1" });
+            fail("Should throw SQLException");
+        } catch (SQLException e) {
+            // expected, Columns being unset are not the same as set
+        }
+    }
+
+    public void testUnSetMatchColumn() throws Exception {
+        JdbcRowSet noInitalJrs = noInitalJdbcRowSet();
+        JdbcRowSet jrs = newJdbcRowSet();
+        int[] indexs = { 1, 2, 3 };
+        jrs.setMatchColumn(indexs);
+
+        try {
+            jrs.unsetMatchColumn(new int[] { 3, 2, 1 });
+            fail("Should throw SQLException");
+        } catch (SQLException e) {
+            // expected, Columns being unset are not the same as set
+        }
+    }
+
     protected JdbcRowSet noInitalJdbcRowSet() throws Exception {
         try {
             return (JdbcRowSet) Class.forName("com.sun.rowset.JdbcRowSetImpl")

Added: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java?rev=662954&view=auto
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java (added)
+++ harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java Tue Jun  3 20:07:36 2008
@@ -0,0 +1,370 @@
+/*
+ *  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 org.apache.harmony.sql.tests.internal.rowset;
+
+import java.io.StringBufferInputStream;
+import java.io.StringReader;
+import java.sql.SQLFeatureNotSupportedException;
+
+import javax.sql.rowset.JdbcRowSet;
+
+public class JdbcRowSetNewFeatureTest extends CachedRowSetTestCase {
+
+    private JdbcRowSet newJdbcRowSet() throws Exception {
+        if ("true".equals(System.getProperty("Testing Harmony"))) {
+            return (JdbcRowSet) Class.forName(
+                    "org.apache.harmony.sql.internal.rowset.JdbcRowSetImpl")
+                    .newInstance();
+        }
+        return (JdbcRowSet) Class.forName("com.sun.rowset.JdbcRowSetImpl")
+                .newInstance();
+    }
+
+    public void testGetXXX() throws Exception {
+        JdbcRowSet jrs = newJdbcRowSet();
+
+        try {
+            jrs.getHoldability();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNCharacterStream(100);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNCharacterStream("not");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNClob(100);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNClob("not");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNString(100);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getNString("not");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getRowId(100);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getRowId("not");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getSQLXML(100);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.getSQLXML("not");
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+    }
+
+    public void testIsClosed() throws Exception {
+        JdbcRowSet jrs = newJdbcRowSet();
+        try {
+            jrs.isClosed();
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+    }
+
+    public void testUpdateXXX() throws Exception {
+        JdbcRowSet jrs = newJdbcRowSet();
+
+        try {
+            jrs.updateAsciiStream(100, null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateAsciiStream("not exist", null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateAsciiStream(100, null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateAsciiStream("not", null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBinaryStream(100, null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBinaryStream("not exist", null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBinaryStream(100, null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBinaryStream("not", null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBlob(100, null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBlob("not", null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBlob(100, new StringBufferInputStream("test"));
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateBlob("not", new StringBufferInputStream("test"));
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateCharacterStream(100, null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateCharacterStream("not", null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateCharacterStream(100, null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateCharacterStream("not", null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateClob(100, null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateClob("not", null, 100L);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateClob(100, new StringReader("test"));
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateClob("not", new StringReader("test"));
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNCharacterStream(100, null, 100L);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNCharacterStream("not", null, 100L);
+            fail("Should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNCharacterStream(100, null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNCharacterStream("not", null);
+            fail("Should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNClob(2, new StringReader("readstr"));
+            fail("should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNClob("not", new StringReader("readstr"));
+            fail("should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNClob(100, new StringReader("readstr"), 1000L);
+            fail("should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNClob("not", new StringReader("readstr"), 1000L);
+            fail("should throw SQLFeatureNotSupportedException");
+        } catch (SQLFeatureNotSupportedException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNString(100, "test");
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateNString("not", "test");
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateRowId(100, null);
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateRowId("not", null);
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateSQLXML(100, null);
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+
+        try {
+            jrs.updateSQLXML("not", null);
+            fail("should throw UnsupportedOperationException");
+        } catch (UnsupportedOperationException e) {
+            // expected
+        }
+    }
+}

Propchange: harmony/enhanced/classlib/branches/java6/modules/sql/src/test/java/org/apache/harmony/sql/tests/internal/rowset/JdbcRowSetNewFeatureTest.java
------------------------------------------------------------------------------
    svn:eol-style = native