[ 
https://issues.apache.org/jira/browse/SQOOP-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814232#comment-13814232
 ] 

ASF subversion and git services commented on SQOOP-1227:
--------------------------------------------------------

Commit bbc2c17a77cb17b195f465d9ab15d45f2b39c6b1 in branch refs/heads/trunk from 
[~hshreedharan]
[ https://git-wip-us.apache.org/repos/asf?p=sqoop.git;h=bbc2c17 ]

SQOOP-1227. Sqoop fails to compile against commons-io higher then 1.4

(Jarek Jarcec Cecho via Hari Shreedharan)


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

Reply via email to