Skip to content

Commit

Permalink
Created [structures](src/main/java/it/fulminazzo/fulmicollection/stru…
Browse files Browse the repository at this point in the history
…ctures) package.

Added [Tuple](src/main/java/it/fulminazzo/fulmicollection/structures/Tuple.java) type.
Added [Triple](src/main/java/it/fulminazzo/fulmicollection/structures/Triple.java) type.
Fixed enums not being displayed in `Printable#convertToJson`.
Fixed primitive parameters in constructors not being detected.
  • Loading branch information
Fulminazzo committed Mar 23, 2024
1 parent 72c8641 commit c929286
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'it.fulminazzo'
version = '1.4.1'
version = '1.4.2'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ public class ReflectionUtils {

private static boolean validateParameters(@Nullable Class<?> @NotNull [] paramTypes, @NotNull Executable executable) {
for (int i = 0; i < paramTypes.length; i++) {
final Class<?> expected = paramTypes[i];
final Class<?> expected = getWrapperClass(paramTypes[i]);
if (expected == null) continue;
final Class<?> actual = executable.getParameterTypes()[i];
final Class<?> actual = getWrapperClass(executable.getParameterTypes()[i]);
if (actual == null) throw new IllegalStateException("Unreachable code");
if (expected.isArray() && (!actual.isArray() || !expected.getComponentType().isAssignableFrom(actual.getComponentType())))
return false;
if (!actual.isAssignableFrom(expected))
Expand Down

0 comments on commit c929286

Please sign in to comment.