You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Jarek Jarcec Cecho (JIRA)" <ji...@apache.org> on 2013/11/05 21:18:17 UTC
[jira] [Updated] (SQOOP-1227) Sqoop fails to compile against
commons-io higher then 1.4
[ https://issues.apache.org/jira/browse/SQOOP-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Jarcec Cecho updated SQOOP-1227:
--------------------------------------
Attachment: SQOOP-1227.patch
> Sqoop fails to compile against commons-io higher then 1.4
> ---------------------------------------------------------
>
> Key: SQOOP-1227
> URL: https://issues.apache.org/jira/browse/SQOOP-1227
> Project: Sqoop
> Issue Type: Bug
> Affects Versions: 1.4.4
> Reporter: Jarek Jarcec Cecho
> Assignee: Jarek Jarcec Cecho
> Fix For: 1.4.5
>
> Attachments: SQOOP-1227.patch
>
>
> The problem is in [DataDrivenImportJob.writeAvroSchema|https://github.com/apache/sqoop/blob/trunk/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java#L103] where we have following code fragment:
> {code}
> FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
> {code}
> The last parameter to the function call is {{null}} without any time. This works fine in {{commons-io}} 1.4 as the method {{writeStringToFile}} have only two different definitions:
> {code}
> writeStringToFile(File file, String data)
> writeStringToFile(File file, String data, String encoding)
> {code}
> However later versions has added a lot of other definitions, such as:
> {code}
> writeStringToFile(File file, String data, Charset encoding)
> {code}
> And thus the compilation fails on ambiguity problem:
> {code}
> [javac] /home/jarcec/apache/repos/sqoop/src/java/org/apache/sqoop/mapreduce/DataDrivenImportJob.java:109: error: reference to writeStringToFile is ambiguous, both method writeStringToFile(File,String,Charset) in FileUtils and method writeStringToFile(File,String,String) in FileUtils match
> [javac] FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
> [javac] ^
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)