Skip to content

Commit

Permalink
Fix SpotBugs errors
Browse files Browse the repository at this point in the history
- [ERROR] Medium: Class
org.apache.commons.io.monitor.FileAlterationObserver defines
non-transient non-serializable instance field fileFilter
[org.apache.commons.io.monitor.FileAlterationObserver] In
FileAlterationObserver.java SE_BAD_FIELD
- [ERROR] Medium: Class
org.apache.commons.io.monitor.FileAlterationObserver defines
non-transient non-serializable instance field listeners
[org.apache.commons.io.monitor.FileAlterationObserver] In
FileAlterationObserver.java SE_BAD_FIELD
  • Loading branch information
garydgregory committed Nov 23, 2023
1 parent 7fd53e9 commit c39be8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ The <action> type attribute can be add,update,fix,remove.
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs error: Class org.apache.commons.io.filefilter.DelegateFileFilter defines non-transient non-serializable instance field fileFilter [org.apache.commons.io.filefilter.DelegateFileFilter] In DelegateFileFilter.java SE_BAD_FIELD.</action>
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs error: Class org.apache.commons.io.filefilter.DelegateFileFilter defines non-transient non-serializable instance field fileNameFilter [org.apache.commons.io.filefilter.DelegateFileFilter] In DelegateFileFilter.java SE_BAD_FIELD.</action>
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs error: org.apache.commons.io.function.IOStream$1.next() cannot throw NoSuchElementException [org.apache.commons.io.function.IOStream$1] At IOStream.java:[line 98] IT_NO_SUCH_ELEMENT.</action>
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs error: Class org.apache.commons.io.monitor.FileAlterationObserver defines non-transient non-serializable instance field fileFilter [org.apache.commons.io.monitor.FileAlterationObserver] In FileAlterationObserver.java SE_BAD_FIELD.</action>
<action dev="ggregory" type="fix" due-to="Gary Gregory">Fix SpotBugs error: Class org.apache.commons.io.monitor.FileAlterationObserver defines non-transient non-serializable instance field listeners [org.apache.commons.io.monitor.FileAlterationObserver] In FileAlterationObserver.java SE_BAD_FIELD.</action>
<!-- UPDATE -->
<action dev="ggregory" type="update" due-to="Gary Gregory">Bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 #512.</action>
<action dev="ggregory" type="update" due-to="Gary Gregory">Bump commons-lang3 from 3.13.0 to 3.14.0.</action>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@
public class FileAlterationObserver implements Serializable {

private static final long serialVersionUID = 1185122225658782848L;
private final List<FileAlterationListener> listeners = new CopyOnWriteArrayList<>();
private transient final List<FileAlterationListener> listeners = new CopyOnWriteArrayList<>();
private final FileEntry rootEntry;
private final FileFilter fileFilter;
private transient final FileFilter fileFilter;
private final Comparator<File> comparator;

/**
Expand Down

0 comments on commit c39be8e

Please sign in to comment.