Author: sannegrinovero
Date: 2009-04-06 17:31:26 -0400 (Mon, 06 Apr 2009)
New Revision: 16267
Modified:
search/trunk/src/main/java/org/hibernate/search/impl/SearchFactoryImpl.java
Log:
HSEARCH-352 add analyzerDef support
Modified: search/trunk/src/main/java/org/hibernate/search/impl/SearchFactoryImpl.java
===================================================================
--- search/trunk/src/main/java/org/hibernate/search/impl/SearchFactoryImpl.java 2009-04-06
20:51:40 UTC (rev 16266)
+++ search/trunk/src/main/java/org/hibernate/search/impl/SearchFactoryImpl.java 2009-04-06
21:31:26 UTC (rev 16267)
@@ -458,11 +458,12 @@
private void initProgrammaticAnalyzers(InitContext context, ReflectionManager
reflectionManager) {
final Map defaults = reflectionManager.getDefaults();
-
if (defaults != null) {
AnalyzerDef[] defs = (AnalyzerDef[]) defaults.get( AnalyzerDefs.class );
- for (AnalyzerDef def : defs) {
- context.addAnalyzerDef( def );
+ if ( defs != null ) {
+ for (AnalyzerDef def : defs) {
+ context.addAnalyzerDef( def );
+ }
}
}
}