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

Marshall Schor commented on UIMA-5923:
--------------------------------------

In FileUtils, the deprecated ref for createTempFile(String prefix, String 
suffix, File tempDir) should be:
{code:java}
{@link java.nio.file.File#createTempFile(String, String, File)}   // (I'll fix 
this){code}
Some of the deprecation signatures are written with trailing arg being an 
array, whereas, the trailing arg is a "var-args" (meaning it is an array if it 
exists, but can be omitted.  I'll fixed these.

The deprecation for copyFile(File file, File dir) points to an incompatible 
method signature:
{code:java}
{@link java.nio.file.Files#copy(Path, Path, CopyOption...)}{code}
using Paths instead of Files, so we could deprecate this to signal new uses 
should use the other method, but I don't want to break existing code by 
removing this I think. 

This comment applies also to many of the deprecations in the pear util's 
FileUtil class.

I changed some of the deprecations in pear.util.FileUtil to be the form which 
includes the Charset.  New code I think should always specify the charset, 
instead of defaulting to the "platform" - this has caused problems in the past.

> Deprecate methods in FileUtil and FileUtils which duplicate 
> java.nio.file.Files
> -------------------------------------------------------------------------------
>
>                 Key: UIMA-5923
>                 URL: https://issues.apache.org/jira/browse/UIMA-5923
>             Project: UIMA
>          Issue Type: Improvement
>          Components: UIMA
>            Reporter: Joern Kottmann
>            Assignee: Marshall Schor
>            Priority: Trivial
>         Attachments: uima-5923.patch
>
>
> These methods are now part of Java 8 and it would be better to use these 
> instead. Since the methods are part of the public API they need to be 
> deprecated first before they can be removed. This will give our users some 
> time to migrate to the Java 8 methods as well. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to