8235601: redundant code in IOUtils.java
Reviewed-by: prr, asemenyuk, almatvee
This commit is contained in:
parent
6ad37680dd
commit
0b1499cb48
@ -121,11 +121,8 @@ public class IOUtils {
|
|||||||
try (FileChannel source = new FileInputStream(sourceFile).getChannel();
|
try (FileChannel source = new FileInputStream(sourceFile).getChannel();
|
||||||
FileChannel destination =
|
FileChannel destination =
|
||||||
new FileOutputStream(destFile).getChannel()) {
|
new FileOutputStream(destFile).getChannel()) {
|
||||||
|
|
||||||
if (destination != null && source != null) {
|
|
||||||
destination.transferFrom(source, 0, source.size());
|
destination.transferFrom(source, 0, source.size());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//preserve executable bit!
|
//preserve executable bit!
|
||||||
if (sourceFile.canExecute()) {
|
if (sourceFile.canExecute()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user