Skip to content

Commit 350f362

Browse files
committed
Polishing.
Replace space indents with tabs. Reformat code. See #3375 Original pull request: #3376
1 parent a8fbf55 commit 350f362

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
@@ -814,8 +814,8 @@ public boolean matches(Property property) {
814814
*/
815815
static class PropertyMatch {
816816

817-
private final @Nullable Pattern namePatternRegex;
818-
private final @Nullable String typeName;
817+
private final @Nullable Pattern namePatternRegex;
818+
private final @Nullable String typeName;
819819

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

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

831-
this.namePatternRegex = namePattern == null ? null : Pattern.compile(namePattern);
832-
this.typeName = typeName;
831+
this.namePatternRegex = namePattern == null ? null : Pattern.compile(namePattern);
832+
this.typeName = typeName;
833833
}
834834

835835
/**
@@ -864,11 +864,11 @@ public boolean matches(String name, Class<?> type) {
864864
Assert.notNull(name, "Name must not be null");
865865
Assert.notNull(type, "Type must not be null");
866866

867-
if (namePatternRegex != null && !namePatternRegex.matcher(name).matches()) {
868-
return false;
869-
}
867+
if (namePatternRegex != null && !namePatternRegex.matcher(name).matches()) {
868+
return false;
869+
}
870870

871-
if ((typeName != null) && !type.getName().equals(typeName)) {
871+
if (typeName != null && !type.getName().equals(typeName)) {
872872
return false;
873873
}
874874

@@ -909,7 +909,9 @@ public boolean matches(Property property) {
909909

910910
return super.matches(property);
911911
}
912+
912913
}
914+
913915
}
914916

915917
}

0 commit comments

Comments
 (0)