Package org.hibernate.search.exception

Examples of org.hibernate.search.exception.AssertionFailure


        );
        if ( analyzer == null ) {
          analyzer = typeMetadataBuilder.getAnalyzer();
        }
        if ( analyzer == null ) {
          throw new AssertionFailure( "Analyzer should not be undefined" );
        }
        typeMetadataBuilder.addToScopedAnalyzer( fieldName, analyzer, index );
      }
    }
  }
View Full Code Here


    typeMetadataBuilder.addClassBridgeField( fieldMetadata );

    Analyzer analyzer = typeMetadataBuilder.getAnalyzer();
    if ( analyzer == null ) {
      throw new AssertionFailure( "Analyzer should not be undefined" );
    }
  }
View Full Code Here

  public abstract FieldBridge provideFieldBridge(ExtendedBridgeProviderContext bridgeContext);

  @Override
  public FieldBridge provideFieldBridge(BridgeProviderContext bridgeProviderContext) {
    if ( ! ( bridgeProviderContext instanceof ExtendedBridgeProviderContext ) ) {
      throw new AssertionFailure( "We should always receive an ExtendedBridgeProviderContext instance: " + bridgeProviderContext
          .getClass() );
    }
    return provideFieldBridge( (ExtendedBridgeProviderContext) bridgeProviderContext );
  }
View Full Code Here

    try {
      tikaBridgeClass = ClassLoaderHelper.classForName( TIKA_BRIDGE_NAME, serviceManager );
      tikaBridge = ClassLoaderHelper.instanceFromClass( FieldBridge.class, tikaBridgeClass, "Tika bridge" );
    }
    catch (ClassLoadingException 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

  public static class SimpleFacetCounter extends FacetCounter {
    @Override
    void countValue(Object value) {
      if ( !( value instanceof String[] ) ) {
        throw new AssertionFailure( "Unexpected field value type " + value.getClass() );
      }
      String[] values = (String[]) value;
      for ( String stringValue : values ) {
        incrementCount( stringValue );
      }
View Full Code Here

  @Override
  public void initialize(Properties properties, IndexManager[] indexManagers) {
    this.directoryProvider = indexManagers;
    if ( directoryProvider.length > 1 ) {
      throw new AssertionFailure("Using SingleDirectoryProviderSelectionStrategy with multiple DirectoryProviders");
    }
  }
View Full Code Here

        }
        assert removed != null;
      }
      else if ( refCount < 0 ) {
        //doesn't happen with current code, could help spotting future bugs?
        throw new AssertionFailure(
            "Closing an IndexReader for which you didn't own a lock-token, or somebody else which didn't own closed already."
        );
      }
    }
View Full Code Here

      case ARRAY:
        return new BuiltinArrayBridge( bridge );
      case MAP:
        return new BuiltinMapBridge( bridge );
      default:
        throw new AssertionFailure( "Unknown ContainerType " + containerType );
    }
  }
View Full Code Here

    }
    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

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.