You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Daniel John Debrunner (JIRA)" <de...@db.apache.org> on 2006/01/31 22:03:33 UTC

[jira] Created: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
-------------------------------------------------------------------------------------------------------------------

         Key: DERBY-903
         URL: http://issues.apache.org/jira/browse/DERBY-903
     Project: Derby
        Type: Bug
  Components: Test  
    Versions: 10.2.0.0    
    Reporter: Daniel John Debrunner
     Fix For: 10.2.0.0


These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.

Replace with code using fixed conversion, or alternative mechanisms. 
If the call is required its use should be commented as to why it is required.

org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
org.apache.derbyTesting.functionTests.tests.store.streamingColumn

I generated this list using the Java search in eclipse for references to the constructors
String(byte[])
String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Created: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by Daniel John Debrunner <dj...@apache.org>.
Myrna van Lunteren wrote:

> I have a question sideways in connection to this bug - I did the search
> for the String(byte[]) constructor in eclipse, and found that in
> addition to the 4 tests as reported, this is used in the following classes:
>    - java/engine/org.apache.derby.catalog.SystemProcedures
>      method SQLCAMESSAGE
>    - java/drda/org.apache.derby.impl.drda.DRDAConnThread
>      method readAndSetParams, writeSQLDIAGCI and static assignments for
>      SQLERRMC_MESSAGE_DELIMETER and SQLERRMC_TOKEN_DELIMITER
>  
> Wouldn't the usage there also cause trouble when derby is used in
> non-fixed encodings?

Yes, I entered multiple bugs, one for each top level directory (e.g.
java/engine, java/testing etc.).

Dan.



Re: [jira] Created: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by Myrna van Lunteren <m....@gmail.com>.
I have a question sideways in connection to this bug - I did the search for
the String(byte[]) constructor in eclipse, and found that in addition to the
4 tests as reported, this is used in the following classes:
   - java/engine/org.apache.derby.catalog.SystemProcedures
     method SQLCAMESSAGE
   - java/drda/org.apache.derby.impl.drda.DRDAConnThread
     method readAndSetParams, writeSQLDIAGCI and static assignments for
     SQLERRMC_MESSAGE_DELIMETER and SQLERRMC_TOKEN_DELIMITER

Wouldn't the usage there also cause trouble when derby is used in non-fixed
encodings?

Myrna


On 1/31/06, Daniel John Debrunner (JIRA) <de...@db.apache.org> wrote:
>
> Remove use of String(byte[]) and String(byte[], int, int) constructors in
> testing leading to non-portable behaviour
>
> -------------------------------------------------------------------------------------------------------------------
>
>         Key: DERBY-903
>         URL: http://issues.apache.org/jira/browse/DERBY-903
>     Project: Derby
>        Type: Bug
> Components: Test
>    Versions: 10.2.0.0
>    Reporter: Daniel John Debrunner
>     Fix For: 10.2.0.0
>
>
> These constructors use the Java default platform encoding to convert the
> bytes to a String, this typically leads to bugs on platforms with different
> encodings.
>
> Replace with code using fixed conversion, or alternative mechanisms.
> If the call is required its use should be commented as to why it is
> required.
>
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
>
> I generated this list using the Java search in eclipse for references to
> the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>
>

Re: [jira] Commented: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by Myrna van Lunteren <m....@gmail.com>.
Hi,

I decided to just print out a simple descriptive String in this
not-currently-hit-in-these-tests error situation.
With Jira down, I'm attaching an updated coalesceTests.java and
resultset.java to this mail.

Myrna


On 2/15/06, Myrna van Lunteren (JIRA) <de...@db.apache.org> wrote:
>
>    [ http://issues.apache.org/jira/browse/DERBY-903?page=comments#action_12366571
> ]
>
> Myrna van Lunteren commented on DERBY-903:
> ------------------------------------------
>
> Hi Andrew,
>
> Thx for looking at this.
>
> I would say, if no one objects, to go ahead with this change at this
> point, I will make a follow up patch to clean that bit up.
>
> The same construct is used in coalesceTests...The code doesn't get used in
> either test. It looks like it was copied out of metadata test, but I don't
> think it's done like this there (anymore), it's a odd piece of code.
>
>
>
>
> > Remove use of String(byte[]) and String(byte[], int, int) constructors
> in testing leading to non-portable behaviour
> >
> -------------------------------------------------------------------------------------------------------------------
>
> >
> >          Key: DERBY-903
> >          URL: http://issues.apache.org/jira/browse/DERBY-903
> >      Project: Derby
> >         Type: Bug
> >   Components: Test
> >     Versions: 10.2.0.0
> >     Reporter: Daniel John Debrunner
> >     Assignee: Myrna van Lunteren
> >      Fix For: 10.2.0.0
> >  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
> >
> > These constructors use the Java default platform encoding to convert the
> bytes to a String, this typically leads to bugs on platforms with different
> encodings.
> > Replace with code using fixed conversion, or alternative mechanisms.
> > If the call is required its use should be commented as to why it is
> required.
> > org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> > org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> > org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> > org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> > I generated this list using the Java search in eclipse for references to
> the constructors
> > String(byte[])
> > String(byte[],int,int) (no occurrences in java/testing)
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>

[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Fix Version: 10.1.3.0
                     (was: 10.2.0.0)
        Version: 10.1.2.3
                     (was: 10.2.0.0)

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren reassigned DERBY-903:
----------------------------------------

    Assign To: Myrna van Lunteren

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0

>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Attachment: DERBY-903_followup1_2006_02_16.stat
                DERBY-903_followup1_2006_02_16.diff

attaching follow up patch DERBY-903_2006_02_16.diff & .stat which modify test resultset.java and coalesceTests.java to only print out a descriptive message if error 22005 is seen (currently not the case in either test). Also removed no longer needed UnsupportedEncodingException from dumpRS() in coalesceTests.

tested only these two tests (in normally running framework configuration, with jdk14 & jdk15) and (using DERBY-683 test patch) with derbyTesting.encoding=UTF-16 with jdk15.

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Attachment: DERBY-903_101_20060426.stat
                DERBY-903_101_20060426.diff

patch for 10.1 - DERBY-903_101_20060426.* 

I've run the affected tests on windows and zOS.
blobclob4BLOB still fails on zOS because of DERBY-575.
The other tests pass.

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_101_20060426.diff, DERBY-903_101_20060426.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Attachment: DERBY-903_021306.stat
                DERBY-903_021306.diff

This patch fixes the occurrence of the constructors as reported, and in addition, fixes the 4 tests to use
fixed strings so the test passes with a different encoding in the following cases:
- string.getBytes()
       especially frequent in the blobclob4BLOB test, where it is used to obtain a number of bytes to insert into a blob. 
       Using this without the encoding causes problems with other encodings.
- change to use FileInputStream and InputStreamReader for subtest clobNegativeTest_Derby265 of blobclob4BLOB. (see also comment in DERBY-575)

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]
     
Myrna van Lunteren reopened DERBY-903:
--------------------------------------


reopening for making a 10.1 version - with 10.1 tests streamingColumn and blobclob4BLOB  fails with 10.1 on zOS because of this usage. 
Note that resultset and coalesceTests are ok, and blobclob4BLOB needs further work apart from back porting this change (see DERBY-575).



> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-903?page=comments#action_12366185 ] 

Myrna van Lunteren commented on DERBY-903:
------------------------------------------

I ran all 4 tests with jdk15, embedded, DerbyNet and DerbyNetClient.
coalesceTests and streamingColumn don't normally run with network server, but the result with and without the patch was the same with the default encoding, and now work the same way with -DderbyTesting.encoding=UTF-16 (need the improved patch for test harness from DERBY-683 for this).

The only noticeable thing here is that with DerbyNetClient, streamingColumn generates an odd error in subtest DERBY-500:
"End-of-Stream prematurely reached while reading Reader, parameter #4. Remaining data has been padded with 0x0. "
However, again, this occurs with or without my changes to the test.




> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-903?page=comments#action_12366571 ] 

Myrna van Lunteren commented on DERBY-903:
------------------------------------------

Hi Andrew,

Thx for looking at this.

I would say, if no one objects, to go ahead with this change at this point, I will make a follow up patch to clean that bit up.

The same construct is used in coalesceTests...The code doesn't get used in either test. It looks like it was copied out of metadata test, but I don't think it's done like this there (anymore), it's a odd piece of code. 




> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]
     
Andrew McIntyre resolved DERBY-903:
-----------------------------------

    Resolution: Fixed

Committed followup patch with revision 379643.

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-903?page=comments#action_12366565 ] 

Andrew McIntyre commented on DERBY-903:
---------------------------------------

Hi Myrna,

I took a look at the latest patch for this, DERBY-903_021306.diff.  It looks good, except it's not clear to me that the diff in resultset.java would actually be encoding-safe. It looks like adding the contents of getBytes.toString() to the StringBuffer would be the same as new String(getBytes()), although this code is in an exception handler, so it's not clear to me from the code or the output that this code is ever reached. Let me know if you want to take a closer look at that, otherwise I'll go ahead and commit and you can follow up later.

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Other Info: [Patch available]

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Andrew McIntyre (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-903?page=comments#action_12376636 ] 

Andrew McIntyre commented on DERBY-903:
---------------------------------------

Committed 10.1 patch with revision 397394.

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_101_20060426.diff, DERBY-903_101_20060426.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]
     
Myrna van Lunteren resolved DERBY-903:
--------------------------------------

    Resolution: Fixed
    Derby Info:   (was: [Patch Available])

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_101_20060426.diff, DERBY-903_101_20060426.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]

Myrna van Lunteren updated DERBY-903:
-------------------------------------

    Derby Info: [Patch Available]

> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug

>   Components: Test
>     Versions: 10.1.2.3
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.1.3.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_101_20060426.diff, DERBY-903_101_20060426.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-903) Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour

Posted by "Myrna van Lunteren (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-903?page=all ]
     
Myrna van Lunteren closed DERBY-903:
------------------------------------


> Remove use of String(byte[]) and String(byte[], int, int) constructors in testing leading to non-portable behaviour
> -------------------------------------------------------------------------------------------------------------------
>
>          Key: DERBY-903
>          URL: http://issues.apache.org/jira/browse/DERBY-903
>      Project: Derby
>         Type: Bug
>   Components: Test
>     Versions: 10.2.0.0
>     Reporter: Daniel John Debrunner
>     Assignee: Myrna van Lunteren
>      Fix For: 10.2.0.0
>  Attachments: DERBY-903_021306.diff, DERBY-903_021306.stat, DERBY-903_followup1_2006_02_16.diff, DERBY-903_followup1_2006_02_16.stat
>
> These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.
> Replace with code using fixed conversion, or alternative mechanisms. 
> If the call is required its use should be commented as to why it is required.
> org.apache.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
> org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
> org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
> org.apache.derbyTesting.functionTests.tests.store.streamingColumn
> I generated this list using the Java search in eclipse for references to the constructors
> String(byte[])
> String(byte[],int,int) (no occurrences in java/testing)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira