String arguments should not be blank

This commit is contained in:
Erik C. Thauvin 2023-11-26 17:05:07 -08:00
parent 2a88bbb045
commit d800fda561
5 changed files with 33 additions and 16 deletions

View file

@ -94,6 +94,16 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
}
}
/**
* Determines if the given string is not blank.
*
* @param s the string
* @return {@code true} if not blank, {@code false} otherwise.
*/
public static boolean isNotBlank(String s) {
return s != null && !s.isBlank();
}
/**
* Provides the main build destination directory.
*
@ -276,7 +286,7 @@ public class CompileKotlinOperation extends AbstractOperation<CompileKotlinOpera
args.add(destination.getAbsolutePath());
// friend-path
if (friendPaths != null) {
if (friendPaths != null && friendPaths.exists()) {
args.add("-Xfriend-paths=" + friendPaths.getAbsolutePath());
}