mirror of
https://github.com/rife2/bld
synced 2026-04-18 06:04:09 +02:00
Remove redundant null/empty checks
This commit is contained in:
parent
4de8d3c629
commit
aa10006ce2
|
|
@ -154,11 +154,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions addExports(Collection<String> modules) {
|
public JavacOptions addExports(Collection<String> modules) {
|
||||||
if (isNotEmpty(modules)) {
|
|
||||||
return addCommaSeparatedOption("--add-exports", modules);
|
return addCommaSeparatedOption("--add-exports", modules);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies additional modules to be considered as required by a given module
|
* Specifies additional modules to be considered as required by a given module
|
||||||
|
|
@ -180,11 +177,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions addReads(Collection<String> modules) {
|
public JavacOptions addReads(Collection<String> modules) {
|
||||||
if (isNotEmpty(modules)) {
|
|
||||||
return addCommaSeparatedOption("--add-reads", modules);
|
return addCommaSeparatedOption("--add-reads", modules);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Root modules to resolve in addition to the initial modules,
|
* Root modules to resolve in addition to the initial modules,
|
||||||
|
|
@ -208,11 +202,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 1.5.18
|
* @since 1.5.18
|
||||||
*/
|
*/
|
||||||
public JavacOptions addModules(Collection<String> modules) {
|
public JavacOptions addModules(Collection<String> modules) {
|
||||||
if (isNotEmpty(modules)) {
|
|
||||||
return addCommaSeparatedOption("--add-modules", modules);
|
return addCommaSeparatedOption("--add-modules", modules);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify character encoding used by source files
|
* Specify character encoding used by source files
|
||||||
|
|
@ -548,11 +539,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 1.5.18
|
* @since 1.5.18
|
||||||
*/
|
*/
|
||||||
public JavacOptions limitModules(Collection<String> modules) {
|
public JavacOptions limitModules(Collection<String> modules) {
|
||||||
if (isNotEmpty(modules)) {
|
|
||||||
return addCommaSeparatedOption("--limit-modules", modules);
|
return addCommaSeparatedOption("--limit-modules", modules);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compile only the specified module(s), check timestamps
|
* Compile only the specified module(s), check timestamps
|
||||||
|
|
@ -574,11 +562,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 1.5.18
|
* @since 1.5.18
|
||||||
*/
|
*/
|
||||||
public JavacOptions module(Collection<String> modules) {
|
public JavacOptions module(Collection<String> modules) {
|
||||||
if (isNotEmpty(modules)) {
|
|
||||||
return addCommaSeparatedOption("--module", modules);
|
return addCommaSeparatedOption("--module", modules);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* /**
|
* /**
|
||||||
|
|
@ -653,11 +638,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions modulePathStrings(Collection<String> paths) {
|
public JavacOptions modulePathStrings(Collection<String> paths) {
|
||||||
if (isNotEmpty(paths)) {
|
|
||||||
return addPathOption(COMPILE_OPTION_MODULE_PATH, paths);
|
return addPathOption(COMPILE_OPTION_MODULE_PATH, paths);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify where to find input source files for multiple modules
|
* Specify where to find input source files for multiple modules
|
||||||
|
|
@ -666,11 +648,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions moduleSourcePathStrings(Collection<String> paths) {
|
public JavacOptions moduleSourcePathStrings(Collection<String> paths) {
|
||||||
if (isNotEmpty(paths)) {
|
|
||||||
return addPathOption("--module-source-path", paths);
|
return addPathOption("--module-source-path", paths);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify where to find input source files for multiple modules
|
* Specify where to find input source files for multiple modules
|
||||||
|
|
@ -802,11 +781,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 1.5.18
|
* @since 1.5.18
|
||||||
*/
|
*/
|
||||||
public JavacOptions processors(Collection<String> classnames) {
|
public JavacOptions processors(Collection<String> classnames) {
|
||||||
if (isNotEmpty(classnames)) {
|
|
||||||
return addCommaSeparatedOption("-processor", classnames);
|
return addCommaSeparatedOption("-processor", classnames);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify a module path where to find annotation processors
|
* Specify a module path where to find annotation processors
|
||||||
|
|
@ -867,11 +843,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions processorModulePathStrings(Collection<String> paths) {
|
public JavacOptions processorModulePathStrings(Collection<String> paths) {
|
||||||
if (isNotEmpty(paths)) {
|
|
||||||
return addPathOption("--processor-module-path", paths);
|
return addPathOption("--processor-module-path", paths);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify a module path where to find annotation processors
|
* Specify a module path where to find annotation processors
|
||||||
|
|
@ -932,11 +905,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions processorPathStrings(Collection<String> paths) {
|
public JavacOptions processorPathStrings(Collection<String> paths) {
|
||||||
if (isNotEmpty(paths)) {
|
|
||||||
return addPathOption("--processor-path", paths);
|
return addPathOption("--processor-path", paths);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify where to find annotation processors
|
* Specify where to find annotation processors
|
||||||
|
|
@ -1069,11 +1039,8 @@ public class JavacOptions extends ArrayList<String> {
|
||||||
* @since 2.3.1
|
* @since 2.3.1
|
||||||
*/
|
*/
|
||||||
public JavacOptions upgradeModulePathStrings(Collection<String> paths) {
|
public JavacOptions upgradeModulePathStrings(Collection<String> paths) {
|
||||||
if (isNotEmpty(paths)) {
|
|
||||||
return addPathOption("--upgrade-module-path", paths);
|
return addPathOption("--upgrade-module-path", paths);
|
||||||
}
|
}
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override location of upgradeable modules
|
* Override location of upgradeable modules
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue