roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Work logged] (ROL-2159) "@Override" should be used on overriding and implementing methods
Date Fri, 15 Nov 2019 10:28:00 GMT

     [ https://issues.apache.org/jira/browse/ROL-2159?focusedWorklogId=344128&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-344128
]

ASF GitHub Bot logged work on ROL-2159:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Nov/19 10:27
            Start Date: 15/Nov/19 10:27
    Worklog Time Spent: 10m 
      Work Description: adityasharma7 commented on issue #49: Added '@Override' should be
used on overriding and implementing methods. (ROL-2159)
URL: https://github.com/apache/roller/pull/49#issuecomment-554304882
 
 
   Thanks @isdixit!
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 344128)
    Remaining Estimate: 0h
            Time Spent: 10m

> "@Override" should be used on overriding and implementing methods
> -----------------------------------------------------------------
>
>                 Key: ROL-2159
>                 URL: https://issues.apache.org/jira/browse/ROL-2159
>             Project: Apache Roller
>          Issue Type: Improvement
>    Affects Versions: 6.0.0
>            Reporter: Saurabh Dixit
>            Assignee: Saurabh Dixit
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Using the {{@Override}} annotation is useful for two reasons :
>  * It elicits a warning from the compiler if the annotated method doesn't actually override
anything, as in the case of a misspelling.
>  * It improves the readability of the source code by making it obvious that methods are
overridden.
> h2. Noncompliant Code Example
> {code:java}
> class ParentClass { 
>     public boolean doSomething(){...}
> } 
> class FirstChildClass extends ParentClass { 
>     public boolean doSomething(){...} // Noncompliant 
> }{code}
> h2. Compliant Solution
> {code:java}
> class ParentClass { 
>     public boolean doSomething(){...} 
> } 
> class FirstChildClass extends ParentClass { 
>     @Override 
>     public boolean doSomething(){...} // Compliant 
> }{code}
> h2. Exceptions
> This rule is relaxed when overriding a method from the {{Object}} class like {{toString()}}, {{hashCode()}},
...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message