[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mdt-ocl.dev] Compilation warnings
|
Hi Axel
I checked in a templates/model/Class.javajet in the *.testmodel.ngpm
which generates additional @SuppressWarning("unchecked") annotations
to avoid the warnings where an unsafe cast in a delegating operation
is needed. I re-generated the model code and committed it. The
warnings seem gone project-wide.
Well done. A simple fix that works. Since the fix is simple, local and
for eInvoke() code that first appeared in Helios, there should not be a
problem with ten year old IBM compatibility; eInvoke code is still
settling down.
The test for "<" is indeed klunky, but a scan for similar suppress
uncheck annotations reveals a precedent elsewhere in the template. There
are also a number of uses of isUncheckedCast gen model queries. It would
be worth seeing if one of those fits the bill.
Definitely worth pushing to EMF.
----------------------------------------
Your use of a Class.javajet clone demonstrates precisely why I want to
avoid local templates if at all possible.
The template is there solely for cosmetic purposes. If you manually do
all the @suppress unchecked quick fixes method-wise, you can then
regenerate and organise imports on the src tree and all warnings are
gone again. It is perhaps a bug, though it would be a good design
intent, that the method @suppress annotations are preserved. Anyway we
don't actually need the template to have no warnings after regeneration.
The problem with the clone is that it has no indication of what version
it branched from so every future EMF fix risks breaking your models. As
a minimum put a comment in the header to show the branch point and
document the motivation (test scenarios) for all internal changes.
Please eliminate the clone from MDT/OCL and, if EMF rejects the fix,
then commit the manually applied quickfixes so that regeneration is easy.
Regards
Ed