Skip to content

Commit efd9e94

Browse files
committed
Polishing.
Replace space indents with tabs. Reformat code. See #3375 Original pull request: #3376
1 parent 7682b3c commit efd9e94

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/main/java/org/springframework/data/mapping/context/AbstractMappingContext.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,8 @@ public boolean matches(Property property) {
821821
*/
822822
static class PropertyMatch {
823823

824-
private final @Nullable Pattern namePatternRegex;
825-
private final @Nullable String typeName;
824+
private final @Nullable Pattern namePatternRegex;
825+
private final @Nullable String typeName;
826826

827827
/**
828828
* Creates a new {@link PropertyMatch} for the given name pattern and type name. At least one of the parameters
@@ -833,10 +833,10 @@ static class PropertyMatch {
833833
*/
834834
public PropertyMatch(@Nullable String namePattern, @Nullable String typeName) {
835835

836-
Assert.isTrue(!((namePattern == null) && (typeName == null)), "Either name pattern or type name must be given");
836+
Assert.isTrue(namePattern != null || typeName != null, "Either name pattern or type name must be given");
837837

838-
this.namePatternRegex = namePattern == null ? null : Pattern.compile(namePattern);
839-
this.typeName = typeName;
838+
this.namePatternRegex = namePattern == null ? null : Pattern.compile(namePattern);
839+
this.typeName = typeName;
840840
}
841841

842842
/**
@@ -871,11 +871,11 @@ public boolean matches(String name, Class<?> type) {
871871
Assert.notNull(name, "Name must not be null");
872872
Assert.notNull(type, "Type must not be null");
873873

874-
if (namePatternRegex != null && !namePatternRegex.matcher(name).matches()) {
875-
return false;
876-
}
874+
if (namePatternRegex != null && !namePatternRegex.matcher(name).matches()) {
875+
return false;
876+
}
877877

878-
if ((typeName != null) && !type.getName().equals(typeName)) {
878+
if (typeName != null && !type.getName().equals(typeName)) {
879879
return false;
880880
}
881881

@@ -916,7 +916,9 @@ public boolean matches(Property property) {
916916

917917
return super.matches(property);
918918
}
919+
919920
}
921+
920922
}
921923

922924
}

0 commit comments

Comments
 (0)