You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2010/01/03 14:31:54 UTC

[jira] Created: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

A handy utility class for tracking deprecated overridden methods
----------------------------------------------------------------

                 Key: LUCENE-2188
                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
             Project: Lucene - Java
          Issue Type: New Feature
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
             Fix For: 3.1


This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.

See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment:     (was: LUCENE-2188.patch)

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

Improved patch:
- add runtime checks to not fail on spelling errors
- add testcase for distance measurement

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795987#action_12795987 ] 

Michael McCandless commented on LUCENE-2188:
--------------------------------------------

Haven't looked closely at the patch, but, this sounds useful Uwe!

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment:     (was: LUCENE-2188.patch)

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

Also added test for protected methods and some tests that all IAEs are thrown correctly.

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

Changed javadocs and changes.txt.

Will commit this now.

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12799387#action_12799387 ] 

Simon Willnauer commented on LUCENE-2188:
-----------------------------------------

good stuff uwe, I will fix LUCENE-2183 now.

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler resolved LUCENE-2188.
-----------------------------------

    Resolution: Fixed

Committed revision: 898507

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

I renamed the class to VirtualMethod as suggested by Simon and also changed method names and their javadocs to better describe whats happening. It is still hard to use, but client code never should use this class.

I will commit this soon to proceed with the dependent issues. Improvements to Javadocs can be done later of course.

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

The again heavy class from Uwe's reflection tools...

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

Some API cleanup and more readability for client code (see Analyzer.java and javadocs). Also enforce singleton status (static instantiations needed!).

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2188:
----------------------------------

    Attachment: LUCENE-2188.patch

New patrch, the previous one had the compare method in wrong order. Fixed docs and Analyzer and tests. I always get "totally disturbed" when using compareTo() and compare() :-(

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795973#action_12795973 ] 

Uwe Schindler commented on LUCENE-2188:
---------------------------------------

By the way, this of course passes Mike's testcase, where he tests this with a dummy Analyzer that overrides the old method.

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2188) A handy utility class for tracking deprecated overridden methods

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796910#action_12796910 ] 

Simon Willnauer commented on LUCENE-2188:
-----------------------------------------

Uwe, 
I'm not sure if I have a really good replacement for the your names, none of the following suggestions seem to be a 100% match though.

for getOverrideDistance() you could call it:
 * getDefinitionDistanceFrom(Class)
 * getImplementationDistanceFrom(Class)

The term distance is fine IMO, I would rather extend the javadoc a little and explain that this is the distance between the given class and the next class implementing the method on the path from the given class to the base class where the method was initally declared / defined

for isOverriddenBy() you could call it:
 * isDefinedBy()
 * isImplementedBy()

I also wanna mention an option for the class name, "VirtualMethod" pretty much matches what this class represents. :) 

> A handy utility class for tracking deprecated overridden methods
> ----------------------------------------------------------------
>
>                 Key: LUCENE-2188
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2188
>             Project: Lucene - Java
>          Issue Type: New Feature
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 3.1
>
>         Attachments: LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch, LUCENE-2188.patch
>
>
> This issue provides a new handy utility class that keeps track of overridden deprecated methods in non-final sub classes. This class can be used in new deprecations.
> See the javadocs for an example.

-- 
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@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org