Skip to content

Commit 331bb95

Browse files
rhowerfscholte
authored andcommitted
Use !isEmpty() instead of size() > 0
1 parent 48ade6c commit 331bb95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ else if ( !values[0].equals( descriptor.name() ) )
10711071

10721072
StringBuilder sb = new StringBuilder();
10731073

1074-
if ( patchModules.size() > 0 )
1074+
if ( !patchModules.isEmpty() )
10751075
{
10761076
for ( String mod : patchModules )
10771077
{
@@ -1341,7 +1341,7 @@ private boolean isSourceChanged( CompilerConfiguration compilerConfiguration, Co
13411341
getLog().debug( "Stale source detected: " + f.getAbsolutePath() );
13421342
}
13431343
}
1344-
return staleSources != null && staleSources.size() > 0;
1344+
return staleSources != null && !staleSources.isEmpty();
13451345
}
13461346

13471347

@@ -1428,7 +1428,7 @@ protected final Toolchain getToolchain()
14281428
(List<Toolchain>) getToolchainsMethod.invoke( toolchainManager, session, "jdk",
14291429
jdkToolchain );
14301430

1431-
if ( tcs != null && tcs.size() > 0 )
1431+
if ( tcs != null && !tcs.isEmpty() )
14321432
{
14331433
tc = tcs.get( 0 );
14341434
}

0 commit comments

Comments
 (0)