Use longer lines
MODIFY
src/main/java/org/apache/commons/io/FileUtils.java
src/main/java/org/apache/commons/io/FileUtils.java
@@ -2799,8 +2799,7 @@ private static void requireEqualSizes(final File srcFile, final File destFile, f
private static File requireExists(final File file, final String fileParamName) {
Objects.requireNonNull(file, fileParamName);
if (!file.exists()) {
- throw new IllegalArgumentException(
- "File system element for parameter '" + fileParamName + "' does not exist: '" + file + "'");
+ throw new IllegalArgumentException("File system element for parameter '" + fileParamName + "' does not exist: '" + file + "'");
}
return file;
}
@@ -2817,8 +2816,7 @@ private static File requireExists(final File file, final String fileParamName) {
private static File requireExistsChecked(final File file, final String fileParamName) throws FileNotFoundException {
Objects.requireNonNull(file, fileParamName);
if (!file.exists()) {
- throw new FileNotFoundException(
- "File system element for parameter '" + fileParamName + "' does not exist: '" + file + "'");
+ throw new FileNotFoundException("File system element for parameter '" + fileParamName + "' does not exist: '" + file + "'");
}
return file;
}

MODIFY
src/main/java/org/apache/commons/io/input/CharSequenceReader.java
src/main/java/org/apache/commons/io/input/CharSequenceReader.java
@@ -116,12 +116,10 @@ public CharSequenceReader(final CharSequence charSequence, final int start) {
*/
public CharSequenceReader(final CharSequence charSequence, final int start, final int end) {
if (start < 0) {
- throw new IllegalArgumentException(
- "Start index is less than zero: " + start);
+ throw new IllegalArgumentException("Start index is less than zero: " + start);
}
if (end < start) {
- throw new IllegalArgumentException(
- "End index is less than start " + start + ": " + end);
+ throw new IllegalArgumentException("End index is less than start " + start + ": " + end);
}
// Don't check the start and end indexes against the CharSequence,
// to let it grow and shrink without breaking existing behavior.
@@ -269,8 +267,7 @@ public void reset() {
@Override
public long skip(final long n) {
if (n < 0) {
- throw new IllegalArgumentException(
- "Number of characters to skip is less than zero: " + n);
+ throw new IllegalArgumentException("Number of characters to skip is less than zero: " + n);
}
if (idx >= end()) {
return 0;

MODIFY
src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
src/main/java/org/apache/commons/io/input/ReadAheadInputStream.java
@@ -145,8 +145,7 @@ public ReadAheadInputStream(final InputStream inputStream, final int bufferSizeI
private ReadAheadInputStream(final InputStream inputStream, final int bufferSizeInBytes,
final ExecutorService executorService, final boolean shutdownExecutorService) {
if (bufferSizeInBytes <= 0) {
- throw new IllegalArgumentException(
- "bufferSizeInBytes should be greater than 0, but the value is " + bufferSizeInBytes);
+ throw new IllegalArgumentException("bufferSizeInBytes should be greater than 0, but the value is " + bufferSizeInBytes);
}
this.executorService = Objects.requireNonNull(executorService, "executorService");
this.underlyingInputStream = Objects.requireNonNull(inputStream, "inputStream");

MODIFY
src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
src/main/java/org/apache/commons/io/output/ByteArrayOutputStream.java
@@ -102,8 +102,7 @@ public ByteArrayOutputStream() {
*/
public ByteArrayOutputStream(final int size) {
if (size < 0) {
- throw new IllegalArgumentException(
- "Negative initial size: " + size);
+ throw new IllegalArgumentException("Negative initial size: " + size);
}
synchronized (this) {
needNewBuffer(size);

Use longer lines