Skip to content

Commit

Permalink
Issue #4550 XmlConfiguration argument matching
Browse files Browse the repository at this point in the history
Improve argument matching by:
 + can unbox from any Number to any Number

Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Feb 22, 2020
1 parent 2073003 commit f35522c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ public static boolean isUnboxable(Class<?> type, Object arg)
return true;

Class<?> c = __unbox.get(type);
return arg.getClass() == __unbox.get(type);
Class<?> ac = arg.getClass();
return ac == __unbox.get(type) || (Number.class.isAssignableFrom(c) && Number.class.isAssignableFrom(ac));
}
}

0 comments on commit f35522c

Please sign in to comment.