This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bsf.git
The following commit(s) were added to refs/heads/master by this push: new 94d9c51 Raise embedded if into parent if. 94d9c51 is described below commit 94d9c5175bf5f5c2a339600e6b4238b2978224c9 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Feb 28 12:16:22 2021 -0500 Raise embedded if into parent if. --- src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java b/src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java index 19b25f2..009e4d4 100644 --- a/src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java +++ b/src/main/java/org/apache/bsf/util/type/TypeConvertorRegistry.java @@ -181,14 +181,12 @@ public class TypeConvertorRegistry { public TypeConvertor lookup (final Class from, final Class to) { final String key = from.getName () + " -> " + to.getName (); final TypeConvertor tc = (TypeConvertor) reg.get (key); - if (tc == null) { - if (from != void.class + if ((tc == null) && (from != void.class && from != Void.class - && to == String.class) { + && to == String.class)) { // find the object -> string convertor return lookup (Object.class, String.class); } - } return tc; } // lookup a convertor by key