Skip to content

Commit 4bf118a

Browse files
committed
Convert some interfaces to final classes
Originally did this to make things easier to write, but after a few months I've come to realize that yeah keeping them as utility classes is just better.
1 parent bffc0cf commit 4bf118a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/main/java/net/minecraftforge/gitver/internal/GitChangelog.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
* Typically used by GitVersion in
2323
* {@link net.minecraftforge.gitver.api.GitVersion#generateChangelog(String, String, boolean)}.
2424
*/
25-
interface GitChangelog {
25+
final class GitChangelog {
26+
private GitChangelog() { }
27+
2628
/**
2729
* Generates a changelog string that can be written to a file from a given git directory and repository url.
2830
* <p>

src/main/java/net/minecraftforge/gitver/internal/GitUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
* This is used heavily by, and in conjunction with, GitVersion. It holds the majority of operations done on the Git
4040
* repository.
4141
*/
42-
interface GitUtils {
42+
final class GitUtils {
43+
private GitUtils() { }
44+
4345
/**
4446
* Gets the relative path of a file from a root directory. Uses NIO's {@link Path} to guarantee cross-platform
4547
* compatibility and reproducible path strings.

src/main/java/net/minecraftforge/gitver/internal/Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.util.function.Supplier;
2323
import java.util.function.UnaryOperator;
2424

25-
public final class Util {
25+
final class Util {
2626
/**
2727
* Hacky method to throw a checked exception without declaring it.
2828
*

0 commit comments

Comments
 (0)