Methods that implement interface methods were being marked with the @Override annotation causing compile failure in Eclipse
--------------------------------------------------------------------------------------------------------------------------- Key: OFBIZ-3531 URL: https://issues.apache.org/jira/browse/OFBIZ-3531 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Environment: Eclipse 3.5 on Mac OS X 10.5.8 Reporter: Bob Morley Fix For: SVN trunk Implementations of the TemporalExpressionVisitor interface and some base comparison methods were implementation methods but were marked with the @Override annotation. This caused compile errors in Eclipse in these four classes. I simply removed the @Override on these methods and I fixed one generics related warning. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bob Morley updated OFBIZ-3531: ------------------------------ Attachment: OFBIZ-3531_RemoveIncorrectOverrideAnnotations.patch > Methods that implement interface methods were being marked with the @Override annotation causing compile failure in Eclipse > --------------------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3531 > URL: https://issues.apache.org/jira/browse/OFBIZ-3531 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: Eclipse 3.5 on Mac OS X 10.5.8 > Reporter: Bob Morley > Fix For: SVN trunk > > Attachments: OFBIZ-3531_RemoveIncorrectOverrideAnnotations.patch > > > Implementations of the TemporalExpressionVisitor interface and some base comparison methods were implementation methods but were marked with the @Override annotation. This caused compile errors in Eclipse in these four classes. I simply removed the @Override on these methods and I fixed one generics related warning. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum updated OFBIZ-3531: ------------------------------- Priority: Minor (was: Major) The compile errors must be due to an Eclipse setting. The override annotations were added by Eclipse automatically (Add unimplemented methods wizard) so it is puzzling that Eclipse would complain about them. The version I'm using - dated June 2009 - doesn't generate any errors. Also, it might be helpful to find out what Sun's coding standards are regarding this. Are override annotations for interface methods recommended? > Methods that implement interface methods were being marked with the @Override annotation causing compile failure in Eclipse > --------------------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3531 > URL: https://issues.apache.org/jira/browse/OFBIZ-3531 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: Eclipse 3.5 on Mac OS X 10.5.8 > Reporter: Bob Morley > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-3531_RemoveIncorrectOverrideAnnotations.patch > > > Implementations of the TemporalExpressionVisitor interface and some base comparison methods were implementation methods but were marked with the @Override annotation. This caused compile errors in Eclipse in these four classes. I simply removed the @Override on these methods and I fixed one generics related warning. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841303#action_12841303 ] Bob Morley commented on OFBIZ-3531: ----------------------------------- Did a bit of research -- turns out that this is a compile error in java 5 but not in java 6. I checked my preferences and even though I had installed the 1.6.0 JRE my compiler compliance level was still 1.5. After changing this Eclipse compiled clean (like ant did using the 1.6 javac). Sorry about this; I suspect if I had installed Eclipse after having the latest JRE installed it would have worked fine; if someone upgrades then they will have to remember to alter their compliance settings in Eclipse. Feel free to close this ticket. > Methods that implement interface methods were being marked with the @Override annotation causing compile failure in Eclipse > --------------------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3531 > URL: https://issues.apache.org/jira/browse/OFBIZ-3531 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: Eclipse 3.5 on Mac OS X 10.5.8 > Reporter: Bob Morley > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-3531_RemoveIncorrectOverrideAnnotations.patch > > > Implementations of the TemporalExpressionVisitor interface and some base comparison methods were implementation methods but were marked with the @Override annotation. This caused compile errors in Eclipse in these four classes. I simply removed the @Override on these methods and I fixed one generics related warning. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum closed OFBIZ-3531. ------------------------------ Resolution: Won't Fix I did some research too. It seems the functionality of @Override was extended in Java 6, but it wasn't documented. The reason for allowing @Override on interface method implementations is this: If the interface changes and a method is removed, the compiler will generate a warning for classes that implement the removed method. > Methods that implement interface methods were being marked with the @Override annotation causing compile failure in Eclipse > --------------------------------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3531 > URL: https://issues.apache.org/jira/browse/OFBIZ-3531 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: Eclipse 3.5 on Mac OS X 10.5.8 > Reporter: Bob Morley > Priority: Minor > Fix For: SVN trunk > > Attachments: OFBIZ-3531_RemoveIncorrectOverrideAnnotations.patch > > > Implementations of the TemporalExpressionVisitor interface and some base comparison methods were implementation methods but were marked with the @Override annotation. This caused compile errors in Eclipse in these four classes. I simply removed the @Override on these methods and I fixed one generics related warning. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |