Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-6829] Replace StringUtils#isEmpty(String) & #isNotEmpty(String) #189

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException

compilerConfiguration.setImplicitOption(implicit);

if (debug && StringUtils.isNotEmpty(debuglevel)) {
if (debug && (debuglevel != null && !debuglevel.isEmpty())) {
String[] split = StringUtils.split(debuglevel, ",");
for (String aSplit : split) {
if (!(aSplit.equalsIgnoreCase("none")
Expand Down Expand Up @@ -779,7 +779,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException
compilerConfiguration.setFork(fork);

if (fork) {
if (!StringUtils.isEmpty(meminitial)) {
if (!(meminitial == null || meminitial.isEmpty())) {
String value = getMemoryValue(meminitial);

if (value != null) {
Expand All @@ -789,7 +789,7 @@ public void execute() throws MojoExecutionException, CompilationFailureException
}
}

if (!StringUtils.isEmpty(maxmem)) {
if (!(maxmem == null || maxmem.isEmpty())) {
String value = getMemoryValue(maxmem);

if (value != null) {
Expand Down Expand Up @@ -960,14 +960,14 @@ public void execute() throws MojoExecutionException, CompilationFailureException
key = "-" + key;
}

if (key.startsWith("-A") && StringUtils.isNotEmpty(value)) {
if (key.startsWith("-A") && (value != null && !value.isEmpty())) {
compilerConfiguration.addCompilerCustomArgument(key + "=" + value, null);
} else {
compilerConfiguration.addCompilerCustomArgument(key, value);
}
}
}
if (!StringUtils.isEmpty(effectiveCompilerArgument)) {
if (!(effectiveCompilerArgument == null || effectiveCompilerArgument.isEmpty())) {
compilerConfiguration.addCompilerCustomArgument(effectiveCompilerArgument, null);
}
if (compilerArgs != null) {
Expand Down Expand Up @@ -1310,7 +1310,7 @@ protected boolean isTestCompile() {
private Set<File> getCompileSources(Compiler compiler, CompilerConfiguration compilerConfiguration)
throws MojoExecutionException, CompilerException {
String inputFileEnding = compiler.getInputFileEnding(compilerConfiguration);
if (StringUtils.isEmpty(inputFileEnding)) {
if (inputFileEnding == null || inputFileEnding.isEmpty()) {
// see MCOMPILER-199 GroovyEclipseCompiler doesn't set inputFileEnding
// so we can presume it's all files from the source directory
inputFileEnding = ".*";
Expand Down Expand Up @@ -1710,7 +1710,7 @@ private DirectoryScanResult computeInputFileTreeChanges(IncrementalBuildHelper i
}

private boolean hasInputFileTreeChanged(DirectoryScanResult dsr) {
return (dsr.getFilesAdded().length > 0 || dsr.getFilesRemoved().length > 0);
return dsr.getFilesAdded().length > 0 || dsr.getFilesRemoved().length > 0;
}

public void setTarget(String target) {
Expand Down