Closed eclipse-ocl-bot closed 2 hours ago
By Ed Willink on Feb 01, 2010 13:07
Created attachment 157811 Enable missing warnings and fix corrolaries
Patch enables many missing warnings and so
updates parser templates with @Override and @Deprecated [It would be good if LPG exposed the Parsersym etc templates so that we could put the missing annotations in them too.]
fixes a number of minor always-null, never-null, maybe-null issues.
:notepad_spiral: Bug301407.patch
By Adolfo Sanchez-Barbudo Herrera on Feb 01, 2010 14:30
Ed,
I agree with the changes. Just wondering which kind of problem we had in the past when introducing an @override in a class's method implementation which "overrides" the inteface's method definition (instead of a superclass method). I think the problem arose when using JRE 1.5. However, I haven't able to reproduce any compiling/bad class exception error while using JRE 1.5.0_21 (at compiling time, and at test cases runtime).... Do you remember anything about this ?
Cheers,\ Adolfo.
By Ed Willink on Feb 01, 2010 15:27
I suspect it may have been an accident/just lazy. Once you have project-specific settings it is very easy to disable good warnings.
By Alexander Igdalov on Feb 01, 2010 15:52
(In reply to comment #2)
Ed,
I agree with the changes. Just wondering which kind of problem we had in the past when introducing an @override in a class's method implementation which "overrides" the inteface's method definition (instead of a superclass method). I think the problem arose when using JRE 1.5. However, I haven't able to reproduce any compiling/bad class exception error while using JRE 1.5.0_21 (at compiling time, and at test cases runtime).... Do you remember anything about this ?
Cheers, Adolfo.
Hi Adolfo,
It's a known bug of Java5 that @Override annotations are prohibited on directly implemented methods. Java6 has fixed that. I haven't checked each @Override annotation in the patch but I found only @override for parent class methods but not for interface methods. Could you point me to an example?
Cheers,
By Adolfo Sanchez-Barbudo Herrera on Feb 03, 2010 05:08
Well, in my previous comment I hadn't realized that the templates methods are overriden the new abstract methods in the abstract parser/lexer, so no point about trying to get the commented error/exception ;)
Some of the abstract methods were added to include the @since without modifying the template. Now we are modifying the template due to consequence of the previous decision. Anyway, I guess there is no problem about keeping those abstract methods, so go ahead with the commit.
Cheers,\ Adolfo.
By Ed Willink on Feb 03, 2010 15:02
Committed to HEAD.
By Ed Willink on May 27, 2011 02:54
Closing
| --- | --- | | Bugzilla Link | 301407 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Feb 01, 2010 06:39 EDT | | Modified | May 22, 2013 14:14 EDT | | Version | 3.0.0 | | Reporter | Ed Willink |
Description
o.e.ocl specifies ignoring missing @Override, and so numerous override hazards are undiagnosed in the recent patch for LPG2. Sincxe this code contributes to other projects that amy have the normal setting it should be fixed.