Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] Updated: (LUCENE-2012) Add @Override annotations

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Oct 27, 2009, 4:26 PM

Post #1 of 4 (103 views)
Permalink
[jira] Updated: (LUCENE-2012) Add @Override annotations

[ https://issues.apache.org/jira/browse/LUCENE-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2012:
----------------------------------

Attachment: LUCENE-2012.patch

Patch.

> Add @Override annotations
> -------------------------
>
> Key: LUCENE-2012
> URL: https://issues.apache.org/jira/browse/LUCENE-2012
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Uwe Schindler
> Fix For: 3.0
>
> Attachments: LUCENE-2012.patch
>
>
> During removal of deprecated APIs, mostly the problem was, to not only remove the method in the (abstract) base class (e.g. Scorer.explain()), but also remove it in sub classes that override it. You can easily forget that (especially, if the method was not marked deprecated in the subclass). By adding @Override annotations everywhere in Lucene, such removals are simple, because the compiler throws out an error message in all subclasses which then no longer override the method.
> Also it helps preventing the well-known traps like overriding hashcode() instead of hashCode().
> The patch was generated automatically, and is rather large. Should I apply it, or would it break too many patches (but I think, trunk has changed so much, that this is only a minimum of additional work to merge)?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-dev-help[at]lucene.apache.org


jira at apache

Nov 4, 2009, 5:53 PM

Post #2 of 4 (71 views)
Permalink
[jira] Updated: (LUCENE-2012) Add @Override annotations [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2012:
----------------------------------

Attachment: LUCENE-2012-tests.patch

test for the patches, it also fixes whitespace where broken.

Will commit now.

> Add @Override annotations
> -------------------------
>
> Key: LUCENE-2012
> URL: https://issues.apache.org/jira/browse/LUCENE-2012
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Uwe Schindler
> Fix For: 3.0
>
> Attachments: LUCENE-2012-tests.patch, LUCENE-2012.patch
>
>
> During removal of deprecated APIs, mostly the problem was, to not only remove the method in the (abstract) base class (e.g. Scorer.explain()), but also remove it in sub classes that override it. You can easily forget that (especially, if the method was not marked deprecated in the subclass). By adding @Override annotations everywhere in Lucene, such removals are simple, because the compiler throws out an error message in all subclasses which then no longer override the method.
> Also it helps preventing the well-known traps like overriding hashcode() instead of hashCode().
> The patch was generated automatically, and is rather large. Should I apply it, or would it break too many patches (but I think, trunk has changed so much, that this is only a minimum of additional work to merge)?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-dev-help[at]lucene.apache.org


jira at apache

Nov 8, 2009, 3:42 AM

Post #3 of 4 (58 views)
Permalink
[jira] Updated: (LUCENE-2012) Add @Override annotations [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2012:
--------------------------------

Attachment: LUCENE-2012_contrib.patch

Uwe attached is a patch for contrib and its tests.


> Add @Override annotations
> -------------------------
>
> Key: LUCENE-2012
> URL: https://issues.apache.org/jira/browse/LUCENE-2012
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Uwe Schindler
> Fix For: 3.0
>
> Attachments: LUCENE-2012-tests.patch, LUCENE-2012.patch, LUCENE-2012_contrib.patch
>
>
> During removal of deprecated APIs, mostly the problem was, to not only remove the method in the (abstract) base class (e.g. Scorer.explain()), but also remove it in sub classes that override it. You can easily forget that (especially, if the method was not marked deprecated in the subclass). By adding @Override annotations everywhere in Lucene, such removals are simple, because the compiler throws out an error message in all subclasses which then no longer override the method.
> Also it helps preventing the well-known traps like overriding hashcode() instead of hashCode().
> The patch was generated automatically, and is rather large. Should I apply it, or would it break too many patches (but I think, trunk has changed so much, that this is only a minimum of additional work to merge)?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-dev-help[at]lucene.apache.org


jira at apache

Nov 8, 2009, 4:27 AM

Post #4 of 4 (58 views)
Permalink
[jira] Updated: (LUCENE-2012) Add @Override annotations [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-2012:
--------------------------------

Attachment: LUCENE-2012_contrib.patch

there were some places where @override was added for generated code (snowball, javacc), I excluded these files, as was done for core.

also add @override for demo. will commit and resolve this soon as this will quickly get out of date.

> Add @Override annotations
> -------------------------
>
> Key: LUCENE-2012
> URL: https://issues.apache.org/jira/browse/LUCENE-2012
> Project: Lucene - Java
> Issue Type: Task
> Reporter: Uwe Schindler
> Fix For: 3.0
>
> Attachments: LUCENE-2012-tests.patch, LUCENE-2012.patch, LUCENE-2012_contrib.patch, LUCENE-2012_contrib.patch
>
>
> During removal of deprecated APIs, mostly the problem was, to not only remove the method in the (abstract) base class (e.g. Scorer.explain()), but also remove it in sub classes that override it. You can easily forget that (especially, if the method was not marked deprecated in the subclass). By adding @Override annotations everywhere in Lucene, such removals are simple, because the compiler throws out an error message in all subclasses which then no longer override the method.
> Also it helps preventing the well-known traps like overriding hashcode() instead of hashCode().
> The patch was generated automatically, and is rather large. Should I apply it, or would it break too many patches (but I think, trunk has changed so much, that this is only a minimum of additional work to merge)?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-dev-help[at]lucene.apache.org

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.