Fix Javadoc warnings due to Java 21 update (+ some other warnings)

The default implicit constructor must also have a doc comment, so I have to make it explicit and either properly restrict the visibility of the constructor, or actually document it.
This commit is contained in:
2024-06-06 23:59:32 +02:00
parent decf302851
commit d411618e63
58 changed files with 188 additions and 12 deletions

View File

@@ -104,4 +104,7 @@ public class DistanceUtil {
}
}
private DistanceUtil() {}
}

View File

@@ -84,4 +84,6 @@ public class EnumUtil {
return RandomUtil.arrayElement(enumType.getEnumConstants());
}
private EnumUtil() {}
}

View File

@@ -52,4 +52,7 @@ public class FileUtils {
Files.copy(source.toPath(), target.toPath());
}
}
private FileUtils() {}
}

View File

@@ -21,4 +21,8 @@ public class ListUtil {
list.add(i);
}
}
private ListUtil() {}
}

View File

@@ -158,5 +158,7 @@ public class MemoryUtil {
unitMultiplier = uMultiplier;
}
}
private MemoryUtil() {}
}

View File

@@ -97,6 +97,8 @@ public class MinecraftWebUtil {
return builder.toString();
}
private MinecraftWebUtil() {}

View File

@@ -10,7 +10,7 @@ import java.util.UUID;
* <p>
* You can generate the UUID programmatically using {@link #getFromNickName(String)} and
* {@link #getFromNickNames(String[])}.
*
* <p>
* To use this class as a program, type
* <pre>
* java -cp&lt;anyClassPathContainingThisClass&gt; fr.pandacube.lib.util.OfflineUUID [playernames...]
@@ -67,4 +67,6 @@ public class OfflineUUID {
System.out.println(arg + "\t" + getFromNickName(arg));
}
}
private OfflineUUID() {}
}

View File

@@ -172,7 +172,7 @@ public class RandomUtil {
return String.valueOf(pw);
}
private RandomUtil() {}
}

View File

@@ -146,6 +146,6 @@ public class StringUtil {
private StringUtil() {}
}

View File

@@ -147,5 +147,6 @@ public class ThrowableUtil {
return new RuntimeException(t);
}
private ThrowableUtil() {}
}

View File

@@ -56,4 +56,6 @@ public class Tick {
return Duration.ofMillis(toMs(tick));
}
private Tick() {}
}

View File

@@ -481,4 +481,7 @@ public class TimeUtil {
}
private TimeUtil() {}
}

View File

@@ -2,6 +2,9 @@ package fr.pandacube.lib.util.function;
/**
* A consumer that can possibly throw a checked exception.
* @param <T> the first parameter for this bi-consumer.
* @param <U> the second parameter for this bi-consumer.
* @param <E> the exception type that this interface method can throw.
*/
@FunctionalInterface
public interface BiConsumerException<T, U, E extends Exception> {

View File

@@ -2,6 +2,8 @@ package fr.pandacube.lib.util.function;
/**
* A predicate that can possibly throw a checked exception.
* @param <T> the parameter for this predicate.
* @param <E> the exception type that this predicate can throw.
*/
@FunctionalInterface
public interface PredicateException<T, E extends Exception> {

View File

@@ -2,6 +2,7 @@ package fr.pandacube.lib.util.function;
/**
* A runnable that can possibly throw a checked exception.
* @param <E> the exception type that this interface method can throw.
*/
@FunctionalInterface
public interface RunnableException<E extends Exception> {

View File

@@ -2,6 +2,8 @@ package fr.pandacube.lib.util.function;
/**
* A supplier that can possibly throw a checked exception.
* @param <T> the return type of this supplier.
* @param <E> the exception type that this interface method can throw.
*/
@FunctionalInterface
public interface SupplierException<T, E extends Exception> {

View File

@@ -2,6 +2,9 @@ package fr.pandacube.lib.util.function;
/**
* A function that can possibly throw a checked exception.
* @param <T> the first parameter for this bi-function.
* @param <U> the second parameter for this bi-function.
* @param <E> the exception type that this interface method can throw.
*/
@FunctionalInterface
public interface ToIntBiFunctionException<T, U, E extends Exception> {

View File

@@ -2,6 +2,10 @@ package fr.pandacube.lib.util.function;
/**
* A consumer that can possibly throw a checked exception.
* @param <T> the first parameter for this tri-consumer.
* @param <U> the second parameter for this tri-consumer.
* @param <V> the third parameter for this tri-consumer.
* @param <E> the exception type that this interface method can throw.
*/
@FunctionalInterface
public interface TriConsumerException<T, U, V, E extends Exception> {

View File

@@ -30,6 +30,11 @@ public class DailyLogRotateFileHandler extends Handler {
private String currentFileDate = getCurrentDay();
private boolean closed = false;
/**
* Creates a new {@link DailyLogRotateFileHandler}.
*/
public DailyLogRotateFileHandler() {}
@Override
public synchronized void close() throws SecurityException {

View File

@@ -159,4 +159,6 @@ public final class Log {
logger.info(message);
}
private Log() {}
}