[Soot-list] undocumented and questionable behavior of getArrayElementType
Quentin Sabah
quentin.sabah at inria.fr
Wed May 16 11:45:39 EDT 2012
Hi all,
The RefLikeType interface defines the getArrayElementType() function.
Its return value is not specified when the underlying type cannot have
array elements (almost any object reference type except Object,
Serializable and Cloneable).
In RefType, this function usually throws a RuntimeException, so users
have to catch this exception and hope it means there is no array element
type possible.
I think we could:
- define a dedicated exception
- OR return null instead of throwing an exception.
- OR keep the current code.
- in any case, we can improve the documentation.
I can supply a patch after we decide for an alternative.
Regards,
--
Quentin Sabah, CIFRE Ph.D. student
Grenoble University
INRIA-SARDES | STMicroelectronics/AST
Montbonnot, France | Grenoble, France
mailto:quentin.sabah at inria.fr | mailto:quentin.sabah at st.com
phone: +33 476 61 52 42 | phone: +33 476 58 44 14
More information about the Soot-list
mailing list