Skip to content

Commit

Permalink
Fixed a bug with MehradConfig.copyTo
Browse files Browse the repository at this point in the history
  • Loading branch information
MehradN committed Jul 4, 2023
1 parent 4ce0bd4 commit ab887e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/ir/mehradn/mehradconfig/MehradConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void pairEntries(List<ConfigEntry<?>> entries1, List<ConfigEntry<?>> ent

@SuppressWarnings("unchecked")
private <T> void sameTypeEntry(ConfigEntry<?> entry1, ConfigEntry<?> entry2, SameTypeEntryAction<T> action) {
if (!entry1.entryTypeInfo().typeClass().equals(entry2.entryTypeInfo().getClass()))
if (!entry1.entryTypeInfo().typeClass().equals(entry2.entryTypeInfo().typeClass()))
throw new IllegalArgumentException("Mismatching entry types, Invalid argument type!");
action.run((ConfigEntry<T>)entry1, (ConfigEntry<T>)entry2);
}
Expand Down

0 comments on commit ab887e2

Please sign in to comment.