Skip to content

Commit 1451423

Browse files
committed
refactor: simplify
1 parent f15aa3d commit 1451423

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/me/qoomon/gradle/gitversioning/GitVersioningPluginExtension.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,7 @@ private Map<String, Supplier<String>> generateFormatPlaceholderMap(String projec
460460

461461
placeholderMap.put("version", Lazy.of(projectVersion));
462462

463-
final Lazy<Matcher> projectVersionMatcher = Lazy.by(() -> {
464-
return matchVersion(projectVersion);
465-
});
463+
final Lazy<Matcher> projectVersionMatcher = Lazy.by(() -> matchVersion(projectVersion));
466464

467465
placeholderMap.put("version.core", Lazy.by(() -> notNullOrDefault(projectVersionMatcher.get().group("core"), "0.0.0")));
468466

@@ -552,9 +550,7 @@ private Map<String, Supplier<String>> generateGlobalFormatPlaceholderMap(GitSitu
552550
placeholderMap.put("describe.tag." + groupName + ".slug", Lazy.by(() -> slugify(groupValue.get())));
553551
}
554552

555-
final Lazy<Matcher> descriptionTagVersionMatcher = Lazy.by(() -> {
556-
return matchVersion(descriptionTag.get());
557-
});
553+
final Lazy<Matcher> descriptionTagVersionMatcher = Lazy.by(() -> matchVersion(descriptionTag.get()));
558554

559555
placeholderMap.put("describe.tag.version", Lazy.by(() -> notNullOrDefault(descriptionTagVersionMatcher.get().group(), "0.0.0")));
560556

0 commit comments

Comments
 (0)