You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ruth Cao (JIRA)" <ji...@apache.org> on 2007/06/18 09:48:26 UTC

[jira] Created: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

[classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
----------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4208
                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP / Linux
            Reporter: Ruth Cao


Given the following test case:

private static class LongLengthClob extends MockClob {
        @Override
        public long length() throws SQLException {
            return (long)Integer.MAX_VALUE * (long)2 + 4;
        }
    }


public void testGetSubString() throws Exception {
        LongLengthClob longClob = new LongLengthClob();
        serialClob = new SerialClob(longClob);
        
        try {
            serialClob.getSubString(1, 3);
            fail("should throw SerialException");
        } catch (SerialException e) {
            // expected
        }
}

RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruth Cao closed HARMONY-4208.
-----------------------------


Thanks, Tony. The fix looks fine.

> [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4208
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP / Linux
>            Reporter: Ruth Cao
>            Assignee: Tony Wu
>         Attachments: Harmony-4208.diff
>
>
> Given the following test case:
> private static class LongLengthClob extends MockClob {
>         @Override
>         public long length() throws SQLException {
>             return (long)Integer.MAX_VALUE * (long)2 + 4;
>         }
>     }
> public void testGetSubString() throws Exception {
>         LongLengthClob longClob = new LongLengthClob();
>         serialClob = new SerialClob(longClob);
>         
>         try {
>             serialClob.getSubString(1, 3);
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         }
> }
> RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruth Cao updated HARMONY-4208:
------------------------------

    Attachment: Harmony-4208.diff

May somebody pls try this?

> [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4208
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP / Linux
>            Reporter: Ruth Cao
>         Attachments: Harmony-4208.diff
>
>
> Given the following test case:
> private static class LongLengthClob extends MockClob {
>         @Override
>         public long length() throws SQLException {
>             return (long)Integer.MAX_VALUE * (long)2 + 4;
>         }
>     }
> public void testGetSubString() throws Exception {
>         LongLengthClob longClob = new LongLengthClob();
>         serialClob = new SerialClob(longClob);
>         
>         try {
>             serialClob.getSubString(1, 3);
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         }
> }
> RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Wu resolved HARMONY-4208.
------------------------------

    Resolution: Fixed

Patch applied at r548269 , please verify. Thanks.

> [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4208
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP / Linux
>            Reporter: Ruth Cao
>            Assignee: Tony Wu
>         Attachments: Harmony-4208.diff
>
>
> Given the following test case:
> private static class LongLengthClob extends MockClob {
>         @Override
>         public long length() throws SQLException {
>             return (long)Integer.MAX_VALUE * (long)2 + 4;
>         }
>     }
> public void testGetSubString() throws Exception {
>         LongLengthClob longClob = new LongLengthClob();
>         serialClob = new SerialClob(longClob);
>         
>         try {
>             serialClob.getSubString(1, 3);
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         }
> }
> RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

Posted by "Ruth Cao (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruth Cao updated HARMONY-4208:
------------------------------

    Patch Info: [Patch Available]

> [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4208
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP / Linux
>            Reporter: Ruth Cao
>         Attachments: Harmony-4208.diff
>
>
> Given the following test case:
> private static class LongLengthClob extends MockClob {
>         @Override
>         public long length() throws SQLException {
>             return (long)Integer.MAX_VALUE * (long)2 + 4;
>         }
>     }
> public void testGetSubString() throws Exception {
>         LongLengthClob longClob = new LongLengthClob();
>         serialClob = new SerialClob(longClob);
>         
>         try {
>             serialClob.getSubString(1, 3);
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         }
> }
> RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-4208) [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tony Wu reassigned HARMONY-4208:
--------------------------------

    Assignee: Tony Wu

> [classlib][sql] javax.sql.rowset.serial.SerialClob.getSubString throws StringIndexOutOfBoundsException when the length value is overflow
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4208
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4208
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP / Linux
>            Reporter: Ruth Cao
>            Assignee: Tony Wu
>         Attachments: Harmony-4208.diff
>
>
> Given the following test case:
> private static class LongLengthClob extends MockClob {
>         @Override
>         public long length() throws SQLException {
>             return (long)Integer.MAX_VALUE * (long)2 + 4;
>         }
>     }
> public void testGetSubString() throws Exception {
>         LongLengthClob longClob = new LongLengthClob();
>         serialClob = new SerialClob(longClob);
>         
>         try {
>             serialClob.getSubString(1, 3);
>             fail("should throw SerialException");
>         } catch (SerialException e) {
>             // expected
>         }
> }
> RI passes while Harmony throws StringIndexOutOfBoundsException. I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.