[
https://issues.apache.org/jira/browse/SQOOP-2451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14661420#comment-14661420
]
Dian Fu commented on SQOOP-2451:
--------------------------------
Hi [~jarcec],
Sorry to come to this JIRA late.
{quote}
- conn.setRequestProperty("Content-Length",
Integer.toString(data.getBytes().length));
+ conn.setRequestProperty("Content-Length",
Integer.toString(data.getBytes(CHARSET).length));
// Send request
wr = new DataOutputStream(conn.getOutputStream());
wr.writeBytes(data);
{quote}
For the above code, I'm wondering if we should also change
{{wr.writeBytes(data);}} to {{wr.writeBytes(data.getBytes(CHARSET));}}.
> Sqoop2: Findbugs: Add explicit charset to client ResourceRequest class
> ----------------------------------------------------------------------
>
> Key: SQOOP-2451
> URL: https://issues.apache.org/jira/browse/SQOOP-2451
> Project: Sqoop
> Issue Type: Sub-task
> Reporter: Jarek Jarcec Cecho
> Assignee: Jarek Jarcec Cecho
> Fix For: 1.99.7
>
> Attachments: SQOOP-2451.patch
>
>
> I feel that this one is quite valid concern - we're not explicitly specifying
> what encoding we're using when serializing/deserializing data. We're
> depending on the default UTF-8 being set, which is not optimal as some users
> can change that and then things will break.
> I'll attach class to fix this in the {{client}} module and will fix other
> module as I'll get to them.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)