Skip to content

Commit 35601cb

Browse files
committed
Add Checkstyle ModifierOrder
1 parent d263618 commit 35601cb

File tree

10 files changed

+16
-15
lines changed

10 files changed

+16
-15
lines changed

src/conf/checkstyle.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ limitations under the License.
5656
<module name="JavadocMethod" />
5757
<module name="LeftCurly" />
5858
<module name="MissingOverride" />
59+
<module name="ModifierOrder" />
5960
<module name="NeedBraces" />
6061
<module name="ParenPad" />
6162
<module name="RedundantImport" />

src/main/java/org/apache/commons/io/build/AbstractOrigin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public abstract class AbstractOrigin<T, B extends AbstractOrigin<T, B>> extends
7575
* @param <T> the type of instances to build.
7676
* @param <B> the type of builder subclass.
7777
*/
78-
public static abstract class AbstractRandomAccessFileOrigin<T extends RandomAccessFile, B extends AbstractRandomAccessFileOrigin<T, B>>
78+
public abstract static class AbstractRandomAccessFileOrigin<T extends RandomAccessFile, B extends AbstractRandomAccessFileOrigin<T, B>>
7979
extends AbstractOrigin<T, B> {
8080

8181
/**

src/main/java/org/apache/commons/io/file/Counters.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public String toString() {
167167
/**
168168
* Counts files, directories, and sizes, as a visit proceeds, using BigInteger numbers.
169169
*/
170-
private final static class BigIntegerPathCounters extends AbstractPathCounters {
170+
private static final class BigIntegerPathCounters extends AbstractPathCounters {
171171

172172
/**
173173
* Constructs a new initialized instance.
@@ -228,7 +228,7 @@ default void reset() {
228228
/**
229229
* Counts using a {@code long} number.
230230
*/
231-
private final static class LongCounter implements Counter {
231+
private static final class LongCounter implements Counter {
232232

233233
private long value;
234234

@@ -289,7 +289,7 @@ public String toString() {
289289
/**
290290
* Counts files, directories, and sizes, as a visit proceeds, using long numbers.
291291
*/
292-
private final static class LongPathCounters extends AbstractPathCounters {
292+
private static final class LongPathCounters extends AbstractPathCounters {
293293

294294
/**
295295
* Constructs a new initialized instance.
@@ -303,7 +303,7 @@ protected LongPathCounters() {
303303
/**
304304
* Counts nothing.
305305
*/
306-
private final static class NoopCounter implements Counter {
306+
private static final class NoopCounter implements Counter {
307307

308308
static final NoopCounter INSTANCE = new NoopCounter();
309309

src/main/java/org/apache/commons/io/filefilter/DelegateFileFilter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ public class DelegateFileFilter extends AbstractFileFilter implements Serializab
3838
private static final long serialVersionUID = -8723373124984771318L;
3939

4040
/** The File filter */
41-
private transient final FileFilter fileFilter;
41+
private final transient FileFilter fileFilter;
4242
/** The Filename filter */
43-
private transient final FilenameFilter fileNameFilter;
43+
private final transient FilenameFilter fileNameFilter;
4444

4545
/**
4646
* Constructs a delegate file filter around an existing FileFilter.

src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private static int toFlags(final IOCase ioCase) {
102102
private final Pattern pattern;
103103

104104
/** How convert a path to a string. */
105-
private transient final Function<Path, String> pathToString;
105+
private final transient Function<Path, String> pathToString;
106106

107107
/**
108108
* Constructs a new regular expression filter for a compiled regular expression

src/main/java/org/apache/commons/io/input/BoundedInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public class BoundedInputStream extends ProxyInputStream {
9393
*
9494
* @param <T> The subclass.
9595
*/
96-
static abstract class AbstractBuilder<T extends AbstractBuilder<T>> extends ProxyInputStream.AbstractBuilder<BoundedInputStream, T> {
96+
abstract static class AbstractBuilder<T extends AbstractBuilder<T>> extends ProxyInputStream.AbstractBuilder<BoundedInputStream, T> {
9797

9898
/** The current count of bytes counted. */
9999
private long count;

src/main/java/org/apache/commons/io/input/ObservableInputStream.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class ObservableInputStream extends ProxyInputStream {
4949
* @param <T> The subclass.
5050
* @since 2.18.0
5151
*/
52-
public static abstract class AbstractBuilder<T extends AbstractBuilder<T>> extends ProxyInputStream.AbstractBuilder<ObservableInputStream, T> {
52+
public abstract static class AbstractBuilder<T extends AbstractBuilder<T>> extends ProxyInputStream.AbstractBuilder<ObservableInputStream, T> {
5353

5454
private List<Observer> observers;
5555

@@ -95,7 +95,7 @@ public ObservableInputStream get() throws IOException {
9595
/**
9696
* Abstracts observer callback for {@link ObservableInputStream}s.
9797
*/
98-
public static abstract class Observer {
98+
public abstract static class Observer {
9999

100100
/**
101101
* Constructs a new instance for subclasses.

src/main/java/org/apache/commons/io/input/ProxyInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public abstract class ProxyInputStream extends FilterInputStream {
5353
* @param <B> The builder type.
5454
* @since 2.18.0
5555
*/
56-
protected static abstract class AbstractBuilder<T, B extends AbstractStreamBuilder<T, B>> extends AbstractStreamBuilder<T, B> {
56+
protected abstract static class AbstractBuilder<T, B extends AbstractStreamBuilder<T, B>> extends AbstractStreamBuilder<T, B> {
5757

5858
private IOIntConsumer afterRead;
5959

src/main/java/org/apache/commons/io/monitor/FileAlterationObserver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private static Comparator<File> toComparator(final IOCase ioCase) {
210210
/**
211211
* List of listeners.
212212
*/
213-
private transient final List<FileAlterationListener> listeners = new CopyOnWriteArrayList<>();
213+
private final transient List<FileAlterationListener> listeners = new CopyOnWriteArrayList<>();
214214

215215
/**
216216
* The root directory to observe.
@@ -220,7 +220,7 @@ private static Comparator<File> toComparator(final IOCase ioCase) {
220220
/**
221221
* The file filter or null if none.
222222
*/
223-
private transient final FileFilter fileFilter;
223+
private final transient FileFilter fileFilter;
224224

225225
/**
226226
* Compares file names.

src/main/java/org/apache/commons/io/output/RandomAccessFileOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public final class RandomAccessFileOutputStream extends OutputStream {
5151
* @see #get()
5252
*/
5353
// @formatter:on
54-
public final static class Builder extends AbstractStreamBuilder<RandomAccessFileOutputStream, Builder> {
54+
public static final class Builder extends AbstractStreamBuilder<RandomAccessFileOutputStream, Builder> {
5555

5656
/**
5757
* Use {@link RandomAccessFileOutputStream#builder()}.

0 commit comments

Comments
 (0)