File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
config/src/test/java/org/springframework/security Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 3636import java .util .Arrays ;
3737import java .util .HashSet ;
3838import java .util .List ;
39+ import java .util .Objects ;
3940import java .util .Set ;
4041import java .util .stream .Stream ;
4142
@@ -208,8 +209,8 @@ void allSerializableClassesShouldHaveSerialVersionOrSuppressWarnings() throws Ex
208209 .map (Field ::getName )
209210 .anyMatch ((n ) -> n .equals ("serialVersionUID" ));
210211 SuppressWarnings suppressWarnings = clazz .getAnnotation (SuppressWarnings .class );
211- boolean hasSerialIgnore = suppressWarnings == null
212- || Arrays .asList (suppressWarnings .value ()).contains ("Serial " );
212+ boolean hasSerialIgnore = Objects . nonNull ( suppressWarnings )
213+ && Arrays .asList (suppressWarnings .value ()).contains ("serial " );
213214 if (!hasSerialVersion && !hasSerialIgnore ) {
214215 classes .add (clazz );
215216 continue ;
You can’t perform that action at this time.
0 commit comments