Skip to content

Commit 1d51eb6

Browse files
committed
Replace isNotBlank with TextUtils.isNotBlank and remove redundant method
1 parent 77359a2 commit 1d51eb6

2 files changed

Lines changed: 5 additions & 12 deletions

File tree

src/bld/java/rife/bld/extension/DokkaOperationBuild.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ public DokkaOperationBuild() {
5151
.include(dependency("org.jetbrains.dokka", "javadoc-plugin", dokka))
5252
.include(dependency("org.jetbrains.dokka", "gfm-plugin", dokka))
5353
.include(dependency("org.jetbrains.dokka", "jekyll-plugin", dokka))
54+
.include(dependency("com.uwyn.rife2", "bld-extensions-tools",
55+
version(0, 9, 0, "SNAPSHOT")))
5456
.include(dependency("com.uwyn.rife2", "bld", version(2, 3, 0)));
5557
scope(provided)
5658
.include(dependency("com.github.spotbugs", "spotbugs-annotations",

src/main/java/rife/bld/extension/DokkaOperation.java

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import rife.bld.extension.dokka.LoggingLevel;
2222
import rife.bld.extension.dokka.OutputFormat;
2323
import rife.bld.extension.dokka.SourceSet;
24+
import rife.bld.extension.tools.TextUtils;
2425
import rife.bld.operations.AbstractProcessOperation;
2526
import rife.bld.operations.exceptions.ExitStatusException;
2627
import rife.tools.StringUtils;
@@ -101,16 +102,6 @@ public static List<File> getJarList(File directory, String regex) {
101102
return jars;
102103
}
103104

104-
/**
105-
* Determines if the given string is not blank.
106-
*
107-
* @param s the string
108-
* @return {@code true} if not blank, {@code false} otherwise.
109-
*/
110-
public static boolean isNotBlank(String s) {
111-
return s != null && !s.isBlank();
112-
}
113-
114105
// Encodes to JSON adding braces as needed
115106
private static String encodeJson(final String json) {
116107
var sb = new StringBuilder(json);
@@ -224,13 +215,13 @@ protected List<String> executeConstructProcessCommandList() {
224215
}
225216

226217
// -moduleName
227-
if (isNotBlank(moduleName_)) {
218+
if (TextUtils.isNotBlank(moduleName_)) {
228219
args.add("-moduleName");
229220
args.add(moduleName_);
230221
}
231222

232223
// -moduleVersion
233-
if (isNotBlank(moduleVersion_)) {
224+
if (TextUtils.isNotBlank(moduleVersion_)) {
234225
args.add("-moduleVersion");
235226
args.add(moduleVersion_);
236227
}

0 commit comments

Comments
 (0)