Skip to content

Commit

Permalink
DATACMNS-1273 - Polishing.
Browse files Browse the repository at this point in the history
Remove trailing whitespaces.
  • Loading branch information
mp911de committed Mar 5, 2018
1 parent ada4498 commit 3527f19
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/**
* Special {@link PersistentProperty} that takes annotations at a property into account.
*
*
* @author Oliver Gierke
* @author Christoph Strobl
* @author Mark Paluch
Expand All @@ -59,7 +59,7 @@ public abstract class AnnotationBasedPersistentProperty<P extends PersistentProp

/**
* Creates a new {@link AnnotationBasedPersistentProperty}.
*
*
* @param field must not be {@literal null}.
* @param propertyDescriptor can be {@literal null}.
* @param owner must not be {@literal null}.
Expand All @@ -79,7 +79,7 @@ public AnnotationBasedPersistentProperty(Field field, PropertyDescriptor propert
/**
* Populates the annotation cache by eagerly accessing the annotations directly annotated to the accessors (if
* available) and the backing field. Annotations override annotations found on field.
*
*
* @param field
* @throws MappingException in case we find an ambiguous mapping on the accessor methods
*/
Expand Down Expand Up @@ -123,7 +123,7 @@ private final void populateAnnotationCache(Field field) {
/**
* Verifies the given annotation candidate detected. Will be rejected if it's a Spring Data annotation and we already
* found another one with a different configuration setup (i.e. other attribute values).
*
*
* @param candidate must not be {@literal null}.
* @param message must not be {@literal null}.
* @param arguments must not be {@literal null}.
Expand All @@ -146,7 +146,7 @@ private void validateAnnotation(Annotation candidate, String message, Object...
/**
* Inspects a potentially available {@link Value} annotation at the property and returns the {@link String} value of
* it.
*
*
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#getSpelExpression()
*/
@Override
Expand All @@ -157,7 +157,7 @@ public String getSpelExpression() {
/**
* Considers plain transient fields, fields annotated with {@link Transient}, {@link Value} or {@link Autowired} as
* transient.
*
*
* @see org.springframework.data.mapping.BasicPersistentProperty#isTransient()
*/
@Override
Expand All @@ -180,7 +180,7 @@ public boolean isIdProperty() {
return isAnnotationPresent(Id.class);
}

/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.PersistentProperty#isVersionProperty()
*/
Expand All @@ -196,7 +196,7 @@ public boolean isAssociation() {
return !isTransient() && isAnnotationPresent(Reference.class);
}

/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#isWritable()
*/
Expand All @@ -209,7 +209,7 @@ public boolean isWritable() {
* Returns the annotation found for the current {@link AnnotationBasedPersistentProperty}. Will prefer getters or
* setters annotations over ones found at the backing field as the former can be used to reconfigure the metadata in
* subclasses.
*
*
* @param annotationType must not be {@literal null}.
* @return
*/
Expand Down Expand Up @@ -242,7 +242,7 @@ public <A extends Annotation> A findAnnotation(Class<A> annotationType) {
field == null ? null : AnnotatedElementUtils.findMergedAnnotation(field, annotationType));
}

/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.PersistentProperty#findPropertyOrOwnerAnnotation(java.lang.Class)
*/
Expand All @@ -255,7 +255,7 @@ public <A extends Annotation> A findPropertyOrOwnerAnnotation(Class<A> annotatio

/**
* Puts the given annotation into the local cache and returns it.
*
*
* @param annotation
* @return
*/
Expand All @@ -270,15 +270,15 @@ private <A extends Annotation> A cacheAndReturn(Class<? extends A> type, A annot

/**
* Returns whether the property carries the an annotation of the given type.
*
*
* @param annotationType the annotation type to look up.
* @return
*/
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType) {
return findAnnotation(annotationType) != null;
}

/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#usePropertyAccess()
*/
Expand All @@ -287,7 +287,7 @@ public boolean usePropertyAccess() {
return super.usePropertyAccess() || usePropertyAccess;
}

/*
/*
* (non-Javadoc)
* @see org.springframework.data.mapping.model.AbstractPersistentProperty#toString()
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

import org.junit.Before;
import org.junit.Test;

import org.springframework.core.annotation.AliasFor;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.data.annotation.AccessType;
Expand All @@ -44,7 +43,7 @@

/**
* Unit tests for {@link AnnotationBasedPersistentProperty}.
*
*
* @author Oliver Gierke
* @author Christoph Strobl
* @author Mark Paluch
Expand Down Expand Up @@ -204,7 +203,7 @@ public void revisedAnnotationWithAliasShouldHaveSynthesizedAttributeValues() {

SamplePersistentProperty setter = entity.getPersistentProperty("setter");
RevisedAnnnotationWithAliasFor annotation = setter.findAnnotation(RevisedAnnnotationWithAliasFor.class);

assertThat(annotation.name(), is(equalTo("my-value")));
assertThat(annotation.value(), is(equalTo("my-value")));
}
Expand Down

0 comments on commit 3527f19

Please # to comment.