117 NullPointerException injacob-1.17-M2

This commit is contained in:
clay_shooter
2013-07-26 00:36:12 +00:00
parent 62c74f2d69
commit d1dca37cf3
4 changed files with 51 additions and 11 deletions

View File

@@ -2161,6 +2161,8 @@ public class Variant extends JacobObject {
* <li>"null" if VariantEmpty,
* <li>"null" if VariantError
* <li>"null" if VariantNull
* <li>"null" if Variant type didn't convert. This can happen for date
* conversions where the returned value was 0.
* <li>the value if we know how to describe one of that type
* <li>three question marks if can't convert
*
@@ -2186,7 +2188,11 @@ public class Variant extends JacobObject {
try {
Object foo = toJavaObject();
// rely on java objects to do the right thing
return foo.toString();
if (foo == null) {
return "null";
} else {
return foo.toString();
}
} catch (NotImplementedException nie) {
// some types do not generate a good description yet
return "Description not available for type: " + getvt();