[ 
https://issues.apache.org/jira/browse/LUCENE-7918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16121483#comment-16121483
 ] 

Karl Wright commented on LUCENE-7918:
-------------------------------------

[~ivera], you can always verify that the types of the two classes are identical 
(using this.getClass() and other.getClass()), but in the case of generics that 
does not help you.  You instead would want to have the type check (using 
instanceof) in the derived class, since generics only mean anything at compile 
time.

So if you wanted to close that hole, both the derived classes would need equals 
methods with instanceof checks and calls to super.equals().  You are free to 
submit a patch that does this but I'm not too alarmed about this. :-)

Please note that I also removed the super.hashCode() invocation since that 
seemed broken in exactly the same way.


> Give access to members of a composite shape
> -------------------------------------------
>
>                 Key: LUCENE-7918
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7918
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/spatial3d
>            Reporter: Ignacio Vera
>            Assignee: Karl Wright
>             Fix For: 6.6, master (8.0), 7.1
>
>         Attachments: LUCENE-7918.patch
>
>
> Hi [~daddywri],
> I hope this is my last point in my wish list. In order to serialize objects I 
> need to access the members of a composite geoshape. This is currently not 
> possible so I was wondering if it is possible to add to more methods to the 
> class GeoCompositeMembershipShape:
> public int size()
> public GeoMembershipShape getShape(int index)
> Thanks,
> Ignacio



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to