Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mdt-papyrus.dev] Question about EMF/Facet JavaQueryImplementationFactory.java

We recently noticed that Java queries of Papyrus' EMF/Facet
do some extensive type checking on the result upon evaluation.
This seems strange, as the Java query implementation is already "type safe" at compile-time.
And it is quite costly for queries returning a big collection of objects.

Moreover, looking at the history of the source code,
it seems that the activation of this check was initially off, then put back on.
There is an obscure comment about it in the code for JavaQueryImplementationFactory.java:

// Initially a null test was performed on bundle to determine whether
// to check the result type. Now we need a bundle so
// checkResultType=true
javaQueryEvaluator.setCheckResultType(true);

What is the rationale for doing this run-time type-checking?
Is there a way to selectively turn it off without simply patching Papyrus?
Would there be adverse consequences if turning it off globally? (knowing all our queries are type-safe at compile time)

Regards,
--
Alain Le Guennec, R&D Expert Engineer
SCADE System Project Manager
Esterel Technologies, a wholly-owned subsidiary of ANSYS, Inc.
Tel: +33 5 34 60 90 55
----------------------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. 

Back to the top