Closed kaicao closed 6 months ago
I did some digging to understand what might be going on here that ends up with null clazz exception. The EPTypePremade#getOrCreate throws out due to the input argument clazz is null. The input argument clazz was supplied from ExprDotNodeImpl#handlePropertyInfoPair (line 456) by desc.getPropertyComponentType.
The method javadoc for desc.getPropertyComponentType said:
* Returns the component type, if applicable.
* This is applicable only to arrays and collections, queues and iterators.
* Returns null if not applicable.
Since the EsperTestEvent#getProperty return single String instead of arrays or collections, queues, iterators that is expected by desc.getPropertyComponentType, that ends up getting null.
How to make it possible to let Esper detect the type of single return value like for EsperTestEvent#getProperty in order to avoid such null clazz error?
Thank you!
Example which works for 8.5.0 but not for 8.9.0 is Event class like:
Statement like:
So the statement is using the
getProperty
method from EsperTestEvent. The statement was able to compile with 8.5.0, but when upgrading to 8.9.0 it failed with:And by checking the failure occurred for the
Besides I tried to change property("key1").toString() to getProperty("key1").toString() but that failed compilation with error like