@@ -821,8 +821,8 @@ public boolean matches(Property property) {
821
821
*/
822
822
static class PropertyMatch {
823
823
824
- private final @ Nullable Pattern namePatternRegex ;
825
- private final @ Nullable String typeName ;
824
+ private final @ Nullable Pattern namePatternRegex ;
825
+ private final @ Nullable String typeName ;
826
826
827
827
/**
828
828
* 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 {
833
833
*/
834
834
public PropertyMatch (@ Nullable String namePattern , @ Nullable String typeName ) {
835
835
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" );
837
837
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 ;
840
840
}
841
841
842
842
/**
@@ -871,11 +871,11 @@ public boolean matches(String name, Class<?> type) {
871
871
Assert .notNull (name , "Name must not be null" );
872
872
Assert .notNull (type , "Type must not be null" );
873
873
874
- if (namePatternRegex != null && !namePatternRegex .matcher (name ).matches ()) {
875
- return false ;
876
- }
874
+ if (namePatternRegex != null && !namePatternRegex .matcher (name ).matches ()) {
875
+ return false ;
876
+ }
877
877
878
- if (( typeName != null ) && !type .getName ().equals (typeName )) {
878
+ if (typeName != null && !type .getName ().equals (typeName )) {
879
879
return false ;
880
880
}
881
881
@@ -916,7 +916,9 @@ public boolean matches(Property property) {
916
916
917
917
return super .matches (property );
918
918
}
919
+
919
920
}
921
+
920
922
}
921
923
922
924
}
0 commit comments