Skip to content

Commit 39b61a4

Browse files
author
Gary Gregory
committed
Move ctor.
1 parent 60319bd commit 39b61a4

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

src/main/java/org/apache/commons/io/FileUtils.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,15 @@ public class FileUtils {
194194
*/
195195
public static final File[] EMPTY_FILE_ARRAY = {};
196196

197+
/**
198+
* Instances should NOT be constructed in standard programming.
199+
* @deprecated Will be private in 3.0.
200+
*/
201+
@Deprecated
202+
public FileUtils() { //NOSONAR
203+
204+
}
205+
197206
/**
198207
* Copies the given array and adds StandardCopyOption.COPY_ATTRIBUTES.
199208
*
@@ -2648,6 +2657,7 @@ public static List<String> readLines(final File file, final Charset charset) thr
26482657
return Files.readAllLines(file.toPath(), charset);
26492658
}
26502659

2660+
26512661
/**
26522662
* Reads the contents of a file line by line to a List of Strings. The file is always closed.
26532663
*
@@ -2666,7 +2676,6 @@ public static List<String> readLines(final File file, final String charsetName)
26662676
return readLines(file, Charsets.toCharset(charsetName));
26672677
}
26682678

2669-
26702679
private static void requireAbsent(final File file, final String name) throws FileExistsException {
26712680
if (file.exists()) {
26722681
throw new FileExistsException(String.format("File element in parameter '%s' already exists: '%s'", name, file));
@@ -3208,6 +3217,8 @@ public static void write(final File file, final CharSequence data, final boolean
32083217
write(file, data, Charset.defaultCharset(), append);
32093218
}
32103219

3220+
// Private method, must be invoked will a directory parameter
3221+
32113222
/**
32123223
* Writes a CharSequence to a file creating the file if it does not exist.
32133224
*
@@ -3221,8 +3232,6 @@ public static void write(final File file, final CharSequence data, final Charset
32213232
write(file, data, charset, false);
32223233
}
32233234

3224-
// Private method, must be invoked will a directory parameter
3225-
32263235
/**
32273236
* Writes a CharSequence to a file creating the file if it does not exist.
32283237
*
@@ -3252,6 +3261,8 @@ public static void write(final File file, final CharSequence data, final String
32523261
write(file, data, charsetName, false);
32533262
}
32543263

3264+
// Must be called with a directory
3265+
32553266
/**
32563267
* Writes a CharSequence to a file creating the file if it does not exist.
32573268
*
@@ -3269,8 +3280,6 @@ public static void write(final File file, final CharSequence data, final String
32693280
write(file, data, Charsets.toCharset(charsetName), append);
32703281
}
32713282

3272-
// Must be called with a directory
3273-
32743283
/**
32753284
* Writes a byte array to a file creating the file if it does not exist.
32763285
* <p>
@@ -3351,6 +3360,7 @@ public static void writeLines(final File file, final Collection<?> lines) throws
33513360
writeLines(file, null, lines, null, false);
33523361
}
33533362

3363+
33543364
/**
33553365
* Writes the {@code toString()} value of each item in a collection to
33563366
* the specified {@code File} line by line.
@@ -3367,7 +3377,6 @@ public static void writeLines(final File file, final Collection<?> lines, final
33673377
writeLines(file, null, lines, null, append);
33683378
}
33693379

3370-
33713380
/**
33723381
* Writes the {@code toString()} value of each item in a collection to
33733382
* the specified {@code File} line by line.
@@ -3579,13 +3588,4 @@ public static void writeStringToFile(final File file, final String data, final S
35793588
writeStringToFile(file, data, Charsets.toCharset(charsetName), append);
35803589
}
35813590

3582-
/**
3583-
* Instances should NOT be constructed in standard programming.
3584-
* @deprecated Will be private in 3.0.
3585-
*/
3586-
@Deprecated
3587-
public FileUtils() { //NOSONAR
3588-
3589-
}
3590-
35913591
}

0 commit comments

Comments
 (0)