Source:
public void addPersistentProperty(ElasticsearchPersistentProperty property) { super.addPersistentProperty(property); if (property.isParentProperty()) { ElasticsearchPersistentProperty parentProperty = this.parentIdProperty; if (parentProperty != null) { throw new MappingException(String.format( "Attempt to add parent property %s but already have property %s registered " + "as parent property. Check your mapping configuration!", property.getField(), parentProperty.getField())); } Parent parentAnnotation = property.findAnnotation(Parent.class); this.parentIdProperty = property; this.parentType = parentAnnotation.type(); } if (property.isScoreProperty()) { ElasticsearchPersistentProperty scoreProperty = this.scoreProperty; if (scoreProperty != null) { throw new MappingException(String.format( "Attempt to add score property %s but already have property %s registered " + "as score property. Check your mapping configuration!", property.getField(), scoreProperty.getField())); } this.scoreProperty = property; } if (property.isSeqNoPrimaryTermProperty()) { ElasticsearchPersistentProperty seqNoPrimaryTermProperty = this.seqNoPrimaryTermProperty; if (seqNoPrimaryTermProperty != null) { throw new MappingException(String.format( "Attempt to add SeqNoPrimaryTerm property %s but already have property %s registered " + "as SeqNoPrimaryTerm property. Check your mapping configuration!", property.getField(), seqNoPrimaryTermProperty.getField())); } this.seqNoPrimaryTermProperty = property; if (hasVersionProperty()) { logger.warn("Both SeqNoPrimaryTerm and @Version properties are defined on {}. Version will not be sent in index requests when seq_no is sent!", getType()); } } if (property.isVersionProperty()) { if (hasSeqNoPrimaryTermProperty()) { logger.warn("Both SeqNoPrimaryTerm and @Version properties are defined on {}. Version will not be sent in index requests when seq_no is sent!", getType()); } } }

Target:
public void addPersistentProperty(ElasticsearchPersistentProperty property) { super.addPersistentProperty(property); if (property.isParentProperty()) { ElasticsearchPersistentProperty parentProperty = this.parentIdProperty; if (parentProperty != null) { throw new MappingException(String.format( "Attempt to add parent property %s but already have property %s registered " + "as parent property. Check your mapping configuration!", property.getField(), parentProperty.getField())); } Parent parentAnnotation = property.findAnnotation(Parent.class); this.parentIdProperty = property; this.parentType = parentAnnotation.type(); } if (property.isScoreProperty()) { ElasticsearchPersistentProperty scoreProperty = this.scoreProperty; if (scoreProperty != null) { throw new MappingException(String.format( "Attempt to add score property %s but already have property %s registered " + "as score property. Check your mapping configuration!", property.getField(), scoreProperty.getField())); } this.scoreProperty = property; } if (property.isSeqNoPrimaryTermProperty()) { ElasticsearchPersistentProperty seqNoPrimaryTermProperty = this.seqNoPrimaryTermProperty; if (seqNoPrimaryTermProperty != null) { throw new MappingException(String.format( "Attempt to add SeqNoPrimaryTerm property %s but already have property %s registered " + "as SeqNoPrimaryTerm property. Check your entity configuration!", property.getField(), seqNoPrimaryTermProperty.getField())); } this.seqNoPrimaryTermProperty = property; if (hasVersionProperty()) { warnAboutBothSeqNoPrimaryTermAndVersionProperties(); } } if (property.isVersionProperty()) { if (hasSeqNoPrimaryTermProperty()) { warnAboutBothSeqNoPrimaryTermAndVersionProperties(); } } }