[ 
http://issues.apache.org/jira/browse/DERBY-901?page=comments#action_12374572 ] 

Kathey Marsden commented on DERBY-901:
--------------------------------------

Hi Sunitha,

Thank you for looking at the issue:
I am having a bit of trouble with the repro. I am seeing i pass with and 
without the change.

On the code changes.
- I really like all the comments you added.
- I am not sure if I understand the encoding implications of switching from the 
byte array to 
private static String SQLERRMC_TOKEN_DELIMITER = new String(new char[] 
{(char)20}); and what that means when it is converted to UTF-8

I am wondering if there is not some ascii delimter we could use, e.g. ^^ or 
somesuch.  Whatever it is it can't be in the message strings themselves.

-   I still see one occurance of the byte[] in writeSQLDIAGCI(SQLException 
nextException)
byte[] sep = {20};      // use it as separator of sqlerrmc tokens
String separator = new String(sep);
                                
- Could we avoid the duplicate definitions of SQLERRMC_TOKEN_DELIMITER by 
having network server refer to the value in  SystemProcedures?



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

>   Components: Network Server
>     Reporter: Daniel John Debrunner
>     Assignee: Sunitha Kambhampati
>  Attachments: Derby901.p1.diff.txt, Derby901.p1.stat.txt, TestEnc.java
>
> 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.derby.impl.drda.DRDAConnThread
> I generated this list using the Java search in eclipse for references to the 
> constructors
> String(byte[])
> String(byte[],int,int) - no occurences found in java/drda

-- 
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

Reply via email to