public static CmsSolrSpellchecker getInstance ( CoreContainer container ) { if ( null == instance ) { synchronized ( CmsSolrSpellchecker . class ) { if ( null == instance ) { @ SuppressWarnings ( "resource" ) SolrCore spellcheckCore = container . getCore ( CmsSolrSpellchecker . SPELLCHECKER_INDEX_CORE ) ; if ( spellcheckCore == null ) { LOG . error ( Messages . get ( ) . getBundle ( ) . key ( Messages . ERR_SPELLCHECK_CORE_NOT_AVAILABLE_1 , CmsSolrSpellchecker . SPELLCHECKER_INDEX_CORE ) ) ; return null ; } instance = new CmsSolrSpellchecker ( container , spellcheckCore ) ; } } } return instance ; }
Return an instance of this class .