[jboss-jira] [JBoss JIRA] (LOGTOOL-44) Make configurable whether @Override annotation shall be added

Hardy Ferentschik (JIRA) jira-events at lists.jboss.org
Fri Apr 20 06:43:19 EDT 2012


    [ https://issues.jboss.org/browse/LOGTOOL-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12685991#comment-12685991 ] 

Hardy Ferentschik edited comment on LOGTOOL-44 at 4/20/12 6:43 AM:
-------------------------------------------------------------------

I just tried to compile JBoss Logging for Java 5 and there was no problem at all. All that is needed it some configuration in the pom:
{code}
<plugin>
   <artifactId>maven-compiler-plugin</artifactId>
   <configuration>
      <source>1.5</source>
      <target>1.5</target>
   </configuration>
</plugin>
{code}
https://github.com/hferentschik/jboss-logging/commit/b0a4b59fa8632cefbde51bbae1f170f4f9b44d59

Seems simple enough to me. Of course the this needs to be combined with the replacement of _Arrays#copyOfRange_ in _Log_$logger_.  
                
      was (Author: hardy.ferentschik):
    I just tried to compile JBoss Logging for Java 5 and there was no problem at all. All that is needed it some configuration in the pom:
{code}
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
{code}
https://github.com/hferentschik/jboss-logging/commit/b0a4b59fa8632cefbde51bbae1f170f4f9b44d59

Seems simple enough to me. Of course the this needs to be combined with the replacement of _Arrays#copyOfRange_ in _Log_$logger_.  
                  
> Make configurable whether @Override annotation shall be added
> -------------------------------------------------------------
>
>                 Key: LOGTOOL-44
>                 URL: https://issues.jboss.org/browse/LOGTOOL-44
>             Project: Log Tool
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.0.1.Final
>            Reporter: Gunnar Morling
>            Assignee: James Perkins
>
> The annotation processor adds the {{@java.lang.Override}} annotation to the methods of generated log or message bundle classes. For methods implementing interface methods this is allowed only in Java 6 and above, while in Java 5 {{@Override}} is only allowed for methods overriding methods from superclasses.
> Therefore compilation of the generated classes fails using Java 5. To address this issue, the annotation should be added conditionally based on the current source level.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list