Skip to content

Commit

Permalink
Revert method name to better match behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
craigtaverner committed Mar 21, 2017
1 parent 2c834dd commit fd73a3e
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -38,7 +38,6 @@
import org.neo4j.kernel.api.schema_new.LabelSchemaDescriptor;
import org.neo4j.kernel.api.schema_new.RelationTypeSchemaDescriptor;
import org.neo4j.kernel.api.schema_new.SchemaDescriptor;
import org.neo4j.kernel.api.schema_new.constaints.ConstraintBoundary;
import org.neo4j.kernel.api.schema_new.constaints.ConstraintDescriptor;
import org.neo4j.kernel.api.schema_new.constaints.ConstraintDescriptorFactory;
import org.neo4j.kernel.api.schema_new.constaints.NodeExistenceConstraintDescriptor;
Expand Down Expand Up @@ -116,7 +115,7 @@ public NewIndexDescriptor indexCreate( KernelStatement state, LabelSchemaDescrip
throws AlreadyIndexedException, AlreadyConstrainedException, RepeatedPropertyInCompositeSchemaException
{
assertValidDescriptor( descriptor, OperationContext.INDEX_CREATION );
assertUniqueIndexDoesNotExist( state, OperationContext.INDEX_CREATION, descriptor );
assertIndexDoesNotExist( state, OperationContext.INDEX_CREATION, descriptor );
return schemaWriteDelegate.indexCreate( state, descriptor );
}

Expand Down Expand Up @@ -162,7 +161,7 @@ public NodeKeyConstraintDescriptor nodeKeyConstraintCreate(
assertConstraintDoesNotExist( state, constraint );

// It is not allowed to create node key constraints on indexed label/property pairs
assertUniqueIndexDoesNotExist( state, OperationContext.CONSTRAINT_CREATION, descriptor );
assertIndexDoesNotExist( state, OperationContext.CONSTRAINT_CREATION, descriptor );

return schemaWriteDelegate.nodeKeyConstraintCreate( state, descriptor );
}
Expand All @@ -178,7 +177,7 @@ public UniquenessConstraintDescriptor uniquePropertyConstraintCreate(
assertConstraintDoesNotExist( state, constraint );

// It is not allowed to create uniqueness constraints on indexed label/property pairs
assertUniqueIndexDoesNotExist( state, OperationContext.CONSTRAINT_CREATION, descriptor );
assertIndexDoesNotExist( state, OperationContext.CONSTRAINT_CREATION, descriptor );

return schemaWriteDelegate.uniquePropertyConstraintCreate( state, descriptor );
}
Expand Down Expand Up @@ -220,7 +219,7 @@ public void constraintDrop( KernelStatement state, ConstraintDescriptor descript
schemaWriteDelegate.constraintDrop( state, descriptor );
}

private void assertUniqueIndexDoesNotExist( KernelStatement state, OperationContext context,
private void assertIndexDoesNotExist( KernelStatement state, OperationContext context,
LabelSchemaDescriptor descriptor )
throws AlreadyIndexedException, AlreadyConstrainedException
{
Expand Down

0 comments on commit fd73a3e

Please sign in to comment.