If you use it type unsafe without generics, it will break. And we need it for 2.9.
I was thinking about both variants and thought it would be better to leave it in. I will merge this now to 2.9, too. ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: [email protected] > -----Original Message----- > From: Earwin Burrfoot (JIRA) [mailto:[email protected]] > Sent: Sunday, November 22, 2009 2:35 PM > To: [email protected] > Subject: [jira] Commented: (LUCENE-2088) AttributeSource.addAttribute > should only accept interfaces, the missing test leads to problems with > Token.TOKEN_ATTRIBUTE_FACTORY > > > [ https://issues.apache.org/jira/browse/LUCENE- > 2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment- > tabpanel&focusedCommentId=12781122#action_12781122 ] > > Earwin Burrfoot commented on LUCENE-2088: > ----------------------------------------- > > bq. && Attribute.class.isAssignableFrom(attClass) > What is this for? This line > bq. public <A extends Attribute> A addAttribute(Class<A> attClass) { > ensures the same at compile time. > > > AttributeSource.addAttribute should only accept interfaces, the missing > test leads to problems with Token.TOKEN_ATTRIBUTE_FACTORY > > ------------------------------------------------------------------------ > --------------------------------------------------------- > > > > Key: LUCENE-2088 > > URL: https://issues.apache.org/jira/browse/LUCENE-2088 > > Project: Lucene - Java > > Issue Type: Bug > > Affects Versions: 2.9, 2.9.1, 3.0 > > Reporter: Uwe Schindler > > Assignee: Uwe Schindler > > Priority: Blocker > > Fix For: 3.0 > > > > Attachments: LUCENE-2088.patch > > > > > > This is a blocker, because you can call addAttribute(Token.class) > without getting an error message. > > I will commit the fix and restart the vote for 3.0. This also applies to > 2.9, but there is no Token Attribute Factory. But I will merge to 2.9, > too, if a 2.9.2 comes. > > -- > 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: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
