<s...@apache.org> schrieb am Di., 7. Juni 2016 um 15:56 Uhr: > Author: sebb > Date: Tue Jun 7 13:56:34 2016 > New Revision: 1747238 > > URL: http://svn.apache.org/viewvc?rev=1747238&view=rev > Log: > Now using Java 7 so can avoid the deprecated constant > > Modified: > > commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java > > Modified: > commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java > URL: > http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1747238&r1=1747237&r2=1747238&view=diff > > ============================================================================== > --- > commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java > (original) > +++ > commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java > Tue Jun 7 13:56:34 2016 > @@ -33,6 +33,7 @@ import java.net.URLConnection; > import java.nio.ByteBuffer; > import java.nio.channels.FileChannel; > import java.nio.charset.Charset; > +import java.nio.charset.StandardCharsets; > import java.util.ArrayList; > import java.util.Collection; > import java.util.Date; > @@ -843,7 +844,7 @@ public class FileUtils { > * @return The decoded URL or {@code null} if the input was > * {@code null}. > */ > - @SuppressWarnings("deprecation") // unavoidable until Java 7 > +// @SuppressWarnings("deprecation") // unavoidable until Java 7 >
Please don't comment out code that has no use anymore. Just remove that stuff. > static String decodeUrl(final String url) { > String decoded = url; > if (url != null && url.indexOf('%') >= 0) { > @@ -865,7 +866,7 @@ public class FileUtils { > } finally { > if (bytes.position() > 0) { > bytes.flip(); > - > buffer.append(Charsets.UTF_8.decode(bytes).toString()); > + > buffer.append(StandardCharsets.UTF_8.decode(bytes).toString()); > bytes.clear(); > } > } > > >