db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-901) Remove use of String(byte[]) constructors in network server leading to non-portable behaviour
Date Fri, 14 Apr 2006 21:55:01 GMT
    [ http://issues.apache.org/jira/browse/DERBY-901?page=comments#action_12374576 ] 

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

Thanks Sunitha,  

I got the repro working and committed the patch.  This is a big improvement.
For the trace issue I think we should print a hex representation of the byte[] I don't think
what prints now is useful with any encoding.

I think I believe that (char) 20 gets converted properly since I saw it work with my own eyes
but I never cease to be confused by the control character delimeters.





> 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


Mime
View raw message