Package org.hibernate.search.exception

Examples of org.hibernate.search.exception.AssertionFailure


    }
    else if ( readState == 2 ) {
      return directory2;
    }
    else {
      throw new AssertionFailure( "Illegal current directory: " + readState );
    }
  }
View Full Code Here


    Reader reader = field.readerValue();
    if ( reader instanceof Serializable ) {
      return SerializationHelper.toByteArray( (Serializable) reader );
    }
    else {
      throw new AssertionFailure( "Should not call getReaderValue for a non Serializable Reader" );
    }
  }
View Full Code Here

    try {
      tikaBridgeClass = ClassLoaderHelper.classForName( TIKA_BRIDGE_NAME, BridgeFactory.class.getClassLoader() );
      tikaBridge = ClassLoaderHelper.instanceFromClass( FieldBridge.class, tikaBridgeClass, "Tika bridge" );
    }
    catch (ClassNotFoundException e) {
      throw new AssertionFailure( "Unable to find Tika bridge class: " + TIKA_BRIDGE_NAME );
    }

    Class<?> tikaMetadataProcessorClass = annotation.metadataProcessor();
    if ( tikaMetadataProcessorClass != void.class ) {
      configureTikaBridgeParameters(
View Full Code Here

    }
    if ( indexReader == null ) {
      writeLock.lock();
      try {
        if ( shutdown ) {
          throw new AssertionFailure( "IndexReader requested after ReaderProvider is shutdown" );
        }
        indexReader = currentReader.get();
        if ( indexReader == null ) {
          indexReader = writerHolder.openDirectoryIndexReader();
          currentReader.set( indexReader );
View Full Code Here

    }
  }

  private void checkType(final LuceneWork work) {
    if ( work.getEntityClass() != managedType ) {
      throw new AssertionFailure( "Unexpected type" );
    }
  }
View Full Code Here

    }
  }

  private void checkType(final LuceneWork work) {
    if ( work.getEntityClass() != managedType ) {
      throw new AssertionFailure( "Unexpected type: " + work.getEntityClass() + " This workspace expects: " + managedType );
    }
  }
View Full Code Here

  }

  private TimeoutManagerImpl getTimeoutManagerImpl() {
    if ( timeoutManager == null ) {
      if ( luceneQuery == null ) {
        throw new AssertionFailure( "Requesting TimeoutManager before setting luceneQuery()" );
      }
      timeoutManager = new TimeoutManagerImpl( luceneQuery, timeoutExceptionFactory, this.searchFactoryImplementor.getTimingSource() );
    }
    return timeoutManager;
  }
View Full Code Here

          isMultiPhrase = true;
        }
      }
    }
    catch (IOException e) {
      throw new AssertionFailure( "IOException while reading a string. Doh!", e);
    }
    finally {
      if ( stream != null ) {
        try {
          stream.end();
          stream.close();
        }
        catch (IOException e) {
          throw new AssertionFailure( "IOException while reading a string. Doh!", e);
        }
      }
    }

    /*
 
View Full Code Here

          range.isMinIncluded(),
          range.isMaxIncluded()
      );
    }
    else {
      throw new AssertionFailure( "Unsupported range type" );
    }
  }
View Full Code Here

          range.isMinIncluded(),
          range.isMaxIncluded()
      );
    }
    else {
      throw new AssertionFailure( "Unsupported range type" );
    }
    return query;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.exception.AssertionFailure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.