[hibernate-dev] Changing or deprecating @AnalyzerDef

Sanne Grinovero sanne at hibernate.org
Thu Mar 3 10:08:38 EST 2016


I just realized that the definiton for @AnalyzerDef allows many target ypes:

@Target({ ElementType.PACKAGE, ElementType.TYPE, ElementType.FIELD,
ElementType.METHOD })

I think FIELD and METHOD might not have been intended to be there.

Should we correct this in 6 to

@Target({ ElementType.PACKAGE, ElementType.TYPE })

?

If so, since I don't see how to deprecate that I think we could start
logging a warning now when we find one "misplaced".

Alternatively we might want to fully deprecate this annotation, as it
requires direct exposure to Lucene classes.
I'm thinking we should at least change it to refer to FQCN of lucene
classes rather than class instances, but maybe someone has even better
ideas? (I don't like the typesafety of FQCN String names)

Thanks,
Sanne


More information about the hibernate-dev mailing list