Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.4
-
None
-
None
Description
The problem is in DataDrivenImportJob.writeAvroSchema where we have following code fragment:
FileUtils.writeStringToFile(schemaFile, schema.toString(true), null);
The last parameter to the function call is null without any type. This works fine in commons-io 1.4 as the method writeStringToFile have only two different definitions:
writeStringToFile(File file, String data) writeStringToFile(File file, String data, String encoding)
However later versions has added a lot of other definitions, such as:
writeStringToFile(File file, String data, Charset encoding)
And thus the compilation fails on ambiguity problem:
[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] ^
Attachments
Attachments
Issue Links
- links to