Skip to content

Commit

Permalink
Address some SonarCloud code smells on argument-exceptions2
Browse files Browse the repository at this point in the history
Remove obsolete unused type parameter T from InitialParseExceptionParser

Change test classes to default package visibility
  • Loading branch information
willkroboth committed Aug 12, 2023
1 parent a841cd3 commit 5f6ca11
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public record ExceptionHandlingArgumentType<T, ExceptionInformation>(
* @param exceptionParser A function that parses the information in a {@link CommandSyntaxException} to create an
* {@link ExceptionInformation} object.
*/
InitialParseExceptionParser<T, ExceptionInformation> exceptionParser
InitialParseExceptionParser<ExceptionInformation> exceptionParser
) implements ArgumentType<T> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@
* Extracts information about an exception that was thrown when an {@link ArgumentType} fails to parse.
* See {@link InitialParseExceptionArgument#parseInitialParseException(CommandSyntaxException, StringReader)}.
*
* @param <T> The object returned when the wrapped {@link ArgumentType} is parsed.
* @param <ExceptionInformation> The class that holds information about the exception.
*/
@FunctionalInterface
public interface InitialParseExceptionParser<T, ExceptionInformation> {
public interface InitialParseExceptionParser<ExceptionInformation> {
/**
* Extracts information about an exception that was thrown when an {@link ArgumentType} fails to parse.
* See {@link InitialParseExceptionArgument#parseInitialParseException(CommandSyntaxException, StringReader)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import java.util.Collection;
import java.util.List;

public class ArgumentParseExceptionArgumentTest extends TestBase {
class ArgumentParseExceptionArgumentTest extends TestBase {

/*********
* Setup *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

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

public class InitialParseExceptionArgumentTest extends TestBase {
class InitialParseExceptionArgumentTest extends TestBase {

/*********
* Setup *
Expand Down

0 comments on commit 5f6ca11

Please sign in to comment.