8000 Address some SonarCloud code smells on `argument-exceptions2` · CommandAPI/CommandAPI@73b2d12 · GitHub
[go: up one dir, main page]

Skip to content

Commit 73b2d12

Browse files
committed
Address some SonarCloud code smells on argument-exceptions2
Remove obsolete unused type parameter T from InitialParseExceptionParser Change test classes to default package visibility
1 parent 381905e commit 73b2d12

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

commandapi-core/src/main/java/dev/jorel/commandapi/arguments/ExceptionHandlingArgumentType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public record ExceptionHandlingArgumentType<T, ExceptionInformation>(
3737
* @param exceptionParser A function that parses the information in a {@link CommandSyntaxException} to create an
3838
* {@link ExceptionInformation} object.
3939
*/
40-
InitialParseExceptionParser<T, ExceptionInformation> exceptionParser
40+
InitialParseExceptionParser<ExceptionInformation> exceptionParser
4141
) implements ArgumentType<T> {
4242

4343
@Override

commandapi-core/src/main/java/dev/jorel/commandapi/arguments/InitialParseExceptionParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
* Extracts information about an exception that was thrown when an {@link ArgumentType} fails to parse.
99
* See {@link InitialParseExceptionArgument#parseInitialParseException(CommandSyntaxException, StringReader)}.
1010
*
11-
* @param <T> The object returned when the wrapped {@link ArgumentType} is parsed.
1211
* @param <ExceptionInformation> The class that holds information about the exception.
1312
*/
1413
@FunctionalInterface
15-
public interface InitialParseExceptionParser<T, ExceptionInformation> {
14+
public interface InitialParseExceptionParser<ExceptionInformation> {
1615
/**
1716
* Extracts information about an exception that was thrown when an {@link ArgumentType} fails to parse.
1817
* See {@link InitialParseExceptionArgument#parseInitialParseException(CommandSyntaxException, StringReader)}.

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-test/commandapi-bukkit-test-tests/src/test/java/dev/jorel/commandapi/test/ArgumentParseExceptionArgumentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import java.util.Collection;
1313
import java.util.List;
1414

15-
public class ArgumentParseExceptionArgumentTest extends TestBase {
15+
class ArgumentParseExceptionArgumentTest extends TestBase {
1616

1717
/*********
1818
* Setup *

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-test/commandapi-bukkit-test-tests/src/test/java/dev/jorel/commandapi/test/InitialParseExceptionArgumentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import static org.junit.jupiter.api.Assertions.assertEquals;
1212

13-
public class InitialParseExceptionArgumentTest extends TestBase {
13+
class InitialParseExceptionArgumentTest extends TestBase {
1414

1515
/*********
1616
* Setup *

0 commit comments

Comments
 (0)
0